PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
usbhdfsd.h File Reference
#include <types.h>
#include <irx.h>
#include <usbhdfsd-common.h>
+ Include dependency graph for usbhdfsd.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  UsbMassDeviceInfo
 
struct  _cache_record
 
struct  _cache_set
 
struct  _mass_dev
 
struct  _fat_bpb
 
struct  _fat_driver
 

Macros

#define CACHE_SIZE   32
 
#define MAX_DIR_CLUSTER   512
 
#define MAX_DE_STACK   21
 
#define SEQ_MASK_SIZE   2048
 
#define DIR_MASK_SIZE   2048 * 11
 
#define MAX_CLUSTER_STACK   128
 
#define usbmass_IMPORTS_start   DECLARE_IMPORT_TABLE(usbmass, 1, 2)
 
#define usbmass_IMPORTS_end   END_IMPORT_TABLE
 
#define I_UsbMassGetDeviceInfo   DECLARE_IMPORT(4, UsbMassGetDeviceInfo)
 
#define I_UsbMassRegisterCallback   DECLARE_IMPORT(5, UsbMassRegisterCallback)
 
#define I_UsbMassFatGetData   DECLARE_IMPORT(6, UsbMassFatGetData)
 
#define I_UsbMassReadSector   DECLARE_IMPORT(7, UsbMassReadSector)
 
#define I_UsbMassWriteSector   DECLARE_IMPORT(8, UsbMassWriteSector)
 
#define I_UsbMassFlushCache   DECLARE_IMPORT(9, UsbMassFlushCache)
 
#define I_UsbMassFatGetClusterChain   DECLARE_IMPORT(10, UsbMassFatGetClusterChain)
 

Typedefs

typedef struct UsbMassDeviceInfo UsbMassDeviceInfo_t
 
typedef void(* usbmass_cb_t) (int cause)
 
typedef struct _mass_dev mass_dev
 
typedef struct _cache_record cache_record
 
typedef struct _fat_bpb fat_bpb
 
typedef struct _fat_driver fat_driver
 

Functions

int UsbMassGetDeviceInfo (int device, UsbMassDeviceInfo_t *info)
 
int UsbMassRegisterCallback (int device, usbmass_cb_t callback)
 
fat_driverUsbMassFatGetData (int device)
 
int UsbMassReadSector (fat_driver *fatd, void **buffer, u32 sector)
 
int UsbMassWriteSector (fat_driver *fatd, u32 sector)
 
void UsbMassFlushCache (fat_driver *fatd)
 
int UsbMassFatGetClusterChain (fat_driver *fatd, unsigned int cluster, unsigned int *buf, unsigned int bufSize, int startFlag)
 

Detailed Description

IOP USBHDFSD definitions.

Definition in file usbhdfsd.h.


Data Structure Documentation

◆ UsbMassDeviceInfo

struct UsbMassDeviceInfo

Definition at line 23 of file usbhdfsd.h.

Data Fields
unsigned short int status

If the CONNected bit is not set, the contents of the other fields of this structure are undefined.

unsigned short int SectorSize
unsigned int MaxLBA

◆ _cache_record

struct _cache_record

Definition at line 17 of file scache.h.

Data Fields
unsigned int sector
int tax
char writeDirty

◆ _cache_set

struct _cache_set

Definition at line 24 of file scache.h.

+ Collaboration diagram for _cache_set:
Data Fields
struct block_device * bd
unsigned int sectorSize
unsigned int indexLimit
unsigned char * sectorBuf
cache_record rec[CACHE_SIZE]
unsigned int cacheAccess
unsigned int cacheHits
unsigned int writeFlag
mass_dev * dev

◆ _fat_bpb

struct _fat_bpb

Definition at line 22 of file fat_driver.h.

Data Fields
unsigned int sectorSize
unsigned char clusterSize
unsigned int resSectors
unsigned char fatCount
unsigned int rootSize
unsigned int fatSize
unsigned int trackSize
unsigned int headCount
unsigned int sectorCount
unsigned int partStart
unsigned int rootDirStart
unsigned int rootDirCluster
unsigned int activeFat
unsigned char fatType
unsigned char fatId[9]
unsigned int dataStart

◆ _fat_driver

struct _fat_driver

Definition at line 42 of file fat_driver.h.

