00001 #ifndef __NJB__USB__BYTEORDER__H 00002 #define __NJB__USB__BYTEORDER__H 00003 00004 u_int64_t njb1_bytes_to_64bit(unsigned char *dp); 00005 void from_64bit_to_njb1_bytes(u_int64_t val, unsigned char *dp); 00006 u_int32_t njb1_bytes_to_32bit(unsigned char *dp); 00007 u_int32_t njb3_bytes_to_32bit(unsigned char *dp); 00008 void from_32bit_to_njb1_bytes(u_int32_t val, unsigned char *dp); 00009 void from_32bit_to_njb3_bytes(u_int32_t val, unsigned char *dp); 00010 u_int16_t njb1_bytes_to_16bit(unsigned char *dp); 00011 u_int16_t njb3_bytes_to_16bit(unsigned char *dp); 00012 void from_16bit_to_njb1_bytes(u_int16_t val, unsigned char *dp); 00013 void from_16bit_to_njb3_bytes(u_int16_t val, unsigned char *dp); 00014 u_int16_t get_msw (u_int32_t word); 00015 u_int16_t get_lsw (u_int32_t word); 00016 u_int64_t make64 (u_int32_t msdw, u_int32_t lsdw); 00017 void split64 (u_int64_t num, u_int32_t *msdw, u_int32_t *lsdw); 00018 00019 #endif