summaryrefslogtreecommitdiffstats
path: root/pcilib/memcpy.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/memcpy.h
parent3c58980b3ca558096340e51c215897e8614ba00a (diff)
downloadpcitool-8933c45c177556353570f92513bb49f182ce3be8.tar.gz
pcitool-8933c45c177556353570f92513bb49f182ce3be8.tar.bz2
pcitool-8933c45c177556353570f92513bb49f182ce3be8.tar.xz
pcitool-8933c45c177556353570f92513bb49f182ce3be8.zip
Documentation update
Diffstat (limited to 'pcilib/memcpy.h')
-rw-r--r--pcilib/memcpy.h52
1 files changed, 51 insertions, 1 deletions
diff --git a/pcilib/memcpy.h b/pcilib/memcpy.h
index dbfae36..99317bf 100644
--- a/pcilib/memcpy.h
+++ b/pcilib/memcpy.h
@@ -9,10 +9,60 @@
extern "C" {
#endif
+/**
+ * The collection of slow memcpy functions to move the data between BAR and system memory.
+ *
+ * The hardware may restrict access width or expose different behavior depending on the
+ * access width. These functions access memory using the specified word width only.
+ * 8-, 16-, 32-, and 64-bit wide access is supported.
+ *
+ * @param[out] dst - the destination memory region
+ * @param[in] src - the source memory region
+ * @param[in] access - the size of word (a single memory access) in bytes
+ * @param[in] n - the number of words to copy (\p n * \p access bytes are copied).
+ * @return - `dst` or NULL on error
+ */
+void *pcilib_memcpy(void * dst, void const * src, uint8_t access, size_t n);
+
+/**
+ * The collection of slow memcpy functions to move the data between BAR and system memory.
+ *
+ * The hardware may restrict access width or expose different behavior depending on the
+ * access width. This function only perform 8-bit memory accesses.
+ *
+ * @param[out] dst - the destination memory region
+ * @param[in] src - the source memory region
+ * @param[in] len - the number of bytes to copy
+ * @return - `dst` or NULL on error
+ */
void *pcilib_memcpy8(void * dst, void const * src, size_t len);
+
+/**
+ * The collection of slow memcpy functions to move the data between BAR and system memory.
+ *
+ * The hardware may restrict access width or expose different behavior depending on the
+ * access width. This function only perform 32-bit memory accesses.
+ *
+ * @param[out] dst - the destination memory region
+ * @param[in] src - the source memory region
+ * @param[in] len - the number of bytes to copy
+ * @return - `dst` or NULL on error
+ */
void *pcilib_memcpy32(void * dst, void const * src, size_t len);
+
+
+/**
+ * The collection of slow memcpy functions to move the data between BAR and system memory.
+ *
+ * The hardware may restrict access width or expose different behavior depending on the
+ * access width. This function only perform 64-bit memory accesses.
+ *
+ * @param[out] dst - the destination memory region
+ * @param[in] src - the source memory region
+ * @param[in] len - the number of bytes to copy
+ * @return - `dst` or NULL on error
+ */
void *pcilib_memcpy64(void * dst, void const * src, size_t len);
-void *pcilib_memcpy(void * dst, void const * src, uint8_t access, size_t n);
#ifdef __cplusplus
}