+ Collaboration diagram for _fat_driver:
Data Fields
struct block_device * bd
cache_set * cache
fat_bpb partBpb
unsigned int cbuf[MAX_DIR_CLUSTER]
unsigned int lastChainCluster
int lastChainResult
unsigned int deSec[MAX_DE_STACK]
int deOfs[MAX_DE_STACK]
int deIdx
u8 seq_mask[SEQ_MASK_SIZE/8]
u8 dir_used_mask[DIR_MASK_SIZE/8]
unsigned int clStack[MAX_CLUSTER_STACK]
int clStackIndex
unsigned int clStackLast
mass_dev * dev

Macro Definition Documentation

◆ CACHE_SIZE

#define CACHE_SIZE   32

Definition at line 39 of file usbhdfsd.h.

◆ MAX_DIR_CLUSTER

#define MAX_DIR_CLUSTER   512

Definition at line 107 of file usbhdfsd.h.

◆ MAX_DE_STACK

#define MAX_DE_STACK   21

Definition at line 114 of file usbhdfsd.h.

◆ SEQ_MASK_SIZE

#define SEQ_MASK_SIZE   2048

Definition at line 119 of file usbhdfsd.h.

◆ DIR_MASK_SIZE

#define DIR_MASK_SIZE   2048 * 11

Definition at line 121 of file usbhdfsd.h.

◆ MAX_CLUSTER_STACK

#define MAX_CLUSTER_STACK   128

Definition at line 124 of file usbhdfsd.h.

◆ usbmass_IMPORTS_start

#define usbmass_IMPORTS_start   DECLARE_IMPORT_TABLE(usbmass, 1, 2)

Definition at line 139 of file usbhdfsd.h.

◆ usbmass_IMPORTS_end

#define usbmass_IMPORTS_end   END_IMPORT_TABLE

Definition at line 140 of file usbhdfsd.h.

◆ I_UsbMassGetDeviceInfo

#define I_UsbMassGetDeviceInfo   DECLARE_IMPORT(4, UsbMassGetDeviceInfo)

Definition at line 142 of file usbhdfsd.h.

◆ I_UsbMassRegisterCallback

#define I_UsbMassRegisterCallback   DECLARE_IMPORT(5, UsbMassRegisterCallback)

Definition at line 143 of file usbhdfsd.h.

◆ I_UsbMassFatGetData

#define I_UsbMassFatGetData   DECLARE_IMPORT(6, UsbMassFatGetData)

Definition at line 144 of file usbhdfsd.h.

◆ I_UsbMassReadSector

#define I_UsbMassReadSector   DECLARE_IMPORT(7, UsbMassReadSector)

Definition at line 145 of file usbhdfsd.h.

◆ I_UsbMassWriteSector

#define I_UsbMassWriteSector   DECLARE_IMPORT(8, UsbMassWriteSector)

Definition at line 146 of file usbhdfsd.h.

◆ I_UsbMassFlushCache

#define I_UsbMassFlushCache   DECLARE_IMPORT(9, UsbMassFlushCache)

Definition at line 147 of file usbhdfsd.h.

◆ I_UsbMassFatGetClusterChain

#define I_UsbMassFatGetClusterChain   DECLARE_IMPORT(10, UsbMassFatGetClusterChain)

Definition at line 148 of file usbhdfsd.h.

Typedef Documentation

◆ usbmass_cb_t

typedef void(* usbmass_cb_t) (int cause)

Definition at line 31 of file usbhdfsd.h.

◆ mass_dev

typedef struct _mass_dev mass_dev

Definition at line 36 of file usbhdfsd.h.

Function Documentation

◆ UsbMassGetDeviceInfo()

int UsbMassGetDeviceInfo ( int device,
UsbMassDeviceInfo_t * info )
extern

Definition at line 1146 of file usb_driver.c.

◆ UsbMassRegisterCallback()

int UsbMassRegisterCallback ( int device,
usbmass_cb_t callback )
extern

Definition at line 1165 of file usb_driver.c.

◆ UsbMassReadSector()

int UsbMassReadSector ( fat_driver * fatd,
void ** buffer,
u32 sector )
extern

Definition at line 26 of file api.c.

◆ UsbMassWriteSector()

int UsbMassWriteSector ( fat_driver * fatd,
u32 sector )
extern

Definition at line 31 of file api.c.

◆ UsbMassFlushCache()

void UsbMassFlushCache ( fat_driver * fatd)
extern

Definition at line 36 of file api.c.