/alps/pcitool

To get this branch, use:
bzr branch http://darksoft.org/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/memcpy.h

  • Committer: Suren A. Chilingaryan
  • Date: 2016-03-02 04:47:04 UTC
  • Revision ID: csa@suren.me-20160302044704-wncsxtf6sx0r0tps
Documentation update

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
extern "C" {
10
10
#endif
11
11
 
 
12
/**
 
13
 * The collection of slow memcpy functions to move the data between BAR and system memory. 
 
14
 *
 
15
 * The hardware may restrict access width or expose different behavior depending on the 
 
16
 * access width. These functions access memory using the specified word width only. 
 
17
 * 8-, 16-, 32-, and 64-bit wide access is supported.
 
18
 *
 
19
 * @param[out] dst      - the destination memory region
 
20
 * @param[in] src       - the source memory region
 
21
 * @param[in] access    - the size of word (a single memory access) in bytes
 
22
 * @param[in] n         - the number of words to copy (\p n * \p access bytes are copied).
 
23
 * @return              - `dst` or NULL on error
 
24
 */
 
25
void *pcilib_memcpy(void * dst, void const * src, uint8_t access, size_t n);
 
26
 
 
27
/**
 
28
 * The collection of slow memcpy functions to move the data between BAR and system memory. 
 
29
 *
 
30
 * The hardware may restrict access width or expose different behavior depending on the 
 
31
 * access width. This function only perform 8-bit memory accesses.
 
32
 *
 
33
 * @param[out] dst      - the destination memory region
 
34
 * @param[in] src       - the source memory region
 
35
 * @param[in] len       - the number of bytes to copy
 
36
 * @return              - `dst` or NULL on error
 
37
 */
12
38
void *pcilib_memcpy8(void * dst, void const * src, size_t len);
 
39
 
 
40
/**
 
41
 * The collection of slow memcpy functions to move the data between BAR and system memory. 
 
42
 *
 
43
 * The hardware may restrict access width or expose different behavior depending on the 
 
44
 * access width. This function only perform 32-bit memory accesses.
 
45
 *
 
46
 * @param[out] dst      - the destination memory region
 
47
 * @param[in] src       - the source memory region
 
48
 * @param[in] len       - the number of bytes to copy
 
49
 * @return              - `dst` or NULL on error
 
50
 */
13
51
void *pcilib_memcpy32(void * dst, void const * src, size_t len);
 
52
 
 
53
 
 
54
/**
 
55
 * The collection of slow memcpy functions to move the data between BAR and system memory. 
 
56
 *
 
57
 * The hardware may restrict access width or expose different behavior depending on the 
 
58
 * access width. This function only perform 64-bit memory accesses.
 
59
 *
 
60
 * @param[out] dst      - the destination memory region
 
61
 * @param[in] src       - the source memory region
 
62
 * @param[in] len       - the number of bytes to copy
 
63
 * @return              - `dst` or NULL on error
 
64
 */
14
65
void *pcilib_memcpy64(void * dst, void const * src, size_t len);
15
 
void *pcilib_memcpy(void * dst, void const * src, uint8_t access, size_t n);
16
66
 
17
67
#ifdef __cplusplus
18
68
}