X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FUSB%2FCore%2Finclude%2Fusb_core.h;h=04a6ab9db817279ec36d40047570f4002e5dee6b;hb=HEAD;hp=43af16f273a2c6bd341e975182bcc90fa07563ec;hpb=48743e39650eb1ef988380e9d95f27fd40d3a9ce;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/USB/Core/include/usb_core.h b/KernelLand/Modules/USB/Core/include/usb_core.h index 43af16f2..04a6ab9d 100644 --- a/KernelLand/Modules/USB/Core/include/usb_core.h +++ b/KernelLand/Modules/USB/Core/include/usb_core.h @@ -38,7 +38,7 @@ struct sUSBDriver } VendorDev; } Match; - void (*Connected)(tUSBInterface *Dev); + void (*Connected)(tUSBInterface *Dev, void *Descriptors, size_t Size); void (*Disconnected)(tUSBInterface *Dev); int MaxEndpoints; @@ -51,16 +51,25 @@ struct sUSBDriver } Endpoints[]; }; +extern void USB_RegisterDriver(tUSBDriver *Driver); + +// --- Driver Pointer --- extern void *USB_GetDeviceDataPtr(tUSBInterface *Dev); extern void USB_SetDeviceDataPtr(tUSBInterface *Dev, void *Ptr); +// --- Device/Interface information --- +extern Uint32 USB_GetInterfaceClass(tUSBInterface *Dev); +extern void USB_GetDeviceVendor(tUSBInterface *Dev, Uint16 *VendorID, Uint16 *DeviceID); +extern char *USB_GetSerialNumber(tUSBInterface *Dev); + +// --- Device IO --- extern void USB_StartPollingEndpoint(tUSBInterface *Dev, int Endpoint); extern void USB_ReadDescriptor(tUSBInterface *Dev, int Type, int Index, int Length, void *Data); extern void USB_Request(tUSBInterface *Dev, int Endpoint, int Type, int Req, int Value, int Index, int Len, void *Data); // TODO: Async -extern void USB_SendData(tUSBInterface *Dev, int Endpoint, int Length, void *Data); -extern void USB_RecvData(tUSBInterface *Dev, int Endpoint, int Length, void *Data); -extern void USB_RecvDataA(tUSBInterface *Dev, int Endpoint, int Length, void *DataBuf, tUSB_DataCallback Callback); +extern void USB_SendData(tUSBInterface *Dev, int Endpoint, size_t Length, const void *Data); +extern void USB_RecvData(tUSBInterface *Dev, int Endpoint, size_t Length, void *Data); +extern void USB_RecvDataA(tUSBInterface *Dev, int Endpoint, size_t Length, void *DataBuf); #endif