diff options
author | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-09 17:34:23 +0100 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@ipe.fzk.de> | 2011-03-09 17:34:23 +0100 |
commit | b26046f5a83a3933a99166762de03bf8e7a48d76 (patch) | |
tree | 5f43a328cd43745ff3f2db4d864b2db4b81c35fd /tools.h | |
parent | 8a33c993a5771b041b67c365378ac40f76365da7 (diff) | |
parent | 134e2cc87d524bbb63c2e73dc1bb1fd8c0449ae1 (diff) | |
download | pcitool-b26046f5a83a3933a99166762de03bf8e7a48d76.tar.gz pcitool-b26046f5a83a3933a99166762de03bf8e7a48d76.tar.bz2 pcitool-b26046f5a83a3933a99166762de03bf8e7a48d76.tar.xz pcitool-b26046f5a83a3933a99166762de03bf8e7a48d76.zip |
Merge changes
Diffstat (limited to 'tools.h')
-rw-r--r-- | tools.h | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -1,9 +1,24 @@ #ifndef _PCITOOL_TOOLS_H #define _PCITOOL_TOOLS_H -void * memcpy8(void * dst, void const * src, size_t len); -void * memcpy32(void * dst, void const * src, size_t len); -void * memcpy64(void * dst, void const * src, size_t len); -int get_page_mask(); +#include <stdio.h> +#include <stdint.h> + +#include "pci.h" + +int pcilib_isnumber(const char *str); +int pcilib_isxnumber(const char *str); + +uint16_t pcilib_swap16(uint16_t x); +uint32_t pcilib_swap32(uint32_t x); +uint64_t pcilib_swap64(uint64_t x); +void pcilib_swap(void *dst, void *src, size_t size, size_t n); + +void * pcilib_memcpy8(void * dst, void const * src, size_t len); +void * pcilib_memcpy32(void * dst, void const * src, size_t len); +void * pcilib_memcpy64(void * dst, void const * src, size_t len); +void * pcilib_datacpy32(void * dst, void const * src, uint8_t size, size_t n, pcilib_endianess_t big_endian); + +int pcilib_get_page_mask(); #endif /* _PCITOOL_TOOS_H */ |