diff options
author | Sergi Granell | 2018-08-27 09:33:26 +0200 |
---|---|---|
committer | Sunguk Lee | 2018-08-27 17:38:04 +0900 |
commit | 74b6a25a875d13935ba921c4d7b2e52b7c9ca2b6 (patch) | |
tree | bf28ab94e0af55e842184d1866858601039bebc8 /include/kernel/udcd.h | |
parent | More UDCD nids (diff) | |
download | vds-libraries-74b6a25a875d13935ba921c4d7b2e52b7c9ca2b6.tar.gz |
Update UDCD
Diffstat (limited to '')
-rw-r--r-- | include/kernel/udcd.h | 95 |
1 files changed, 94 insertions, 1 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. |