Commit of new class abstraction APIs for all device demos other than the MIDI demo - not documented yet.
Removed scheduler and memory allocation libraries. Added new EVENT_USB_StartOfFrame event in the library to indicate the start of each USB frame (when generated). Removed Tx interrupt from the USBtoSerial demo; now sends characters via polling to ensure more time for the Rx interrupt.
This commit is contained in:
parent
2440ca268a
commit
d1e5266036
106 changed files with 3072 additions and 5760 deletions
|
@ -210,14 +210,13 @@ uint8_t USB_Host_WaitMS(uint8_t MS)
|
|||
bool BusSuspended = USB_Host_IsBusSuspended();
|
||||
uint8_t ErrorCode = HOST_WAITERROR_Successful;
|
||||
|
||||
USB_INT_Clear(USB_INT_HSOFI);
|
||||
USB_Host_ResumeBus();
|
||||
|
||||
while (MS)
|
||||
{
|
||||
if (USB_INT_HasOccurred(USB_INT_HSOFI))
|
||||
if (FrameElapsed)
|
||||
{
|
||||
USB_INT_Clear(USB_INT_HSOFI);
|
||||
FrameElapsed = false;
|
||||
MS--;
|
||||
}
|
||||
|
||||
|
@ -260,9 +259,10 @@ static void USB_Host_ResetDevice(void)
|
|||
USB_Host_ResetBus();
|
||||
while (!(USB_Host_IsBusResetComplete()));
|
||||
|
||||
USB_INT_Clear(USB_INT_HSOFI);
|
||||
USB_Host_ResumeBus();
|
||||
|
||||
FrameElapsed = false;
|
||||
|
||||
for (uint8_t MSRem = 10; MSRem != 0; MSRem--)
|
||||
{
|
||||
/* Workaround for powerless-pull-up devices. After a USB bus reset,
|
||||
|
@ -270,8 +270,10 @@ static void USB_Host_ResetDevice(void)
|
|||
looked for - if it is found within 10ms, the device is still
|
||||
present. */
|
||||
|
||||
if (USB_INT_HasOccurred(USB_INT_HSOFI))
|
||||
if (FrameElapsed)
|
||||
{
|
||||
FrameElapsed = false;
|
||||
|
||||
USB_INT_Clear(USB_INT_DDISCI);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue