#ifndef __BITLIB_INCLUDE__ #define __BITLIB_INCLUDE__ /****************************************************************************** * includes *****************************************************************************/ #include #include #include #include #include "embtypes.h" /****************************************************************************** * defines *****************************************************************************/ /****************************************************************************** * structs & typedefs *****************************************************************************/ typedef struct _bit_struct { const uint8_t *ptr; int bit; int max; int consumed; } BIT_Stream; /****************************************************************************** * function prototypes *****************************************************************************/ /* export C functions to C++ */ #ifdef __cplusplus extern "C" { #endif BYTE reverseByteBits(BYTE b); void enableBitDebug(int flag); int getBitDirect(const uint8_t *pkt, int bit); uint64_t getBitsDirect(const uint8_t *pkt, int bit, int bits); uint64_t getBitsStream(BIT_Stream *ptr, int bits); #ifdef __cplusplus } #endif /****************************************************************************** * Macros * ***************************************************************************/ #endif