1 #ifndef _USBHD_COMMON_H
2 #define _USBHD_COMMON_H
6 typedef unsigned char u8
;
8 #define USBHD_INLINE inline
12 typedef struct _cache_set cache_set
;
14 typedef struct _mass_dev mass_dev
;
16 //---------------------------------------------------------------------------
17 static USBHD_INLINE
int getI32(unsigned char* buf
)
19 return (buf
[0] + (buf
[1] <<8) + (buf
[2] << 16) + (buf
[3] << 24));
22 //---------------------------------------------------------------------------
23 static USBHD_INLINE
int getI32_2(unsigned char* buf1
, unsigned char* buf2
)
25 return (buf1
[0] + (buf1
[1] <<8) + (buf2
[0] << 16) + (buf2
[1] << 24));
28 //---------------------------------------------------------------------------
29 static USBHD_INLINE
int getI16(unsigned char* buf
)
31 return (buf
[0] + (buf
[1] <<8) );
34 #endif // _USBHD_COMMON_H