diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2015-04-27 02:28:57 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2015-04-27 02:28:57 +0200 |
commit | e1265fa32837f457ee2c2fa259d12c9545af4bbf (patch) | |
tree | 64b8d5f1c81c14f019047b0cb00cb77c2dcecf55 /tools.h | |
parent | a37beb44d59cca329d0d9345c21505af81030688 (diff) | |
download | ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.tar.gz ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.tar.bz2 ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.tar.xz ipecamera-e1265fa32837f457ee2c2fa259d12c9545af4bbf.zip |
First stand-alone ipecamera implementation
Diffstat (limited to 'tools.h')
-rw-r--r-- | tools.h | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/tools.h b/tools.h deleted file mode 100644 index 28f8b0a..0000000 --- a/tools.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef _PCITOOL_TOOLS_H -#define _PCITOOL_TOOLS_H - -#include <stdio.h> -#include <stdint.h> - -#define BIT_MASK(bits) ((1ll << (bits)) - 1) - -#define min2(a, b) (((a)<(b))?(a):(b)) - -typedef enum { - PCILIB_TRISTATE_NO = 0, - PCILIB_TRISTATE_PARTIAL = 1, - PCILIB_TRISTATE_YES = 2 -} pcilib_tristate_t; - -#include "pci.h" - -int pcilib_isnumber(const char *str); -int pcilib_isxnumber(const char *str); -int pcilib_isnumber_n(const char *str, size_t len); -int pcilib_isxnumber_n(const char *str, size_t len); - -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 endianess); - -int pcilib_get_page_mask(); -int pcilib_get_cpu_count(); - - -int pcilib_add_timeout(struct timeval *tv, pcilib_timeout_t timeout); -int pcilib_calc_deadline(struct timeval *tv, pcilib_timeout_t timeout); -int pcilib_check_deadline(struct timeval *tve, pcilib_timeout_t timeout); -pcilib_timeout_t pcilib_calc_time_to_deadline(struct timeval *tve); -int pcilib_sleep_until_deadline(struct timeval *tv); -int pcilib_timecmp(struct timeval *tv1, struct timeval *tv2); -pcilib_timeout_t pcilib_timediff(struct timeval *tve, struct timeval *tvs); - -#endif /* _PCITOOL_TOOS_H */ |