SceUdcd: Difference between revisions
CelesteBlue (talk | contribs) No edit summary |
No edit summary |
||
(46 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
== Module == | == Module == | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Version | ! Version !! World !! Privilege | ||
|- | |- | ||
| 1.69 | | 1.69-3.60 || Non-secure || Kernel | ||
|} | |} | ||
Line 28: | Line 25: | ||
|} | |} | ||
== | == Types == | ||
<source lang="c"> | |||
/** USB Status | |||
*/ | |||
typedef enum SceUdcdStatus { | |||
SCE_UDCD_STATUS_CONNECTION_NEW = 0x0001, | |||
SCE_UDCD_STATUS_CONNECTION_ESTABLISHED = 0x0002, | |||
SCE_UDCD_STATUS_CONNECTION_SUSPENDED = 0x0004, | |||
SCE_UDCD_STATUS_CABLE_DISCONNECTED = 0x0010, | |||
SCE_UDCD_STATUS_CABLE_CONNECTED = 0x0020, | |||
SCE_UDCD_STATUS_DEACTIVATED = 0x0100, | |||
SCE_UDCD_STATUS_ACTIVATED = 0x0200, | |||
SCE_UDCD_STATUS_IS_CHARGING = 0x0400, | |||
SCE_UDCD_STATUS_USE_USB_CHARGING = 0x0800, | |||
SCE_UDCD_STATUS_UNKNOWN_1000 = 0x1000, | |||
SCE_UDCD_STATUS_UNKNOWN_2000 = 0x2000 | |||
} SceUdcdStatus; | |||
typedef struct { | |||
{ | uint8_t info[64]; | ||
} SceUdcdDeviceInfo; | |||
typedef struct { | typedef struct { | ||
int unk_00; | int unk_00; | ||
Line 48: | Line 57: | ||
} SceUdcdDeviceState; | } SceUdcdDeviceState; | ||
typedef struct { | |||
int unk_00; | |||
int status; | |||
int unk_08; | |||
int unk_0C; | |||
int unk_10; | |||
const char *driverName; | |||
} SceUdcdWaitParam; | |||
</source> | |||
== SceUdcd == | |||
=== sceUdcdGetDeviceState === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0xFCD31220 | |||
|} | |||
<source lang="c"> | |||
/** | /** | ||
* Get device state | * Get device state | ||
Line 60: | Line 89: | ||
=== sceUdcdGetDeviceInfo === | === sceUdcdGetDeviceInfo === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 67: | Line 95: | ||
<source lang="c"> | <source lang="c"> | ||
/** | /** | ||
* Get device information | * Get device information | ||
Line 83: | Line 107: | ||
=== sceUdcdGetDrvState === | === sceUdcdGetDrvState === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 102: | Line 125: | ||
=== sceUdcdRegisterCallback === | === sceUdcdRegisterCallback === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 122: | Line 144: | ||
=== sceUdcdUnregisterCallback === | === sceUdcdUnregisterCallback === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 141: | Line 162: | ||
=== sceUdcdWaitState === | === sceUdcdWaitState === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 148: | Line 168: | ||
<source lang="c"> | <source lang="c"> | ||
/** | /** | ||
* Wait for state | * Wait for state | ||
Line 170: | Line 181: | ||
=== SceUdcd_F1A3690B === | === SceUdcd_F1A3690B === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 178: | Line 188: | ||
if (sceSblACMgrIsShellForDriver() || sceSblACMgrIsMiniSettingsForQAForDriver() || sceSblACMgrIsAllowedUsbSerialForDriver()) | if (sceSblACMgrIsShellForDriver() || sceSblACMgrIsMiniSettingsForQAForDriver() || sceSblACMgrIsAllowedUsbSerialForDriver()) | ||
-> calls SceUdcdForDriver_EBB1E86B();. | -> calls [[SceUdcd#SceUdcdForDriver_EBB1E86B|SceUdcdForDriver_EBB1E86B();]]. | ||
<source lang="c">int SceUdcd_F1A3690B(void);</source> | <source lang="c">int SceUdcd_F1A3690B(void);</source> | ||
=== | === sceUdcdSetChargeSetting === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 192: | Line 201: | ||
if (sceSblACMgrIsShellForDriver() || sceSblACMgrIsMiniSettingsForQAForDriver() || sceSblACMgrIsAllowedUsbSerialForDriver()) | if (sceSblACMgrIsShellForDriver() || sceSblACMgrIsMiniSettingsForQAForDriver() || sceSblACMgrIsAllowedUsbSerialForDriver()) | ||
-> calls | -> calls [[SceUdcd#enable_usb_charging_for_driver|enable_usb_charging_for_driver(enable);]]. | ||
<source lang="c"> | <source lang="c">SceInt32 sceUdcdSetChargeSetting(SceBool enable);</source> | ||
== SceUdcdForDriver == | == SceUdcdForDriver == | ||
Line 200: | Line 209: | ||
=== sceUdcdStartForDriver === | === sceUdcdStartForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 208: | Line 216: | ||
<source lang="c"> | <source lang="c"> | ||
/** | /** | ||
* Start a USB driver | * Start a USB driver | ||
* | * | ||
* @param driverName - Name of the USB driver to start | * @param driverName - Name of the USB driver to start | ||
Line 219: | Line 227: | ||
</source> | </source> | ||
=== | === sceUdcdStartInternalForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x90F8BCAE | ||
|} | |} | ||
<source lang="c"> | <source lang="c"> | ||
/** | /** | ||
* | * Start a USB driver for an UDCD bus | ||
* | * | ||
* @param driverName - Name of the USB driver to | * @param driverName - Name of the USB driver to start | ||
* @param size - Size of arguments to pass to USB driver start | * @param size - Size of arguments to pass to USB driver start | ||
* @param args - Arguments to pass to USB driver start | * @param args - Arguments to pass to USB driver start | ||
* @param bus - UDCD bus (default is 2) | |||
* | * | ||
* @return 0 on success, < 0 on error. | * @return 0 on success, < 0 on error. | ||
*/ | */ | ||
int | int sceUdcdStartInternalForDriver(const char *driverName, int size, void *args, int bus); | ||
</source> | </source> | ||
=== | === sceUdcdStartCurrentInternalForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | |||
|- | |- | ||
| 3.60 || 0x360E95B9 | |||
|} | |||
<source lang="c"> | |||
/** | |||
* Starts the current USB driver for an UDCD bus | |||
* | |||
* @param[in] unused - Unused | |||
* @param[in] bus - UDCD bus (default is 2) | |||
* | |||
* @return 0 on success, < 0 on error. | |||
*/ | |||
int sceUdcdStartCurrentInternalForDriver(int unused, int bus); | |||
</source> | |||
=== sceUdcdStopForDriver === | |||
{| class="wikitable" | |||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x1494293B | ||
|} | |} | ||
<source lang="c"> | <source lang="c"> | ||
// ex from SceUsbSerial: | |||
// sceUdcdStopForDriver("USBSerDriver", 0, 0); | |||
// sceUdcdStopForDriver("USBDeviceControllerDriver", 0, 0); | |||
// sceUdcdStopForDriver("USB_MTP_Driver", 0, 0); | |||
/** | /** | ||
* | * Stop a USB driver. | ||
* | * | ||
* @param driverName - Name of the USB driver to | * @param driverName - Name of the USB driver to stop | ||
* @param size - Size of arguments to pass to USB driver start | * @param size - Size of arguments to pass to USB driver start | ||
* @param args - Arguments to pass to USB driver start | * @param args - Arguments to pass to USB driver start | ||
* | * | ||
* @return 0 on success, < 0 on error. | * @return 0 on success, < 0 on error. | ||
*/ | */ | ||
int | int sceUdcdStopForDriver(const char *driverName, int size, void *args); | ||
</source> | </source> | ||
=== | === sceUdcdStopInternalForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x150FD3BB | ||
|} | |} | ||
<source lang="c"> | <source lang="c"> | ||
// ex from SceUsbDevSerial: | // ex from SceUsbDevSerial: | ||
// | // sceUdcdStopInternalForDriver("USBDeviceControllerDriver", 0, 0, 2); | ||
/** | /** | ||
* Stop a USB driver | * Stop a USB driver for an UDCD bus | ||
* | * | ||
* @param driverName - Name of the USB driver to stop | * @param driverName - Name of the USB driver to stop | ||
* @param size - Size of arguments to pass to USB driver start | * @param size - Size of arguments to pass to USB driver start | ||
* @param args - Arguments to pass to USB driver start | * @param args - Arguments to pass to USB driver start | ||
* @param bus - | * @param bus - UDCD bus (default is 2) | ||
* | * | ||
* @return 0 on success, < 0 on error. | * @return 0 on success, < 0 on error. | ||
*/ | */ | ||
int | int sceUdcdStopInternalForDriver(const char *driverName, int size, void *args, int bus); | ||
</source> | </source> | ||
=== | === sceUdcdStopCurrentInternalForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x0F3595AE | ||
|} | |} | ||
<source lang="c"> | <source lang="c"> | ||
/** | /** | ||
* | * Stops the current USB driver for an UDCD bus | ||
* | * | ||
* @param[in] bus - UDCD bus (default is 2) | * @param[in] bus - UDCD bus (default is 2) | ||
* | * | ||
* @return 0 on success, < 0 on error. | * @return 0 on success, < 0 on error. | ||
*/ | */ | ||
int | int sceUdcdStopCurrentInternalForDriver(int bus); | ||
</source> | </source> | ||
=== sceUdcdReqSendForDriver === | === sceUdcdReqSendForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 333: | Line 354: | ||
=== sceUdcdReqSendInternalForDriver === | === sceUdcdReqSendInternalForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 353: | Line 373: | ||
=== sceUdcdStallForDriver === | === sceUdcdStallForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 368: | Line 387: | ||
*/ | */ | ||
int sceUdcdStallForDriver(SceUdcdEndpoint *endp); | int sceUdcdStallForDriver(SceUdcdEndpoint *endp); | ||
</source> | |||
=== sceUdcdStallInternalForDriver === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0x34079250 | |||
|} | |||
<source lang="c"> | |||
/** | |||
* Stall an endpoint for an UDCD bus | |||
* | |||
* @param endp - The endpoint to stall | |||
* @param[in] bus - UDCD bus (default is 2) | |||
* | |||
* @return 0 on success, < 0 on error | |||
*/ | |||
int sceUdcdStallInternalForDriver(SceUdcdEndpoint *endp, int bus); | |||
</source> | </source> | ||
=== sceUdcdReqCancelAllForDriver === | === sceUdcdReqCancelAllForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 380: | Line 417: | ||
<source lang="c"> | <source lang="c"> | ||
/** | /** | ||
* Cancel any pending requests on an endpoint | * Cancel any pending requests on an endpoint | ||
* | * | ||
* @param endp - The endpoint to cancel | * @param endp - The endpoint to cancel | ||
Line 391: | Line 428: | ||
=== sceUdcdRegisterForDriver === | === sceUdcdRegisterForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 397: | Line 433: | ||
|} | |} | ||
Called by SceUsbSerial module_start(). | Called by [[SceUsbSerial]] module_start(). | ||
<source lang="c"> | <source lang="c"> | ||
Line 410: | Line 446: | ||
</source> | </source> | ||
=== | === sceUdcdRegisterInternalForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x64675918 | ||
|} | |} | ||
Called by | Called by [[SceUsbDevSerial]] module_start(). | ||
<source lang="c"> | <source lang="c"> | ||
/** | /** | ||
* | * Register a USB driver for an UDCD bus | ||
* | * | ||
* @param drv - Pointer to a filled out USB driver | * @param drv - Pointer to a filled out USB driver | ||
* @param bus - UDCD bus (default is 2) | |||
* | * | ||
* @return 0 on success, < 0 on error | * @return 0 on success, < 0 on error | ||
*/ | */ | ||
int | int sceUdcdRegisterInternalForDriver(SceUdcdDriver *drv, int bus); | ||
</source> | </source> | ||
=== | === sceUdcdUnregisterForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x0DECE532 | ||
|} | |} | ||
Called by | Called by [[SceUsbSerial]] module_stop(). | ||
<source lang="c"> | <source lang="c"> | ||
/** | /** | ||
* | * Unregister a USB driver | ||
* | * | ||
* @param drv - Pointer to a filled out USB driver | * @param drv - Pointer to a filled out USB driver | ||
* | * | ||
* @return 0 on success, < 0 on error | * @return 0 on success, < 0 on error | ||
*/ | */ | ||
int | int sceUdcdUnregisterForDriver(SceUdcdDriver *drv); | ||
</source> | </source> | ||
=== | === sceUdcdUnregisterInternalForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 461: | Line 494: | ||
|} | |} | ||
Called by SceUsbDevSerial module_stop(). | Called by [[SceUsbDevSerial]] module_stop(). | ||
<source lang="c"> | <source lang="c"> | ||
/** | /** | ||
* Unregister a USB driver | * Unregister a USB driver for an UDCD bus | ||
* | * | ||
* @param drv - Pointer to a filled out USB driver | * @param drv - Pointer to a filled out USB driver | ||
* @param bus - | * @param bus - UDCD bus (default is 2) | ||
* | * | ||
* @return 0 on success, < 0 on error | * @return 0 on success, < 0 on error | ||
*/ | */ | ||
int | int sceUdcdUnregisterInternalForDriver(SceUdcdDriver *drv, int bus); | ||
</source> | </source> | ||
=== sceUdcdActivateForDriver === | === sceUdcdActivateForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 487: | Line 519: | ||
* Activate a USB driver. | * Activate a USB driver. | ||
* | * | ||
* @param | * @param productId - Product ID for the default USB Driver | ||
* | * | ||
* @return 0 on success, < 0 on error. | * @return 0 on success, < 0 on error. | ||
Line 494: | Line 526: | ||
</source> | </source> | ||
=== | === sceUdcdActivateInternalForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x9119247B | ||
|} | |} | ||
<source lang="c"> | <source lang="c"> | ||
/** | /** | ||
* | * Activate a USB driver for an UDCD BUS | ||
* | * | ||
* @param | * @param productId - Product ID for the default USB Driver | ||
* @param | * @param bus - UDCD bus (default is 2) | ||
* | * | ||
* @return | * @return 0 on success, < 0 on error. | ||
*/ | */ | ||
int | int sceUdcdActivateInternalForDriver(unsigned int productId, int bus); | ||
</source> | </source> | ||
=== | === sceUdcdDeactivateForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0x8AE87657 | ||
|} | |} | ||
<source lang="c"> | <source lang="c"> | ||
/** | /** | ||
* | * Deactivate USB driver | ||
* | * | ||
* @return 0 on success, < 0 on error. | * @return 0 on success, < 0 on error. | ||
*/ | */ | ||
int | int sceUdcdDeactivateForDriver(void); | ||
</source> | </source> | ||
=== | === sceUdcdDeactivateInternalForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0xFDC10F93 | ||
|} | |} | ||
<source lang="c"> | <source lang="c"> | ||
/** | /** | ||
* Deactivate USB driver | * Deactivate USB driver for an UDCD bus | ||
* | |||
* @param[in] bus - UDCD bus (default is 2) | |||
* | * | ||
* @return 0 on success, < 0 on error. | * @return 0 on success, < 0 on error. | ||
*/ | */ | ||
int | int sceUdcdDeactivateInternalForDriver(int bus); | ||
</source> | </source> | ||
=== sceUdcdClearFIFOForDriver === | === sceUdcdClearFIFOForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 569: | Line 595: | ||
*/ | */ | ||
int sceUdcdClearFIFOForDriver(SceUdcdEndpoint *endp); | int sceUdcdClearFIFOForDriver(SceUdcdEndpoint *endp); | ||
</source> | |||
=== sceUdcdClearFIFOInternalForDriver === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0xA35F3BAF | |||
|} | |||
<source lang="c"> | |||
/** | |||
* Clear the FIFO on an endpoint for an UDCD bus | |||
* | |||
* @param endp - The endpoint to clear | |||
* @param bus - UDCD bus (default is 2) | |||
* | |||
* @return 0 on success, < 0 on error | |||
*/ | |||
int sceUdcdClearFIFOInternalForDriver(SceUdcdEndpoint *endp, int bus); | |||
</source> | |||
=== ?sceUdcdSetFIFOInternalForDriver? === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0xB1C2EA5A | |||
|} | |||
<source lang="c"> | |||
/** | |||
* ?Set? the FIFO on an endpoint for an UDCD bus | |||
* | |||
* @param endp - The endpoint to clear | |||
* @param bus - UDCD bus (default is 2) | |||
* | |||
* @return 0 on success, < 0 on error | |||
*/ | |||
int sceUdcdSetFIFOInternalForDriver(SceUdcdEndpoint *endp, int bus); | |||
</source> | </source> | ||
=== sceUdcdGetDrvStateForDriver === | === sceUdcdGetDrvStateForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 588: | Line 651: | ||
*/ | */ | ||
int sceUdcdGetDrvStateForDriver(const char *driverName); | int sceUdcdGetDrvStateForDriver(const char *driverName); | ||
</source> | |||
=== sceUdcdGetDrvStateInternalForDriver === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0x512F77BC | |||
|} | |||
<source lang="c"> | |||
/** | |||
* Get state of a specific USB driver for an UDCD bus | |||
* | |||
* @param driverName - name of USB driver to get status from | |||
* @param[in] bus - UDCD bus (default is 2) | |||
* | |||
* @return SCE_UDCD_STATUS_DRIVER_STARTED if the driver has been started, SCE_UDCD_STATUS_DRIVER_REGISTERED if it is stopped | |||
*/ | |||
int sceUdcdGetDrvStateInternalForDriver(const char *driverName, int bus); | |||
</source> | </source> | ||
=== sceUdcdReqRecvForDriver === | === sceUdcdReqRecvForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 611: | Line 692: | ||
=== sceUdcdReqRecvInternalForDriver === | === sceUdcdReqRecvInternalForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 627: | Line 707: | ||
*/ | */ | ||
int sceUdcdReqRecvInternalForDriver(SceUdcdDeviceRequest *req, int bus); | int sceUdcdReqRecvInternalForDriver(SceUdcdDeviceRequest *req, int bus); | ||
</source> | |||
=== sceUdcdWaitBusInitializedForDriver === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0x1C684884 | |||
|} | |||
<source lang="c"> | |||
/** | |||
* Waits until an UDCD bus is initialized | |||
* | |||
* @param[in] timeout - Timeout | |||
* @param[in] bus - UDCD bus (default is 2) | |||
* | |||
* @return 0 on success, < 0 on error. | |||
*/ | |||
int sceUdcdWaitBusInitializedForDriver(unsigned int timeout, int bus); | |||
</source> | </source> | ||
=== sceUdcdWaitStateForDriver === | === sceUdcdWaitStateForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || 0xD03017C0 | | 3.60 || 0xD03017C0 | ||
|} | |} | ||
Wrapper to [[SceUdcd#sceUdcdWaitStateInternalForDriver|sceUdcdWaitStateInternalForDriver]](waitParam, timeout, 2); | |||
<source lang="c"> | <source lang="c"> | ||
/** | /** | ||
* | * Waits for state | ||
* | * | ||
* @param[in] waitParam - Wait parameter | * @param[in] waitParam - Wait parameter | ||
Line 647: | Line 747: | ||
*/ | */ | ||
int sceUdcdWaitStateForDriver(SceUdcdWaitParam *waitParam, unsigned int timeout); | int sceUdcdWaitStateForDriver(SceUdcdWaitParam *waitParam, unsigned int timeout); | ||
</source> | |||
=== sceUdcdWaitStateInternalForDriver === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0x7AD0C8D1 | |||
|} | |||
<source lang="c"> | |||
/** | |||
* Waits for state for an UDCD bus | |||
* | |||
* @param[in] waitParam - Wait parameter | |||
* @param[in] timeout - Timeout | |||
* @param[in] bus - UDCD bus (default is 2) | |||
* | |||
* @return 0 on success, < 0 on error. | |||
*/ | |||
int sceUdcdWaitStateInternalForDriver(SceUdcdWaitParam *waitParam, unsigned int timeout, int bus); | |||
</source> | </source> | ||
=== sceUdcdGetDeviceStateForDriver === | === sceUdcdGetDeviceStateForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 664: | Line 783: | ||
*/ | */ | ||
int sceUdcdGetDeviceStateForDriver(void); | int sceUdcdGetDeviceStateForDriver(void); | ||
</source> | |||
=== sceUdcdGetDeviceStateInternalForDriver === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0x409DD196 | |||
|} | |||
<source lang="C"> | |||
/** | |||
* Get USB state for an UDCD bus | |||
* | |||
* @param bus - UDCD bus (default is 2 i.e. USB Serial) | |||
* | |||
* @return One or more ::SceUdcdStatus. | |||
*/ | |||
int sceUdcdGetDeviceStateInternalForDriver(int bus); | |||
</source> | </source> | ||
=== sceUdcdGetDeviceInfoForDriver === | === sceUdcdGetDeviceInfoForDriver === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
Line 685: | Line 821: | ||
</source> | </source> | ||
=== | === sceUdcdGetDeviceInfoInternalForDriver === | ||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0x45EB0177 | |||
|} | |||
<source lang="c"> | |||
/** | |||
* Get device information for an UDCD bus | |||
* | |||
* @param[out] devInfo - Device information | |||
* @param[in] bus - UDCD bus (default is 2) | |||
* | |||
* @return 0 on success, < 0 on error. | |||
*/ | |||
int sceUdcdGetDeviceInfoInternalForDriver(SceUdcdDeviceInfo *devInfo, int bus); | |||
</source> | |||
=== ?enable_usb_charging_for_driver? === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0x2D91F8C3 | |||
|} | |||
?Enables/disables USB charging? | |||
<source lang="c">int enable_usb_charging_for_driver(int enable);</source> | |||
=== SceUdcdForDriver_EBB1E86B === | |||
{| class="wikitable" | {| class="wikitable" | ||
! Version !! NID | |||
|- | |- | ||
| 3.60 || 0xDB7EF7AB | |||
|} | |||
Uses bus 2, ThreadMgr and SceThreadmgrForDriver_C58DF384(/*s_text_8100A608*/ "SceUdcdAlarmTickTimer", 0, sub_81008768, 2); | |||
<source lang="c">int SceUdcdForDriver_EBB1E86B(void);</source> | |||
=== SceUdcdForDriver_DB7EF7AB === | |||
{| class="wikitable" | |||
! Version !! NID | ! Version !! NID | ||
|- | |- | ||
| 3.60 || | | 3.60 || 0xDB7EF7AB | ||
|} | |} | ||
<source lang="c">int | <source lang="c">int SceUdcdForDriver_DB7EF7AB(int bus);</source> | ||
=== SceUdcdForDriver_360E95B9 === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0x360E95B9 | |||
|} | |||
Firstly check that bus is 0, 1 or 2 else returns 0x80243003. | |||
<source lang="c">int SceUdcdForDriver_360E95B9(int unused, int bus);</source> | |||
=== SceUdcdForDriver_0F3595AE === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0x0F3595AE | |||
|} | |||
Firstly check that bus is 0, 1 or 2 else returns 0x80243003. | |||
<source lang="C">int SceUdcdForDriver_0F3595AE(int bus);</source> | |||
=== SceUdcdForDriver_D01CFD22 === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0xD01CFD22 | |||
|} | |||
<source lang="C">int SceUdcdForDriver_D01CFD22(void);</source> | |||
=== sceUdcdInitForDriver === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0xE9E75C49 | |||
|} | |||
<source lang="C">int sceUdcdInitForDriver(int port);</source> | |||
=== sceUdcdEndForDriver === | |||
{| class="wikitable" | |||
! Version !! NID | |||
|- | |||
| 3.60 || 0x2A234CAF | |||
|} | |||
<source lang="C">int sceUdcdEndForDriver(int port);</source> | |||
[[Category:ARM]] | |||
[[Category:Kernel]] | |||
[[Category:Modules]] | [[Category:Modules]] | ||
[[Category: | [[Category:Library]] |
Latest revision as of 21:35, 1 May 2023
Module
Version | World | Privilege |
---|---|---|
1.69-3.60 | Non-secure | Kernel |
Libraries
Known NIDs
Version | Name | World | Visibility | NID |
---|---|---|---|---|
1.69 | SceUdcd | Non-secure | User | 0xA84BDE8A |
3.60 | SceUdcd | Non-secure | User | 0xA84BDE8A |
1.69 | SceUdcdForDriver | Non-secure | Kernel | 0xBC05A8FB |
3.60 | SceUdcdForDriver | Non-secure | Kernel | 0xBC05A8FB |
Types
/** USB Status */ typedef enum SceUdcdStatus { SCE_UDCD_STATUS_CONNECTION_NEW = 0x0001, SCE_UDCD_STATUS_CONNECTION_ESTABLISHED = 0x0002, SCE_UDCD_STATUS_CONNECTION_SUSPENDED = 0x0004, SCE_UDCD_STATUS_CABLE_DISCONNECTED = 0x0010, SCE_UDCD_STATUS_CABLE_CONNECTED = 0x0020, SCE_UDCD_STATUS_DEACTIVATED = 0x0100, SCE_UDCD_STATUS_ACTIVATED = 0x0200, SCE_UDCD_STATUS_IS_CHARGING = 0x0400, SCE_UDCD_STATUS_USE_USB_CHARGING = 0x0800, SCE_UDCD_STATUS_UNKNOWN_1000 = 0x1000, SCE_UDCD_STATUS_UNKNOWN_2000 = 0x2000 } SceUdcdStatus; typedef struct { uint8_t info[64]; } SceUdcdDeviceInfo; typedef struct { int unk_00; int state; int cable; int connection; int use_usb_charging; int unk_14; } SceUdcdDeviceState; typedef struct { int unk_00; int status; int unk_08; int unk_0C; int unk_10; const char *driverName; } SceUdcdWaitParam;
SceUdcd
sceUdcdGetDeviceState
Version | NID |
---|---|
3.60 | 0xFCD31220 |
/** * Get device state * * @param[out] state - Device state * * @return 0 on success, < 0 on error. */ int sceUdcdGetDeviceState(SceUdcdDeviceState *state);
sceUdcdGetDeviceInfo
Version | NID |
---|---|
3.60 | 0x701C87CF |
/** * Get device information * * @param[out] devInfo - Device information * * @return 0 on success, < 0 on error. */ int sceUdcdGetDeviceInfo(SceUdcdDeviceInfo *devInfo);
sceUdcdGetDrvState
Version | NID |
---|---|
3.60 | 0x99B3DA5D |
/** * Get state of a specific USB driver * * @param driverName - name of USB driver to get status from * * @return SCE_UDCD_STATUS_DRIVER_STARTED if the driver has been started, SCE_UDCD_STATUS_DRIVER_REGISTERED if it is stopped */ int sceUdcdGetDrvState(const char *driverName);
sceUdcdRegisterCallback
Version | NID |
---|---|
3.60 | 0xA7070093 |
/** * Register callback * * @param[in] cbid - Callback UID * @param[in] state - State * * @return 0 on success, < 0 on error. */ int sceUdcdRegisterCallback(SceUID cbid, int state);
sceUdcdUnregisterCallback
Version | NID |
---|---|
3.60 | 0xC3FBA889 |
/** * Unregister callback * * @param[in] cbid - Callback UID * * @return 0 on success, < 0 on error. */ int sceUdcdUnregisterCallback(SceUID cbid);
sceUdcdWaitState
Version | NID |
---|---|
3.60 | 0x59EFFAF1 |
/** * Wait for state * * @param[in] waitParam - Wait parameter * @param[in] timeout - Timeout * * @return 0 on success, < 0 on error. */ int sceUdcdWaitState(SceUdcdWaitParam *waitParam, unsigned int timeout);
SceUdcd_F1A3690B
Version | NID |
---|---|
3.60 | 0xF1A3690B |
if (sceSblACMgrIsShellForDriver() || sceSblACMgrIsMiniSettingsForQAForDriver() || sceSblACMgrIsAllowedUsbSerialForDriver())
-> calls SceUdcdForDriver_EBB1E86B();.
int SceUdcd_F1A3690B(void);
sceUdcdSetChargeSetting
Version | NID |
---|---|
3.60 | 0xFCD876FB |
if (sceSblACMgrIsShellForDriver() || sceSblACMgrIsMiniSettingsForQAForDriver() || sceSblACMgrIsAllowedUsbSerialForDriver())
-> calls enable_usb_charging_for_driver(enable);.
SceInt32 sceUdcdSetChargeSetting(SceBool enable);
SceUdcdForDriver
sceUdcdStartForDriver
Version | NID |
---|---|
3.60 | 0x9FD733EA |
/** * Start a USB driver * * @param driverName - Name of the USB driver to start * @param size - Size of arguments to pass to USB driver start * @param args - Arguments to pass to USB driver start * * @return 0 on success, < 0 on error. */ int sceUdcdStartForDriver(const char *driverName, int size, void *args);
sceUdcdStartInternalForDriver
Version | NID |
---|---|
3.60 | 0x90F8BCAE |
/** * Start a USB driver for an UDCD bus * * @param driverName - Name of the USB driver to start * @param size - Size of arguments to pass to USB driver start * @param args - Arguments to pass to USB driver start * @param bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error. */ int sceUdcdStartInternalForDriver(const char *driverName, int size, void *args, int bus);
sceUdcdStartCurrentInternalForDriver
Version | NID |
---|---|
3.60 | 0x360E95B9 |
/** * Starts the current USB driver for an UDCD bus * * @param[in] unused - Unused * @param[in] bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error. */ int sceUdcdStartCurrentInternalForDriver(int unused, int bus);
sceUdcdStopForDriver
Version | NID |
---|---|
3.60 | 0x1494293B |
// ex from SceUsbSerial: // sceUdcdStopForDriver("USBSerDriver", 0, 0); // sceUdcdStopForDriver("USBDeviceControllerDriver", 0, 0); // sceUdcdStopForDriver("USB_MTP_Driver", 0, 0); /** * Stop a USB driver. * * @param driverName - Name of the USB driver to stop * @param size - Size of arguments to pass to USB driver start * @param args - Arguments to pass to USB driver start * * @return 0 on success, < 0 on error. */ int sceUdcdStopForDriver(const char *driverName, int size, void *args);
sceUdcdStopInternalForDriver
Version | NID |
---|---|
3.60 | 0x150FD3BB |
// ex from SceUsbDevSerial: // sceUdcdStopInternalForDriver("USBDeviceControllerDriver", 0, 0, 2); /** * Stop a USB driver for an UDCD bus * * @param driverName - Name of the USB driver to stop * @param size - Size of arguments to pass to USB driver start * @param args - Arguments to pass to USB driver start * @param bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error. */ int sceUdcdStopInternalForDriver(const char *driverName, int size, void *args, int bus);
sceUdcdStopCurrentInternalForDriver
Version | NID |
---|---|
3.60 | 0x0F3595AE |
/** * Stops the current USB driver for an UDCD bus * * @param[in] bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error. */ int sceUdcdStopCurrentInternalForDriver(int bus);
sceUdcdReqSendForDriver
Version | NID |
---|---|
3.60 | 0x1ED0E89E |
/** * Queue a send request (IN from host pov) * * @param req - Pointer to a filled out ::SceUdcdDeviceRequest structure. * * @return 0 on success, < 0 on error */ int sceUdcdReqSendForDriver(SceUdcdDeviceRequest *req);
sceUdcdReqSendInternalForDriver
Version | NID |
---|---|
3.60 | 0x2E3E622A |
/** * Queue a send request (IN from host pov) for an UDCD bus * * @param req - Pointer to a filled out ::SceUdcdDeviceRequest structure. * @param[in] bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error */ int sceUdcdReqSendInternalForDriver(SceUdcdDeviceRequest *req, int bus);
sceUdcdStallForDriver
Version | NID |
---|---|
3.60 | 0x34079250 |
/** * Stall an endpoint * * @param endp - The endpoint to stall * * @return 0 on success, < 0 on error */ int sceUdcdStallForDriver(SceUdcdEndpoint *endp);
sceUdcdStallInternalForDriver
Version | NID |
---|---|
3.60 | 0x34079250 |
/** * Stall an endpoint for an UDCD bus * * @param endp - The endpoint to stall * @param[in] bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error */ int sceUdcdStallInternalForDriver(SceUdcdEndpoint *endp, int bus);
sceUdcdReqCancelAllForDriver
Version | NID |
---|---|
3.60 | 0x38787672 |
/** * Cancel any pending requests on an endpoint * * @param endp - The endpoint to cancel * * @return 0 on success, < 0 on error */ int sceUdcdReqCancelAllForDriver(SceUdcdEndpoint *endp);
sceUdcdRegisterForDriver
Version | NID |
---|---|
3.60 | 0x4E55244D |
Called by SceUsbSerial module_start().
/** * Register a USB driver. * * @param drv - Pointer to a filled out USB driver * * @return 0 on success, < 0 on error */ int sceUdcdRegisterForDriver(SceUdcdDriver *drv);
sceUdcdRegisterInternalForDriver
Version | NID |
---|---|
3.60 | 0x64675918 |
Called by SceUsbDevSerial module_start().
/** * Register a USB driver for an UDCD bus * * @param drv - Pointer to a filled out USB driver * @param bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error */ int sceUdcdRegisterInternalForDriver(SceUdcdDriver *drv, int bus);
sceUdcdUnregisterForDriver
Version | NID |
---|---|
3.60 | 0x0DECE532 |
Called by SceUsbSerial module_stop().
/** * Unregister a USB driver * * @param drv - Pointer to a filled out USB driver * * @return 0 on success, < 0 on error */ int sceUdcdUnregisterForDriver(SceUdcdDriver *drv);
sceUdcdUnregisterInternalForDriver
Version | NID |
---|---|
3.60 | 0x6CCD152E |
Called by SceUsbDevSerial module_stop().
/** * Unregister a USB driver for an UDCD bus * * @param drv - Pointer to a filled out USB driver * @param bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error */ int sceUdcdUnregisterInternalForDriver(SceUdcdDriver *drv, int bus);
sceUdcdActivateForDriver
Version | NID |
---|---|
3.60 | 0x4FDEA423 |
/** * Activate a USB driver. * * @param productId - Product ID for the default USB Driver * * @return 0 on success, < 0 on error. */ int sceUdcdActivateForDriver(unsigned int productId);
sceUdcdActivateInternalForDriver
Version | NID |
---|---|
3.60 | 0x9119247B |
/** * Activate a USB driver for an UDCD BUS * * @param productId - Product ID for the default USB Driver * @param bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error. */ int sceUdcdActivateInternalForDriver(unsigned int productId, int bus);
sceUdcdDeactivateForDriver
Version | NID |
---|---|
3.60 | 0x8AE87657 |
/** * Deactivate USB driver * * @return 0 on success, < 0 on error. */ int sceUdcdDeactivateForDriver(void);
sceUdcdDeactivateInternalForDriver
Version | NID |
---|---|
3.60 | 0xFDC10F93 |
/** * Deactivate USB driver for an UDCD bus * * @param[in] bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error. */ int sceUdcdDeactivateInternalForDriver(int bus);
sceUdcdClearFIFOForDriver
Version | NID |
---|---|
3.60 | 0x9F53D64D |
/** * Clear the FIFO on an endpoint * * @param endp - The endpoint to clear * * @return 0 on success, < 0 on error */ int sceUdcdClearFIFOForDriver(SceUdcdEndpoint *endp);
sceUdcdClearFIFOInternalForDriver
Version | NID |
---|---|
3.60 | 0xA35F3BAF |
/** * Clear the FIFO on an endpoint for an UDCD bus * * @param endp - The endpoint to clear * @param bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error */ int sceUdcdClearFIFOInternalForDriver(SceUdcdEndpoint *endp, int bus);
?sceUdcdSetFIFOInternalForDriver?
Version | NID |
---|---|
3.60 | 0xB1C2EA5A |
/** * ?Set? the FIFO on an endpoint for an UDCD bus * * @param endp - The endpoint to clear * @param bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error */ int sceUdcdSetFIFOInternalForDriver(SceUdcdEndpoint *endp, int bus);
sceUdcdGetDrvStateForDriver
Version | NID |
---|---|
3.60 | 0xC0CA5DDB |
/** * Get state of a specific USB driver * * @param driverName - name of USB driver to get status from * * @return SCE_UDCD_STATUS_DRIVER_STARTED if the driver has been started, SCE_UDCD_STATUS_DRIVER_REGISTERED if it is stopped */ int sceUdcdGetDrvStateForDriver(const char *driverName);
sceUdcdGetDrvStateInternalForDriver
Version | NID |
---|---|
3.60 | 0x512F77BC |
/** * Get state of a specific USB driver for an UDCD bus * * @param driverName - name of USB driver to get status from * @param[in] bus - UDCD bus (default is 2) * * @return SCE_UDCD_STATUS_DRIVER_STARTED if the driver has been started, SCE_UDCD_STATUS_DRIVER_REGISTERED if it is stopped */ int sceUdcdGetDrvStateInternalForDriver(const char *driverName, int bus);
sceUdcdReqRecvForDriver
Version | NID |
---|---|
3.60 | 0xC60A74B2 |
/** * Queue a receive request (OUT from host pov) * * @param req - Pointer to a filled out ::SceUdcdDeviceRequest structure * * @return 0 on success, < 0 on error */ int sceUdcdReqRecvForDriver(SceUdcdDeviceRequest *req);
sceUdcdReqRecvInternalForDriver
Version | NID |
---|---|
3.60 | 0x175E6179 |
/** * Queue a receive request (OUT from host pov) for an UDCD bus * * @param req - Pointer to a filled out ::SceUdcdDeviceRequest structure * @param[in] bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error */ int sceUdcdReqRecvInternalForDriver(SceUdcdDeviceRequest *req, int bus);
sceUdcdWaitBusInitializedForDriver
Version | NID |
---|---|
3.60 | 0x1C684884 |
/** * Waits until an UDCD bus is initialized * * @param[in] timeout - Timeout * @param[in] bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error. */ int sceUdcdWaitBusInitializedForDriver(unsigned int timeout, int bus);
sceUdcdWaitStateForDriver
Version | NID |
---|---|
3.60 | 0xD03017C0 |
Wrapper to sceUdcdWaitStateInternalForDriver(waitParam, timeout, 2);
/** * Waits for state * * @param[in] waitParam - Wait parameter * @param[in] timeout - Timeout * * @return 0 on success, < 0 on error. */ int sceUdcdWaitStateForDriver(SceUdcdWaitParam *waitParam, unsigned int timeout);
sceUdcdWaitStateInternalForDriver
Version | NID |
---|---|
3.60 | 0x7AD0C8D1 |
/** * Waits for state for an UDCD bus * * @param[in] waitParam - Wait parameter * @param[in] timeout - Timeout * @param[in] bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error. */ int sceUdcdWaitStateInternalForDriver(SceUdcdWaitParam *waitParam, unsigned int timeout, int bus);
sceUdcdGetDeviceStateForDriver
Version | NID |
---|---|
3.60 | 0xE054B5E4 |
/** * Get USB state * * @return One or more ::SceUdcdStatus. */ int sceUdcdGetDeviceStateForDriver(void);
sceUdcdGetDeviceStateInternalForDriver
Version | NID |
---|---|
3.60 | 0x409DD196 |
/** * Get USB state for an UDCD bus * * @param bus - UDCD bus (default is 2 i.e. USB Serial) * * @return One or more ::SceUdcdStatus. */ int sceUdcdGetDeviceStateInternalForDriver(int bus);
sceUdcdGetDeviceInfoForDriver
Version | NID |
---|---|
3.60 | 0xFBEA3703 |
/** * Get device information * * @param[out] devInfo - Device information * * @return 0 on success, < 0 on error. */ int sceUdcdGetDeviceInfoForDriver(SceUdcdDeviceInfo *devInfo);
sceUdcdGetDeviceInfoInternalForDriver
Version | NID |
---|---|
3.60 | 0x45EB0177 |
/** * Get device information for an UDCD bus * * @param[out] devInfo - Device information * @param[in] bus - UDCD bus (default is 2) * * @return 0 on success, < 0 on error. */ int sceUdcdGetDeviceInfoInternalForDriver(SceUdcdDeviceInfo *devInfo, int bus);
?enable_usb_charging_for_driver?
Version | NID |
---|---|
3.60 | 0x2D91F8C3 |
?Enables/disables USB charging?
int enable_usb_charging_for_driver(int enable);
SceUdcdForDriver_EBB1E86B
Version | NID |
---|---|
3.60 | 0xDB7EF7AB |
Uses bus 2, ThreadMgr and SceThreadmgrForDriver_C58DF384(/*s_text_8100A608*/ "SceUdcdAlarmTickTimer", 0, sub_81008768, 2);
int SceUdcdForDriver_EBB1E86B(void);
SceUdcdForDriver_DB7EF7AB
Version | NID |
---|---|
3.60 | 0xDB7EF7AB |
int SceUdcdForDriver_DB7EF7AB(int bus);
SceUdcdForDriver_360E95B9
Version | NID |
---|---|
3.60 | 0x360E95B9 |
Firstly check that bus is 0, 1 or 2 else returns 0x80243003.
int SceUdcdForDriver_360E95B9(int unused, int bus);
SceUdcdForDriver_0F3595AE
Version | NID |
---|---|
3.60 | 0x0F3595AE |
Firstly check that bus is 0, 1 or 2 else returns 0x80243003.
int SceUdcdForDriver_0F3595AE(int bus);
SceUdcdForDriver_D01CFD22
Version | NID |
---|---|
3.60 | 0xD01CFD22 |
int SceUdcdForDriver_D01CFD22(void);
sceUdcdInitForDriver
Version | NID |
---|---|
3.60 | 0xE9E75C49 |
int sceUdcdInitForDriver(int port);
sceUdcdEndForDriver
Version | NID |
---|---|
3.60 | 0x2A234CAF |
int sceUdcdEndForDriver(int port);