1 #ifndef __USBSTORAGE_H__
2 #define __USBSTORAGE_H__
8 #include <ogc/disc_io.h>
12 #endif /* __cplusplus */
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
25 #define USBSTORAGE_PROCESSING -10010
51 s32
USBStorage_Initialize();
53 s32
USBStorage_Open(usbstorage_handle
*dev
, s32 device_id
, u16 vid
, u16 pid
);
54 s32
USBStorage_Close(usbstorage_handle
*dev
);
55 s32
USBStorage_Reset(usbstorage_handle
*dev
);
57 s32
USBStorage_GetMaxLUN(usbstorage_handle
*dev
);
58 s32
USBStorage_MountLUN(usbstorage_handle
*dev
, u8 lun
);
59 s32
USBStorage_Suspend(usbstorage_handle
*dev
);
61 s32
USBStorage_ReadCapacity(usbstorage_handle
*dev
, u8 lun
, u32
*sector_size
, u32
*n_sectors
);
62 s32
USBStorage_Read(usbstorage_handle
*dev
, u8 lun
, u32 sector
, u16 n_sectors
, u8
*buffer
);
63 s32
USBStorage_Write(usbstorage_handle
*dev
, u8 lun
, u32 sector
, u16 n_sectors
, const u8
*buffer
);
64 s32
USBStorage_StartStop(usbstorage_handle
*dev
, u8 lun
, u8 lo_ej
, u8 start
, u8 imm
);
66 #define DEVICE_TYPE_WII_USB (('W'<<24)|('U'<<16)|('S'<<8)|'B')
68 extern DISC_INTERFACE __io_usbstorage
;
72 #endif /* __cplusplus */
76 #endif /* __USBSTORAGE_H__ */