PS2SDK
PS2 Homebrew Libraries
|
Go to the source code of this file.
Data Structures | |
struct | _argOption |
struct | _usbdConfig |
struct | _timerCbStruct |
struct | _ioRequest |
struct | _device |
struct | _hcTd |
struct | _hcIsoTd |
struct | _hcEdHcArea |
union | _hcEdHcAreaU |
struct | _hcEd |
struct | _endpoint |
struct | _usbHub |
struct | _hcCA |
struct | _ohciRegs |
struct | _memPool |
struct | _usbdReportDescriptor |
struct | _usbdKernelResources |
union | _ioRequest.__unnamed163__ |
Macros | |
#define | OHCI_REG_BASE 0xBF801600 |
#define | dbg_printf(a...) (void)0 |
#define | READ_UINT16(a) (((u8 *)a)[0] | (((u8 *)a)[1] << 8)) |
#define | NOTIN_QUEUE 0 |
#define | GENTD_QUEUE 1 |
#define | ISOTD_QUEUE 2 |
#define | TYPE_CONTROL 0x3F |
#define | TYPE_BULK 0x40 |
#define | TYPE_ISOCHRON 0x41 |
#define | DEVICE_NOTCONNECTED 1 |
#define | DEVICE_CONNECTED 3 |
#define | DEVICE_RESETDELAYED 4 |
#define | DEVICE_RESETPENDING 5 |
#define | DEVICE_RESETCOMPLETE 6 |
#define | DEVICE_FETCHINGDESCRIPTOR 7 |
#define | DEVICE_READY 8 |
#define | PORT_CONNECTION 0 |
#define | PORT_ENABLE 1 |
#define | PORT_SUSPEND 2 |
#define | PORT_OVER_CURRENT 3 |
#define | PORT_RESET 4 |
#define | PORT_POWER 8 |
#define | PORT_LOW_SPEED 9 |
#define | C_HUB_LOCAL_POWER 0 |
#define | C_HUB_OVER_CURRENT 1 |
#define | C_PORT_CONNECTION 16 |
#define | C_PORT_ENABLE 17 |
#define | C_PORT_SUSPEND 18 |
#define | C_PORT_OVER_CURRENT 19 |
#define | C_PORT_RESET 20 |
#define | BIT(x) (((u32)1) << (x)) |
#define | C_PORT_FLAGS (BIT(C_PORT_CONNECTION) | BIT(C_PORT_ENABLE) | BIT(C_PORT_SUSPEND) | BIT(C_PORT_OVER_CURRENT) | BIT(C_PORT_RESET)) |
#define | HCED_DIR_OUT BIT(11) |
#define | HCED_DIR_IN BIT(12) |
#define | HCED_SPEED BIT(13) |
#define | HCED_SKIP BIT(14) |
#define | HCED_ISOC BIT(15) |
#define | HCED_DIR_MASK (HCED_DIR_OUT | HCED_DIR_IN) |
#define | ED_HALTED(a) ((u32)((a).m_tdHead) & 1) |
#define | ED_SKIPPED(a) ((u32)((a).m_hcArea.stru.m_hcArea) & HCED_SKIP) |
#define | TD_HCAREA(CC, T, DI, DP, R) (u32)((((CC) << 12) | ((T) << 8) | ((DI) << 5) | ((DP) << 3) | ((R) << 2))) |
#define | TD_SETUP 0 |
#define | TD_OUT 1 |
#define | TD_IN 2 |
#define | OHCI_INT_SO BIT(0) |
#define | OHCI_INT_WDH BIT(1) |
#define | OHCI_INT_SF BIT(2) |
#define | OHCI_INT_RD BIT(3) |
#define | OHCI_INT_UE BIT(4) |
#define | OHCI_INT_FNO BIT(5) |
#define | OHCI_INT_RHSC BIT(6) |
#define | OHCI_INT_OC BIT(30) |
#define | OHCI_INT_MIE BIT(31) |
#define | OHCI_COM_HCR BIT(0) |
#define | OHCI_COM_CLF BIT(1) |
#define | OHCI_COM_BLF BIT(2) |
#define | OHCI_CTR_CBSR (3 << 0) |
#define | OHCI_CTR_PLE BIT(2) |
#define | OHCI_CTR_IE BIT(3) |
#define | OHCI_CTR_CLE BIT(4) |
#define | OHCI_CTR_BLE BIT(5) |
#define | OHCI_CTR_USB_RESET (0 << 6) |
#define | OHCI_CTR_USB_RESUME (1 << 6) |
#define | OHCI_CTR_USB_OPERATIONAL (2 << 6) |
#define | OHCI_CTR_USB_SUSPEND (3 << 6) |
Typedefs | |
typedef struct _argOption | UsbdArgOption_t |
typedef struct _usbdConfig | UsbdConfig_t |
typedef void(* | TimerCallback) (void *arg) |
typedef void(* | InternCallback) (struct _ioRequest *arg) |
typedef struct _timerCbStruct | UsbdTimerCbStruct_t |
typedef struct _ioRequest | UsbdIoRequest_t |
typedef struct _device | UsbdDevice_t |
typedef struct _hcTd | UsbdHcTD_t |
typedef struct _hcIsoTd | UsbdHcIsoTD_t |
typedef struct _hcEd | UsbdHcED_t |
typedef struct _endpoint | UsbdEndpoint_t |
typedef struct _usbHub | UsbdUsbHub_t |
typedef struct _hcCA | HcCA |
typedef struct _ohciRegs | OhciRegs |
typedef struct _memPool | UsbdMemoryPool_t |
typedef struct _usbdReportDescriptor | UsbdReportDescriptor_t |
typedef struct _usbdKernelResources | UsbdKernelResources_t |
USB Driver function prototypes and constants.
Definition in file usbdpriv.h.
struct _argOption |
Definition at line 35 of file usbdpriv.h.
Data Fields | ||
---|---|---|
const char * | param | |
int * | value | |
int * | value2 |
struct _usbdConfig |
Definition at line 42 of file usbdpriv.h.
struct _timerCbStruct |
Definition at line 72 of file usbdpriv.h.
Data Fields | ||
---|---|---|
u32 | m_isActive | |
struct _timerCbStruct * | m_prev | |
struct _timerCbStruct * | m_next | |
TimerCallback | m_callbackProc | |
void * | m_callbackArg | |
u32 | m_delayCount |
struct _ioRequest |
Definition at line 82 of file usbdpriv.h.
Data Fields | ||
---|---|---|
u32 | m_id | |
u32 | m_busyFlag | |
struct _ioRequest * | m_next | |
struct _ioRequest * | m_prev | |
struct _endpoint * | m_correspEndpoint | |
UsbDeviceRequest | m_devReq | |
void * | m_destPtr | |
u32 | m_length | |
InternCallback | m_callbackProc | |
u32 | m_resultCode | |
u32 | m_transferedBytes | |
u32 | m_waitFrames | |
void * | m_userCallbackArg | |
union _ioRequest.__unnamed163__ | __unnamed__ | |
void * | m_gpSeg | |
sceUsbdMultiIsochronousRequest | m_req |
struct _device |
Definition at line 107 of file usbdpriv.h.
Data Fields | ||
---|---|---|
u32 | m_id | |
struct _device * | m_next | |
struct _device * | m_prev | |
struct _endpoint * | m_endpointListStart | |
struct _endpoint * | m_endpointListEnd | |
sceUsbdLddOps * | m_devDriver | |
u8 | m_deviceStatus | |
u8 | m_functionAddress | |
u8 | m_isLowSpeedDevice | |
u8 | m_resetFlag | |
u32 | m_magicPowerValue | |
struct _device * | m_childListStart | |
struct _device * | m_childListEnd | |
struct _device * | m_parent | |
u32 | m_attachedToPortNo | |
void * | m_privDataField | |
UsbdTimerCbStruct_t | m_timer | |
UsbdIoRequest_t | m_ioRequest | |
u32 | m_functionDelay | |
void * | m_staticDeviceDescPtr | |
void * | m_staticDeviceDescEndPtr | |
u32 | m_fetchDescriptorCounter | |
struct _usbdReportDescriptor * | m_reportDescriptorCurForFetch | |
struct _usbdReportDescriptor * | m_reportDescriptorStart | |
struct _usbdReportDescriptor * | m_reportDescriptorEnd |
struct _hcTd |
Definition at line 136 of file usbdpriv.h.
Data Fields | ||
---|---|---|
u32 | m_hcArea | |
void * | m_curBufPtr | |
struct _hcTd * | m_next | |
void * | m_bufferEnd |
struct _hcIsoTd |
Definition at line 144 of file usbdpriv.h.
Data Fields | ||
---|---|---|
u32 | m_hcArea | |
void * | m_bufferPage0 | |
struct _hcIsoTd * | m_next | |
void * | m_bufferEnd | |
u16 | m_psw[8] |
struct _hcEdHcArea |
Definition at line 153 of file usbdpriv.h.
Data Fields | ||
---|---|---|
u16 | m_hcArea | |
u16 | m_maxPacketSize |
union _hcEdHcAreaU |
Definition at line 159 of file usbdpriv.h.
Data Fields | ||
---|---|---|
struct _hcEdHcArea | stru | |
u32 | asu32 |
struct _hcEd |
Definition at line 165 of file usbdpriv.h.
Data Fields | ||
---|---|---|
union _hcEdHcAreaU | m_hcArea | |
UsbdHcTD_t * | m_tdTail | |
UsbdHcTD_t * | m_tdHead | |
struct _hcEd * | m_next |
struct _endpoint |
Definition at line 173 of file usbdpriv.h.
Data Fields | ||
---|---|---|
u32 | m_id | |
u32 | m_inTdQueue | |
struct _endpoint * | m_next | |
struct _endpoint * | m_prev | |
struct _endpoint * | m_busyNext | |
struct _endpoint * | m_busyPrev | |
UsbdDevice_t * | m_correspDevice | |
UsbdIoRequest_t * | m_ioReqListStart | |
UsbdIoRequest_t * | m_ioReqListEnd | |
UsbdHcED_t * | m_hcEd | |
u32 | m_endpointType | |
u32 | m_isochronLastFrameNum | |
UsbdTimerCbStruct_t | m_timer | |
u32 | m_alignFlag | |
u8 | m_schedulingIndex | |
u8 | m_waitHigh | |
u8 | m_waitLow | |
u8 | m_packetSizeForScheduling |
struct _usbHub |
Definition at line 195 of file usbdpriv.h.
Data Fields | ||
---|---|---|
struct _usbHub * | m_next | |
u32 | m_pad1[1] | |
u32 | m_curAllocatedCount | |
UsbdDevice_t * | m_dev | |
UsbdEndpoint_t * | m_controlEp | |
UsbdEndpoint_t * | m_statusChangeEp | |
UsbdIoRequest_t | m_controlIoReq | |
UsbdIoRequest_t | m_statusIoReq | |
u32 | m_maxPower | |
u32 | m_isSelfPowered | |
UsbHubDescriptor | m_desc | |
u32 | m_pad2[6] | |
u32 | m_numChildDevices | |
u32 | m_portCounter | |
u32 | m_hubStatusCounter | |
u16 | m_hubStatus | |
u16 | m_hubStatusChange | |
u32 | m_portStatusChange | |
u8 | m_statusChangeInfo[8] | |
u32 | m_pad3[6] |
struct _hcCA |
Definition at line 219 of file usbdpriv.h.
Data Fields | ||
---|---|---|
volatile UsbdHcED_t * | InterruptTable[32] | |
volatile u16 | FrameNumber | |
volatile u16 | pad | |
volatile UsbdHcTD_t * | DoneHead | |
volatile u8 | reserved[116] | |
volatile u32 | pad2 |
struct _ohciRegs |
Definition at line 229 of file usbdpriv.h.
Data Fields | ||
---|---|---|
volatile u32 | HcRevision | |
volatile u32 | HcControl | |
volatile u32 | HcCommandStatus | |
volatile u32 | HcInterruptStatus | |
volatile u32 | HcInterruptEnable | |
volatile u32 | HcInterruptDisable | |
volatile HcCA * | HcHCCA | |
volatile UsbdHcED_t * | HcPeriodCurrentEd | |
volatile UsbdHcED_t * | HcControlHeadEd | |
volatile UsbdHcED_t * | HcControlCurrentEd | |
volatile UsbdHcED_t * | HcBulkHeadEd | |
volatile UsbdHcED_t * | HcBulkCurrentEd | |
volatile u32 | HcDoneHead | |
volatile u32 | HcFmInterval | |
volatile u32 | HcFmRemaining | |
volatile u32 | HcFmNumber | |
volatile u32 | HcPeriodicStart | |
volatile u32 | HcLsThreshold | |
volatile u32 | HcRhDescriptorA | |
volatile u32 | HcRhDescriptorB | |
volatile u32 | HcRhStatus | |
volatile u32 | HcRhPortStatus[2] |
struct _memPool |
Definition at line 255 of file usbdpriv.h.
Data Fields | ||
---|---|---|
volatile OhciRegs * | m_ohciRegs | |
volatile HcCA * | m_hcHCCA | |
struct _hcEd * | m_hcEdBuf | |
struct _hcTd * | m_freeHcTdList | |
struct _hcTd * | m_hcTdBuf | |
struct _hcTd * | m_hcTdBufEnd | |
struct _hcIsoTd * | m_freeHcIsoTdList | |
struct _hcIsoTd * | m_hcIsoTdBuf | |
struct _hcIsoTd * | m_hcIsoTdBufEnd | |
struct _ioRequest ** | m_hcTdToIoReqLUT | |
struct _ioRequest ** | m_hcIsoTdToIoReqLUT | |
struct _ioRequest * | m_ioReqBufPtr | |
struct _ioRequest * | m_freeIoReqList | |
struct _ioRequest * | m_freeIoReqListEnd | |
struct _device * | m_deviceTreeBuf | |
struct _device * | m_freeDeviceListStart | |
struct _device * | m_freeDeviceListEnd | |
struct _endpoint * | m_endpointBuf | |
struct _endpoint * | m_freeEpListStart | |
struct _endpoint * | m_freeEpListEnd | |
struct _endpoint * | m_tdQueueStart | |
struct _endpoint * | m_tdQueueEnd | |
u32 | m_interruptBandwidthSchedulingValues[32] | |
u32 | m_delayResets | |
int | m_interruptCounters[9] | |
struct _timerCbStruct * | m_timerListStart | |
struct _timerCbStruct * | m_timerListEnd | |
struct _device * | m_deviceTreeRoot |
struct _usbdReportDescriptor |
Definition at line 298 of file usbdpriv.h.
Data Fields | ||
---|---|---|
struct _usbdReportDescriptor * | m_next | |
struct _usbdReportDescriptor * | m_prev | |
u32 | m_cfgNum | |
u32 | m_ifNum | |
u32 | m_length | |
u8 | m_data[] |
struct _usbdKernelResources |
Definition at line 308 of file usbdpriv.h.
Data Fields | ||
---|---|---|
int | m_usbdSema | |
int | m_hcdTid | |
int | m_hcdIrqEvent | |
int | m_callbackTid | |
int | m_callbackEvent |
union _ioRequest.__unnamed163__ |
Definition at line 97 of file usbdpriv.h.
Data Fields | ||
---|---|---|
void * | m_userCallbackProc | |
sceUsbdDoneCallback | m_userCallbackProcRegular | |
sceUsbdMultiIsochronousDoneCallback | m_userCallbackProcMultiIsochronous |
#define OHCI_REG_BASE 0xBF801600 |
Definition at line 25 of file usbdpriv.h.
#define dbg_printf | ( | a... | ) | (void)0 |
Definition at line 30 of file usbdpriv.h.
#define READ_UINT16 | ( | a | ) | (((u8 *)a)[0] | (((u8 *)a)[1] << 8)) |
Definition at line 33 of file usbdpriv.h.
#define NOTIN_QUEUE 0 |
Definition at line 317 of file usbdpriv.h.
#define GENTD_QUEUE 1 |
Definition at line 318 of file usbdpriv.h.
#define ISOTD_QUEUE 2 |
Definition at line 319 of file usbdpriv.h.
#define TYPE_CONTROL 0x3F |
Definition at line 321 of file usbdpriv.h.
#define TYPE_BULK 0x40 |
Definition at line 322 of file usbdpriv.h.
#define TYPE_ISOCHRON 0x41 |
Definition at line 323 of file usbdpriv.h.
#define DEVICE_NOTCONNECTED 1 |
Definition at line 325 of file usbdpriv.h.
#define DEVICE_CONNECTED 3 |
Definition at line 326 of file usbdpriv.h.
#define DEVICE_RESETDELAYED 4 |
Definition at line 327 of file usbdpriv.h.
#define DEVICE_RESETPENDING 5 |
Definition at line 328 of file usbdpriv.h.
#define DEVICE_RESETCOMPLETE 6 |
Definition at line 329 of file usbdpriv.h.
#define DEVICE_FETCHINGDESCRIPTOR 7 |
Definition at line 330 of file usbdpriv.h.
#define DEVICE_READY 8 |
Definition at line 331 of file usbdpriv.h.
#define PORT_CONNECTION 0 |
Definition at line 333 of file usbdpriv.h.
#define PORT_ENABLE 1 |
Definition at line 334 of file usbdpriv.h.
#define PORT_SUSPEND 2 |
Definition at line 335 of file usbdpriv.h.
#define PORT_OVER_CURRENT 3 |
Definition at line 336 of file usbdpriv.h.
#define PORT_RESET 4 |
Definition at line 337 of file usbdpriv.h.
#define PORT_POWER 8 |
Definition at line 338 of file usbdpriv.h.
#define PORT_LOW_SPEED 9 |
Definition at line 339 of file usbdpriv.h.
#define C_HUB_LOCAL_POWER 0 |
Definition at line 341 of file usbdpriv.h.
#define C_HUB_OVER_CURRENT 1 |
Definition at line 342 of file usbdpriv.h.
#define C_PORT_CONNECTION 16 |
Definition at line 344 of file usbdpriv.h.
#define C_PORT_ENABLE 17 |
Definition at line 345 of file usbdpriv.h.
#define C_PORT_SUSPEND 18 |
Definition at line 346 of file usbdpriv.h.
#define C_PORT_OVER_CURRENT 19 |
Definition at line 347 of file usbdpriv.h.
#define C_PORT_RESET 20 |
Definition at line 348 of file usbdpriv.h.
#define BIT | ( | x | ) | (((u32)1) << (x)) |
Definition at line 350 of file usbdpriv.h.
#define C_PORT_FLAGS (BIT(C_PORT_CONNECTION) | BIT(C_PORT_ENABLE) | BIT(C_PORT_SUSPEND) | BIT(C_PORT_OVER_CURRENT) | BIT(C_PORT_RESET)) |
Definition at line 352 of file usbdpriv.h.
#define HCED_DIR_OUT BIT(11) |
Definition at line 355 of file usbdpriv.h.
#define HCED_DIR_IN BIT(12) |
Definition at line 356 of file usbdpriv.h.
#define HCED_SPEED BIT(13) |
Definition at line 357 of file usbdpriv.h.
#define HCED_SKIP BIT(14) |
Definition at line 358 of file usbdpriv.h.
#define HCED_ISOC BIT(15) |
Definition at line 359 of file usbdpriv.h.
#define HCED_DIR_MASK (HCED_DIR_OUT | HCED_DIR_IN) |
Definition at line 360 of file usbdpriv.h.
#define ED_HALTED | ( | a | ) | ((u32)((a).m_tdHead) & 1) |
Definition at line 362 of file usbdpriv.h.
#define ED_SKIPPED | ( | a | ) | ((u32)((a).m_hcArea.stru.m_hcArea) & HCED_SKIP) |
Definition at line 363 of file usbdpriv.h.
#define TD_HCAREA | ( | CC, | |
T, | |||
DI, | |||
DP, | |||
R | |||
) | (u32)((((CC) << 12) | ((T) << 8) | ((DI) << 5) | ((DP) << 3) | ((R) << 2))) |
Definition at line 365 of file usbdpriv.h.
#define TD_SETUP 0 |
Definition at line 367 of file usbdpriv.h.
#define TD_OUT 1 |
Definition at line 368 of file usbdpriv.h.
#define TD_IN 2 |
Definition at line 369 of file usbdpriv.h.
#define OHCI_INT_SO BIT(0) |
Definition at line 371 of file usbdpriv.h.
#define OHCI_INT_WDH BIT(1) |
Definition at line 372 of file usbdpriv.h.
#define OHCI_INT_SF BIT(2) |
Definition at line 373 of file usbdpriv.h.
#define OHCI_INT_RD BIT(3) |
Definition at line 374 of file usbdpriv.h.
#define OHCI_INT_UE BIT(4) |
Definition at line 375 of file usbdpriv.h.
#define OHCI_INT_FNO BIT(5) |
Definition at line 376 of file usbdpriv.h.
#define OHCI_INT_RHSC BIT(6) |
Definition at line 377 of file usbdpriv.h.
#define OHCI_INT_OC BIT(30) |
Definition at line 378 of file usbdpriv.h.
#define OHCI_INT_MIE BIT(31) |
Definition at line 379 of file usbdpriv.h.
#define OHCI_COM_HCR BIT(0) |
Definition at line 381 of file usbdpriv.h.
#define OHCI_COM_CLF BIT(1) |
Definition at line 382 of file usbdpriv.h.
#define OHCI_COM_BLF BIT(2) |
Definition at line 383 of file usbdpriv.h.
#define OHCI_CTR_CBSR (3 << 0) |
Definition at line 385 of file usbdpriv.h.
#define OHCI_CTR_PLE BIT(2) |
Definition at line 386 of file usbdpriv.h.
#define OHCI_CTR_IE BIT(3) |
Definition at line 387 of file usbdpriv.h.
#define OHCI_CTR_CLE BIT(4) |
Definition at line 388 of file usbdpriv.h.
#define OHCI_CTR_BLE BIT(5) |
Definition at line 389 of file usbdpriv.h.
#define OHCI_CTR_USB_RESET (0 << 6) |
Definition at line 390 of file usbdpriv.h.
#define OHCI_CTR_USB_RESUME (1 << 6) |
Definition at line 391 of file usbdpriv.h.
#define OHCI_CTR_USB_OPERATIONAL (2 << 6) |
Definition at line 392 of file usbdpriv.h.
#define OHCI_CTR_USB_SUSPEND (3 << 6) |
Definition at line 393 of file usbdpriv.h.
typedef void(* TimerCallback) (void *arg) |
Definition at line 69 of file usbdpriv.h.
typedef void(* InternCallback) (struct _ioRequest *arg) |
Definition at line 70 of file usbdpriv.h.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Definition at line 146 of file endpoint.c.
|
extern |
Definition at line 311 of file endpoint.c.
|
extern |
Definition at line 345 of file io_request.c.
|
extern |
Definition at line 13 of file hub_resets.c.
|
extern |
Definition at line 19 of file hub_resets.c.
|
extern |
Definition at line 60 of file hub_resets.c.
|
extern |
Definition at line 68 of file hub_resets.c.
|
extern |
Definition at line 29 of file td_queue.c.
|
extern |
Definition at line 143 of file td_queue.c.
|
extern |
Definition at line 13 of file usbd_sys.c.
|
extern |
Definition at line 24 of file usbd_sys.c.
|
extern |
Definition at line 35 of file usbd_sys.c.
|
extern |
Definition at line 40 of file usbd_sys.c.
|
extern |
Definition at line 149 of file usbd_main.c.
|
extern |
Definition at line 13 of file report_descriptor_init.c.
|
extern |
Definition at line 13 of file device_driver.c.
|
extern |
Definition at line 57 of file device_driver.c.
|
extern |
Definition at line 82 of file device_driver.c.
|
extern |
Definition at line 127 of file device_driver.c.
|
extern |
Definition at line 148 of file device_driver.c.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Definition at line 488 of file usbdpriv.h.
|
extern |
Definition at line 35 of file usbd_main.c.
|
extern |
Definition at line 36 of file usbd_main.c.
|
extern |
Definition at line 37 of file usbd_main.c.
|
extern |
Definition at line 38 of file usbd_main.c.
|
extern |
Definition at line 70 of file usbd_main.c.
|
extern |
Definition at line 71 of file usbd_main.c.
|
extern |
Definition at line 72 of file usbd_main.c.