summaryrefslogtreecommitdiffstats
path: root/pcilib/bar.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2016-03-02 05:47:04 +0100
committerSuren A. Chilingaryan <csa@suren.me>2016-03-02 05:47:04 +0100
commit8933c45c177556353570f92513bb49f182ce3be8 (patch)
tree08ee02c6a6e97f72ad5cdb23717f9600813cff6d /pcilib/bar.h
parent3c58980b3ca558096340e51c215897e8614ba00a (diff)
downloadpcitool-8933c45c177556353570f92513bb49f182ce3be8.tar.gz
pcitool-8933c45c177556353570f92513bb49f182ce3be8.tar.bz2
pcitool-8933c45c177556353570f92513bb49f182ce3be8.tar.xz
pcitool-8933c45c177556353570f92513bb49f182ce3be8.zip
Documentation update
Diffstat (limited to 'pcilib/bar.h')
-rw-r--r--pcilib/bar.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/pcilib/bar.h b/pcilib/bar.h
index 3c0eef6..accc4ba 100644
--- a/pcilib/bar.h
+++ b/pcilib/bar.h
@@ -72,7 +72,21 @@ int pcilib_detect_address(pcilib_t *ctx, pcilib_bar_t *bar, uintptr_t *addr, siz
*/
char *pcilib_resolve_data_space(pcilib_t *ctx, uintptr_t addr, size_t *size);
+/**
+ * Return information about the specified BAR or NULL if BAR is not present in hardware
+ * @param[in,out] ctx - pcilib context
+ * @param[in] bar - the PCI BAR number (numbered from 0)
+ * @return - pointer to structure describing the specified BAR or NULL in case of error
+ */
const pcilib_bar_info_t *pcilib_get_bar_info(pcilib_t *ctx, pcilib_bar_t bar);
+
+/**
+ * Return a list of BAR memory regions available in the hardware.
+ * The list is terminated by a dummy BAR description with 0 size.
+ *
+ * @param[in,out] ctx - pcilib context
+ * @return - pointer to structure describing the BARs or NULL in case of error
+ */
const pcilib_bar_info_t *pcilib_get_bar_list(pcilib_t *ctx);