} Endpoints[];
};
+extern void USB_RegisterDriver(tUSBDriver *Driver);
+
extern void *USB_GetDeviceDataPtr(tUSBInterface *Dev);
extern void USB_SetDeviceDataPtr(tUSBInterface *Dev, void *Ptr);
tUSBDriver *gpUSB_InterfaceDrivers = &gUSBHub_Driver;
// === CODE ===
+void USB_RegisterDriver(tUSBDriver *Driver)
+{
+ Driver->Next = gpUSB_InterfaceDrivers;
+ gpUSB_InterfaceDrivers = Driver;
+}
+
tUSBHub *USB_RegisterHost(tUSBHostDef *HostDef, void *ControllerPtr, int nPorts)
{
tUSBHost *host;
#include "usb.h"
#include "usb_proto.h"
#include "usb_lowlevel.h"
+#include <timers.h>
// === PROTOTYPES ===
void *USB_int_Request(tUSBHost *Host, int Addr, int EndPt, int Type, int Req, int Val, int Indx, int Len, void *Data);
);
while( Dev->Host->HostDef->IsOpComplete(Dev->Host->Ptr, final) == 0 )
- Time_Delay(1);
+ Threads_Yield();
return 0;
}
#define DEBUG 1
#include <usb_core.h>
#include "usb.h"
+#include <timers.h>
#define POLL_ATOM 25 // 25ms atom
#define POLL_MAX 256 // Max period that can be nominated