1 #ifndef __USBSTORAGE_H__
2 #define __USBSTORAGE_H__
8 #endif /* __cplusplus */
12 #include <ogc/disc_io.h>
14 #define USBSTORAGE_OK 0
15 #define USBSTORAGE_ENOINTERFACE -10000
16 #define USBSTORAGE_ESENSE -10001
17 #define USBSTORAGE_ESHORTWRITE -10002
18 #define USBSTORAGE_ESHORTREAD -10003
19 #define USBSTORAGE_ESIGNATURE -10004
20 #define USBSTORAGE_ETAG -10005
21 #define USBSTORAGE_ESTATUS -10006
22 #define USBSTORAGE_EDATARESIDUE -10007
23 #define USBSTORAGE_ETIMEDOUT -10008
24 #define USBSTORAGE_EINIT -10009
50 s32
USBStorage_Initialize();
52 s32
USBStorage_Open(usbstorage_handle
*dev
, const char *bus
, u16 vid
, u16 pid
);
53 s32
USBStorage_Close(usbstorage_handle
*dev
);
54 s32
USBStorage_Reset(usbstorage_handle
*dev
);
56 s32
USBStorage_GetMaxLUN(usbstorage_handle
*dev
);
57 s32
USBStorage_MountLUN(usbstorage_handle
*dev
, u8 lun
);
58 s32
USBStorage_Suspend(usbstorage_handle
*dev
);
60 s32
USBStorage_ReadCapacity(usbstorage_handle
*dev
, u8 lun
, u32
*sector_size
, u32
*n_sectors
);
61 s32
USBStorage_Read(usbstorage_handle
*dev
, u8 lun
, u32 sector
, u16 n_sectors
, u8
*buffer
);
62 s32
USBStorage_Write(usbstorage_handle
*dev
, u8 lun
, u32 sector
, u16 n_sectors
, const u8
*buffer
);
64 #define DEVICE_TYPE_WII_USB (('W'<<24)|('U'<<16)|('S'<<8)|'B')
66 extern const DISC_INTERFACE __io_usbstorage
;
70 #endif /* __cplusplus */
74 #endif /* __USBSTORAGE_H__ */