PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
usbhd_common.h
1#ifndef _USBHD_COMMON_H
2#define _USBHD_COMMON_H
3
4#ifdef WIN32
5#define USBHD_INLINE
6typedef unsigned char u8;
7#else
8#define USBHD_INLINE inline
9extern void *malloc(int size);
10extern void free(void *ptr);
11#endif
12
13#ifdef BUILDING_IEEE1394_DISK
14struct _cache_set;
15typedef struct _cache_set cache_set;
16#endif /* BUILDING_IEEE1394_DISK */
17
18//---------------------------------------------------------------------------
19#define getUI32(buf) ((unsigned int)(((u8 *)(buf))[0] + \
20 (((u8 *)(buf))[1] << 8) + \
21 (((u8 *)(buf))[2] << 16) + \
22 (((u8 *)(buf))[3] << 24)))
23#define getUI32_2(buf1, buf2) ((unsigned int)(((u8 *)(buf1))[0] + \
24 (((u8 *)(buf1))[1] << 8) + \
25 (((u8 *)(buf2))[0] << 16) + \
26 (((u8 *)(buf2))[1] << 24)))
27#define getUI16(buf) ((unsigned int)(((u8 *)(buf))[0] + (((u8 *)(buf))[1] << 8)))
28
29#endif // _USBHD_COMMON_H