10 #define __ZEDA_BIT_H__ 21 #define Z_ENDIAN_UNKNOWN 9999 22 #define Z_ENDIAN_LITTLE 1234 23 #define Z_ENDIAN_BIG 4321 115 #define printf_bit(v,w) fprintf_bit( stdout, (v), (w) ) 117 void printk_bit(
ulong val,
int width);
ulong bit_reverse(ulong val, int bitwidth)
reverse a bit sequence.
uint16_t endian_reverse16(uint16_t val)
convert 16-bit little/big endian to big/little endian.
void fprintf_bit(FILE *fp, ulong val, int width)
output a bit sequence to a file in binary format.
#define __END_DECLS
Definition: zeda_defs.h:30
void sprintf_bit(char *str, ulong val, int width)
convert a bit sequence to a string in binary format.
unsigned long long int uint64_t
Definition: zeda_defs.h:68
uint32_t endian_reverse32(uint32_t val)
convert 32-bit little/big endian to big/little endian.
int endian_check(void)
check type of endian of the current architecture.
unsigned short int uint16_t
Definition: zeda_defs.h:63
uint64_t endian_reverse64(uint64_t val)
convert 64-bit little/big endian to big/little endian.
unsigned int uint32_t
Definition: zeda_defs.h:64
#define __BEGIN_DECLS
Definition: zeda_defs.h:26
unsigned long ulong
Definition: zeda_defs.h:105
#define __EXPORT
Definition: zeda_compat.h:32
ulong bit_rotate(ulong val, int bitwidth, int d)
rotate a bit sequence.