/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/pcilib.h

  • Committer: Suren A. Chilingaryan
  • Date: 2015-11-20 17:26:29 UTC
  • Revision ID: csa@suren.me-20151120172629-ifd0wt33sg5bccpo
64-bit access to BAR memory

Show diffs side-by-side

added added

removed removed

Lines of Context:
327
327
 * @param[in,out] ctx   - pcilib context
328
328
 * @param[in] bar       - the BAR to read, use PCILIB_BAR_DETECT to detect bar by the specified physical address
329
329
 * @param[in] addr      - absolute physical address to read or the offset in the specified bar
330
 
 * @param[in] size      - number of bytes to read
 
330
 * @param[in] access    - word size (access width in bytes)
 
331
 * @param[in] n         - number of words to read
331
332
 * @param[out] buf      - the read data will be placed in this buffer
332
333
 * @return              - error code or 0 on success
333
334
 */ 
334
 
int pcilib_read(pcilib_t *ctx, pcilib_bar_t bar, uintptr_t addr, size_t size, void *buf);
 
335
int pcilib_read(pcilib_t *ctx, pcilib_bar_t bar, uintptr_t addr, uint8_t access, size_t n, void *buf);
335
336
 
336
337
/**
337
338
 * Performs PIO write to the PCI BAR. The BAR will be automatically mapped and unmapped if necessary.
338
339
 * @param[in,out] ctx   - pcilib context
339
340
 * @param[in] bar       - the BAR to write, use PCILIB_BAR_DETECT to detect bar by the specified physical address
340
341
 * @param[in] addr      - absolute physical address to write or the offset in the specified bar
341
 
 * @param[in] size      - number of bytes to write
 
342
 * @param[in] access    - word size (access width in bytes)
 
343
 * @param[in] n         - number of words to write
342
344
 * @param[out] buf      - the pointer to the data to be written
343
345
 * @return              - error code or 0 on success
344
346
 */ 
345
 
int pcilib_write(pcilib_t *ctx, pcilib_bar_t bar, uintptr_t addr, size_t size, void *buf);
 
347
int pcilib_write(pcilib_t *ctx, pcilib_bar_t bar, uintptr_t addr, uint8_t access, size_t n, void *buf);
346
348
 
347
349
/**
348
350
 * Performs PIO read from the PCI BAR. The specified address is treated as FIFO and will be read