mgh: fix for default HDD DMA mode, that wasn't correctly set
[open-ps2-loader.git] / modules / usb / usbhdfsd / usbhd_common.h
blob1e3ce4555bbb5101b7ea1cf9577c3eb85853ba5c
1 #ifndef _USBHD_COMMON_H
2 #define _USBHD_COMMON_H
4 #ifdef WIN32
5 #define USBHD_INLINE
6 typedef unsigned char u8;
7 #else
8 #define USBHD_INLINE inline
9 #endif
11 struct _cache_set;
12 typedef struct _cache_set cache_set;
13 struct _mass_dev;
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