X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FUSB%2FCore%2Finclude%2Fusb_core.h;h=04a6ab9db817279ec36d40047570f4002e5dee6b;hb=015f48988e0ff398409d71dfc692005ab439490a;hp=d0f449fb4de737487ec2aa0bf28e2f625c8091d0;hpb=51ab5f489bc356940c95cc936fd0508e8f07ea97;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 d0f449fb..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; @@ -53,16 +53,23 @@ struct sUSBDriver 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