LibXenon
Bare-metal Xbox 360 homebrew library
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
usbstorage.h File Reference
#include "ehci.h"
Include dependency graph for usbstorage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  usbstorage_handle
 

Macros

#define USBSTORAGE_OK   0
 
#define USBSTORAGE_ENOINTERFACE   -10000
 
#define USBSTORAGE_ESENSE   -10001
 
#define USBSTORAGE_ESHORTWRITE   -10002
 
#define USBSTORAGE_ESHORTREAD   -10003
 
#define USBSTORAGE_ESIGNATURE   -10004
 
#define USBSTORAGE_ETAG   -10005
 
#define USBSTORAGE_ESTATUS   -10006
 
#define USBSTORAGE_EDATARESIDUE   -10007
 
#define USBSTORAGE_ETIMEDOUT   -ETIMEDOUT
 
#define USBSTORAGE_EINIT   -10009
 
#define DEVICE_TYPE_WII_USB   (('W'<<24)|('U'<<16)|('S'<<8)|'B')
 

Functions

s32 USBStorage_Init (void)
 
void USBStorage_Umount (void)
 
s32 USBStorage_Close (usbstorage_handle *dev)
 
s32 USBStorage_Reset (struct ehci_hcd *ehci, usbstorage_handle *dev)
 
s32 USBStorage_GetMaxLUN (usbstorage_handle *dev)
 
s32 USBStorage_MountLUN (struct ehci_hcd *ehci, usbstorage_handle *dev, u8 lun)
 
s32 USBStorage_Suspend (usbstorage_handle *dev)
 
s32 USBStorage_ReadCapacity (struct ehci_hcd *ehci, usbstorage_handle *dev, u8 lun, u32 *sector_size, u32 *n_sectors)
 
s32 USBStorage_Read (struct ehci_hcd *ehci, usbstorage_handle *dev, u8 lun, u32 sector, u16 n_sectors, u8 *buffer)
 
s32 USBStorage_Write (struct ehci_hcd *ehci, usbstorage_handle *dev, u8 lun, u32 sector, u16 n_sectors, const u8 *buffer)
 
s32 USBStorage_Inquiry (struct ehci_hcd *ehci, usbstorage_handle *dev, u8 lun)
 

Macro Definition Documentation

◆ DEVICE_TYPE_WII_USB

#define DEVICE_TYPE_WII_USB   (('W'<<24)|('U'<<16)|('S'<<8)|'B')

Definition at line 65 of file usbstorage.h.

◆ USBSTORAGE_EDATARESIDUE

#define USBSTORAGE_EDATARESIDUE   -10007

Definition at line 20 of file usbstorage.h.

◆ USBSTORAGE_EINIT

#define USBSTORAGE_EINIT   -10009

Definition at line 22 of file usbstorage.h.

◆ USBSTORAGE_ENOINTERFACE

#define USBSTORAGE_ENOINTERFACE   -10000

Definition at line 13 of file usbstorage.h.

◆ USBSTORAGE_ESENSE

#define USBSTORAGE_ESENSE   -10001

Definition at line 14 of file usbstorage.h.

◆ USBSTORAGE_ESHORTREAD

#define USBSTORAGE_ESHORTREAD   -10003

Definition at line 16 of file usbstorage.h.

◆ USBSTORAGE_ESHORTWRITE

#define USBSTORAGE_ESHORTWRITE   -10002

Definition at line 15 of file usbstorage.h.

◆ USBSTORAGE_ESIGNATURE

#define USBSTORAGE_ESIGNATURE   -10004

Definition at line 17 of file usbstorage.h.

◆ USBSTORAGE_ESTATUS

#define USBSTORAGE_ESTATUS   -10006

Definition at line 19 of file usbstorage.h.

◆ USBSTORAGE_ETAG

#define USBSTORAGE_ETAG   -10005

Definition at line 18 of file usbstorage.h.

◆ USBSTORAGE_ETIMEDOUT

#define USBSTORAGE_ETIMEDOUT   -ETIMEDOUT

Definition at line 21 of file usbstorage.h.

◆ USBSTORAGE_OK

#define USBSTORAGE_OK   0

Definition at line 12 of file usbstorage.h.

Function Documentation

◆ USBStorage_Close()

s32 USBStorage_Close ( usbstorage_handle dev)

Definition at line 878 of file usbstorage.c.

◆ USBStorage_GetMaxLUN()

s32 USBStorage_GetMaxLUN ( usbstorage_handle dev)

Definition at line 894 of file usbstorage.c.

◆ USBStorage_Init()

s32 USBStorage_Init ( void  )

Definition at line 1215 of file usbstorage.c.

◆ USBStorage_Inquiry()

s32 USBStorage_Inquiry ( struct ehci_hcd ehci,
usbstorage_handle dev,
u8  lun 
)

Definition at line 935 of file usbstorage.c.

◆ USBStorage_MountLUN()

s32 USBStorage_MountLUN ( struct ehci_hcd ehci,
usbstorage_handle dev,
u8  lun 
)

Definition at line 899 of file usbstorage.c.

◆ USBStorage_Read()

s32 USBStorage_Read ( struct ehci_hcd ehci,
usbstorage_handle dev,
u8  lun,
u32  sector,
u16  n_sectors,
u8 buffer 
)

Definition at line 1017 of file usbstorage.c.

◆ USBStorage_ReadCapacity()

s32 USBStorage_ReadCapacity ( struct ehci_hcd ehci,
usbstorage_handle dev,
u8  lun,
u32 sector_size,
u32 n_sectors 
)

Definition at line 948 of file usbstorage.c.

◆ USBStorage_Reset()

s32 USBStorage_Reset ( struct ehci_hcd ehci,
usbstorage_handle dev 
)

Definition at line 886 of file usbstorage.c.

◆ USBStorage_Suspend()

s32 USBStorage_Suspend ( usbstorage_handle dev)

◆ USBStorage_Umount()

void USBStorage_Umount ( void  )

◆ USBStorage_Write()

s32 USBStorage_Write ( struct ehci_hcd ehci,
usbstorage_handle dev,
u8  lun,
u32  sector,
u16  n_sectors,
const u8 buffer 
)

Definition at line 1037 of file usbstorage.c.