diff options
-rw-r--r-- | include/kernel/udcd.h | 95 | ||||
-rw-r--r-- | nids/360/SceUdcd.yml | 9 |
2 files changed, 102 insertions, 2 deletions
diff --git a/include/kernel/udcd.h b/include/kernel/udcd.h index e309899..cea21d1 100644 --- a/include/kernel/udcd.h +++ b/include/kernel/udcd.h @@ -418,6 +418,18 @@ int sceUdcdWaitBusInitialized(unsigned int timeout, int bus); int sceUdcdStart(const char *driverName, int size, void *args); /** + * 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[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error. + */ +int sceUdcdStartInternal(const char *driverName, int size, void *args, int bus); + +/** * Stop a USB driver. * * @param driverName - Name of the USB driver to stop @@ -429,6 +441,18 @@ int sceUdcdStart(const char *driverName, int size, void *args); int sceUdcdStop(const char *driverName, int size, void *args); /** + * 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[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error. + */ +int sceUdcdStopInternal(const char *driverName, int size, void *args, int bus); + +/** * Activate a USB driver. * * @param pid - Product ID for the default USB Driver @@ -438,6 +462,17 @@ int sceUdcdStop(const char *driverName, int size, void *args); int sceUdcdActivate(unsigned int productId); /** + * Activate a USB driver for an UDCD bus. + * + * @param pid - Product ID for the default USB Driver + * @param[in] bus_powered - Enable USB bus power + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error. + */ +int sceUdcdActivateInternal(unsigned int productId, unsigned int bus_powered, int bus); + +/** * Deactivate USB driver. * * @return 0 on success, < 0 on error. @@ -445,6 +480,15 @@ int sceUdcdActivate(unsigned int productId); int sceUdcdDeactivate(void); /** + * Deactivate USB driver for an UDCD bus. + * + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error. + */ +int sceUdcdDeactivateInternal(int bus); + +/** * Get USB state * * @return One or more ::SceUdcdStatus. @@ -452,6 +496,15 @@ int sceUdcdDeactivate(void); int sceUdcdGetDeviceState(void); /** + * Get USB state for an UDCD bus + * + * @param[in] bus - UDCD bus (default is 2) + * + * @return One or more ::SceUdcdStatus. + */ +int sceUdcdGetDeviceStateInternal(int bus); + +/** * Get device information * * @param[out] devInfo - Device information @@ -461,6 +514,16 @@ int sceUdcdGetDeviceState(void); int sceUdcdGetDeviceInfo(SceUdcdDeviceInfo *devInfo); /** + * 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 sceUdcdGetDeviceInfoInternal(SceUdcdDeviceInfo *devInfo, int bus); + +/** * Get state of a specific USB driver * * @param driverName - name of USB driver to get status from @@ -517,7 +580,7 @@ int sceUdcdRegister(SceUdcdDriver *drv); * * @return 0 on success, < 0 on error */ -int sceUdcdRegisterToBus(SceUdcdDriver *drv, int bus); +int sceUdcdRegisterInternal(SceUdcdDriver *drv, int bus); /** * Unregister a USB driver @@ -529,6 +592,16 @@ int sceUdcdRegisterToBus(SceUdcdDriver *drv, int bus); int sceUdcdUnregister(SceUdcdDriver *drv); /** + * Unregister a USB driver for an UDCD bus + * + * @param drv - Pointer to a filled out USB driver + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error + */ +int sceUdcdUnregisterInternal(SceUdcdDriver *drv, int bus); + +/** * Clear the FIFO on an endpoint * * @param endp - The endpoint to clear @@ -538,6 +611,16 @@ int sceUdcdUnregister(SceUdcdDriver *drv); int sceUdcdClearFIFO(SceUdcdEndpoint *endp); /** + * Clear the FIFO on an endpoint for an UDCD bus + * + * @param endp - The endpoint to clear + * @param[in] bus - UDCD bus (default is 2) + * + * @return 0 on success, < 0 on error + */ +int sceUdcdClearFIFOInternal(SceUdcdEndpoint *endp, int bus); + +/** * Cancel any pending requests on an endpoint. * * @param endp - The endpoint to cancel @@ -556,6 +639,16 @@ int sceUdcdReqCancelAll(SceUdcdEndpoint *endp); int sceUdcdStall(SceUdcdEndpoint *endp); /** + * 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 sceUdcdStallInternal(SceUdcdEndpoint *endp, int bus); + +/** * Queue a send request (IN from host pov) * * @param req - Pointer to a filled out ::SceUdcdDeviceRequest structure. diff --git a/nids/360/SceUdcd.yml b/nids/360/SceUdcd.yml index db08486..e38b6b4 100644 --- a/nids/360/SceUdcd.yml +++ b/nids/360/SceUdcd.yml @@ -15,8 +15,11 @@ modules: nid: 0xBC05A8FB functions: sceUdcdActivate: 0x4FDEA423 + sceUdcdActivateInternal: 0x9119247B sceUdcdClearFIFO: 0x9F53D64D + sceUdcdClearFIFOInternal: 0xA35F3BAF sceUdcdDeactivate: 0x8AE87657 + sceUdcdDeactivateInternal: 0xFDC10F93 sceUdcdGetDeviceInfo: 0xFBEA3703 sceUdcdGetDeviceInfoInternal: 0x45EB0177 sceUdcdGetDeviceState: 0xE054B5E4 @@ -24,16 +27,20 @@ modules: sceUdcdGetDrvState: 0xC0CA5DDB sceUdcdGetDrvStateInternal: 0x512F77BC sceUdcdRegister: 0x4E55244D - sceUdcdRegisterToBus: 0x64675918 + sceUdcdRegisterInternal: 0x64675918 sceUdcdReqCancelAll: 0x38787672 sceUdcdReqRecv: 0xC60A74B2 sceUdcdReqRecvInternal: 0x175E6179 sceUdcdReqSend: 0x1ED0E89E sceUdcdReqSendInternal: 0x2E3E622A sceUdcdStall: 0x34079250 + sceUdcdStallInternal: 0x9B44DF29 sceUdcdStart: 0x9FD733EA + sceUdcdStartInternal: 0x90F8BCAE sceUdcdStop: 0x1494293B + sceUdcdStopInternal: 0x150FD3BB sceUdcdUnregister: 0x0DECE532 + sceUdcdUnregisterInternal: 0x6CCD152E sceUdcdWaitBusInitialized: 0x1C684884 sceUdcdWaitState: 0xD03017C0 sceUdcdWaitStateInternal: 0x7AD0C8D1 |