diff options
author | Sergi Granell | 2017-10-25 22:40:52 +0200 |
---|---|---|
committer | Sergi Granell | 2017-10-25 22:44:36 +0200 |
commit | c31a24195014accdaddad21a0feb2855a0cf2f67 (patch) | |
tree | 877c82eeafcda943c225ab04b083ec9f15fb265e /include/kernel/udcd.h | |
parent | Fix typo (diff) | |
download | vds-libraries-c31a24195014accdaddad21a0feb2855a0cf2f67.tar.gz |
Add more NIDs, update udcd.h
Diffstat (limited to 'include/kernel/udcd.h')
-rw-r--r-- | include/kernel/udcd.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/include/kernel/udcd.h b/include/kernel/udcd.h index fef2bf6..bdb6e56 100644 --- a/include/kernel/udcd.h +++ b/include/kernel/udcd.h @@ -338,14 +338,14 @@ typedef struct SceUdcdDriver { SceUdcdStringDescriptor *stringDescriptorsUnk0; //!< Unknown string descriptors SceUdcdStringDescriptor *stringDescriptorsUnk1; //!< Default String descriptor SceUdcdStringDescriptor *stringDescriptorsUnk2; //!< String descriptors (unknown) - int (*processRequest) (int recipient, int arg /* endpoint number or interface number */, SceUdcdEP0DeviceRequest *req); //!< Received a control request - int (*changeSetting) (int interfaceNumber, int alternateSetting); //!< Change alternate setting - int (*attach) (int usb_version); //!< Configuration set (attach) function - void (*detach) (void); //!< Configuration unset (detach) function - void (*configure) (int usb_version, int desc_count, SceUdcdInterfaceSettings *settings); //!< Configure the device - int (*start) (int size, void *args); //!< Function called when the driver is started - int (*stop) (int size, void *args); //!< Function called when the driver is stopped - unsigned int unk1; //!< Unknown data + int (*processRequest)(int recipient, int arg /* endpoint number or interface number */, SceUdcdEP0DeviceRequest *req, void *user_data); //!< Received a control request + int (*changeSetting)(int interfaceNumber, int alternateSetting); //!< Change alternate setting + int (*attach)(int usb_version, void *user_data); //!< Configuration set (attach) function + void (*detach)(void *user_data); //!< Configuration unset (detach) function + void (*configure)(int usb_version, int desc_count, SceUdcdInterfaceSettings *settings, void *user_data); //!< Configure the device + int (*start)(int size, void *args, void *user_data); //!< Function called when the driver is started + int (*stop)(int size, void *args, void *user_data); //!< Function called when the driver is stopped + void *user_data; //!< User data unsigned int unk2; //!< Unknown data struct SceUdcdDriver *link; //!< Link to next USB driver in the chain, set to NULL } SceUdcdDriver; @@ -477,6 +477,16 @@ int sceUdcdWaitCancel(void); int sceUdcdRegister(SceUdcdDriver *drv); /** + * Register a USB driver to a specific USB bus. + * + * @param drv - Pointer to a filled out USB driver + * @param bus - The USB bus index (usually 2) + * + * @return 0 on success, < 0 on error + */ +int sceUdcdRegisterToBus(SceUdcdDriver *drv, int bus); + +/** * Unregister a USB driver * * @param drv - Pointer to a filled out USB driver |