From 1f4d1032e8c93184ed675dd714f175fe7c5de463 Mon Sep 17 00:00:00 2001 From: Sergi Granell Date: Mon, 15 Jan 2018 11:04:19 +0100 Subject: UDCD improvements, add NIDS --- include/user/udcd.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'include/user/udcd.h') diff --git a/include/user/udcd.h b/include/user/udcd.h index 2915312..fefb048 100644 --- a/include/user/udcd.h +++ b/include/user/udcd.h @@ -20,6 +20,13 @@ typedef enum SceUdcdStatus { SCE_UDCD_STATUS_UNKNOWN_2000 = 0x2000 } SceUdcdStatus; +/** USB Driver status + */ +typedef enum SceUdcdStatusDriver { + SCE_UDCD_STATUS_DRIVER_STARTED = 0x01, + SCE_UDCD_STATUS_DRIVER_REGISTERED = 0x02 +} SceUdcdStatusDriver; + typedef struct { uint8_t info[64]; } SceUdcdDeviceInfo; @@ -60,6 +67,15 @@ int sceUdcdGetDeviceState(SceUdcdDeviceState *state); */ int sceUdcdGetDeviceInfo(SceUdcdDeviceInfo *devInfo); +/** + * 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); + /** * Register callback * @@ -83,11 +99,11 @@ int sceUdcdUnregisterCallback(SceUID cbid); * Wait for state * * @param[in] waitParam - Wait parameter - * @param[in] state - State + * @param[in] timeout - Timeout * * @return 0 on success, < 0 on error. */ -int sceUdcdWaitState(SceUdcdWaitParam *waitParam, int state); +int sceUdcdWaitState(SceUdcdWaitParam *waitParam, unsigned int timeout); #ifdef __cplusplus } -- cgit v1.2.3