X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FUSB%2FCore%2Fusb_poll.c;h=92e0292292d9f148953139b49ad3216165db0c84;hb=89e41793b9d495d98633f90e6595722b8e5979d3;hp=a4e8d44874077d78b78c9bf444e795972746c4a1;hpb=9c8d1751ca2eb1470a1707e42896262d19efe31d;p=tpg%2Facess2.git diff --git a/Modules/USB/Core/usb_poll.c b/Modules/USB/Core/usb_poll.c index a4e8d448..92e02922 100644 --- a/Modules/USB/Core/usb_poll.c +++ b/Modules/USB/Core/usb_poll.c @@ -33,6 +33,8 @@ void USB_StartPollingEndpoint(tUSBInterface *Iface, int Endpoint) // TODO: Check that this endpoint isn't already on the queue + endpt->InputData = malloc(endpt->MaxPacketSize); + // Determine polling period in atoms endpt->PollingAtoms = (endpt->PollingPeriod + POLL_ATOM-1) / POLL_ATOM; if(endpt->PollingAtoms > POLL_SLOTS) endpt->PollingAtoms = POLL_SLOTS; @@ -78,6 +80,12 @@ int USB_PollThread(void *unused) // TODO: Check the endpoint // TODO: Async checking? // - Send the read request on all of them then wait for the first to complete + USB_RecvDataA( + ep->Interface, ep->EndpointIdx, + ep->MaxPacketSize, ep->InputData, + ep->Interface->Driver->Endpoints[ep->EndpointIdx].DataAvail + ); + // Call callback // Reschedule