3 * - By John Hodge (thePowersGang)
12 #include "usb_lowlevel.h"
13 #include <semaphore.h>
15 typedef struct sAsyncOp tAsyncOp;
26 void USB_ReadDescriptor(tUSBInterface *Iface, int Type, int Index, int Length, void *Data);
27 void USB_Request(tUSBInterface *Iface, int Endpoint, int Type, int Req, int Value, int Index, int Len, void *Data);
30 tSemaphore glUSB_AsyncQueue;
33 void USB_ReadDescriptor(tUSBInterface *Iface, int Type, int Index, int Length, void *Data)
35 USB_int_ReadDescriptor(Iface->Dev, 0, Type, Index, Length, Data);
38 void USB_Request(tUSBInterface *Iface, int Endpoint, int Type, int Req, int Value, int Index, int Len, void *Data)
43 if(Endpoint < 0 || Endpoint >= Iface->nEndpoints)
46 // Get endpoint number
48 endpt = Iface->Endpoints[Endpoint-1].EndpointNum;
52 USB_int_Request(Iface->Dev->Host, Iface->Dev->Address, endpt, Type, Req, Value, Index, Len, Data);
56 void USB_SendData(tUSBInterface *Dev, int Endpoint, int Length, void *Data)
58 Log_Warning("USB", "TODO: Implement USB_SendData");
61 void USB_RecvData(tUSBInterface *Dev, int Endpoint, int Length, void *Data)
63 Log_Warning("USB", "TODO: Implement USB_RecvData");
66 void USB_RecvDataA(tUSBInterface *Dev, int Endpoint, int Length, void *DataBuf, tUSB_DataCallback Callback)
68 Log_Warning("USB", "TODO: Implement USB_RecvDataA");
71 void USB_AsyncThread(void *Unused)
75 Semaphore_Wait(&glUSB_AsyncQueue, 1);