diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2009-06-08 07:34:16 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2009-06-08 07:34:16 +0000 |
commit | ac70ddd0a1c412bb54def48e53caaebd0b5c9c61 (patch) | |
tree | a36501a89cb67ffffd278d94ae4b6519b1d60af9 /LUFA/Drivers/USB/LowLevel/Host.c | |
parent | 33a018474913701fa9ef8e962acf58accd1184d2 (diff) | |
download | lufa-ac70ddd0a1c412bb54def48e53caaebd0b5c9c61.tar.gz lufa-ac70ddd0a1c412bb54def48e53caaebd0b5c9c61.tar.bz2 lufa-ac70ddd0a1c412bb54def48e53caaebd0b5c9c61.zip |
Converted Host mode demos to schedulerless. Fixed host mode broken due to earlier Start-of-frame event experiments.
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/Host.c')
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/Host.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/Host.c b/LUFA/Drivers/USB/LowLevel/Host.c index 02a1c2171..5f3eeb8e8 100644 --- a/LUFA/Drivers/USB/LowLevel/Host.c +++ b/LUFA/Drivers/USB/LowLevel/Host.c @@ -214,9 +214,9 @@ uint8_t USB_Host_WaitMS(uint8_t MS) while (MS)
{
- if (FrameElapsed)
+ if (USB_INT_HasOccurred(USB_INT_HSOFI))
{
- FrameElapsed = false;
+ USB_INT_Clear(USB_INT_HSOFI);
MS--;
}
@@ -259,9 +259,9 @@ static void USB_Host_ResetDevice(void) USB_Host_ResetBus();
while (!(USB_Host_IsBusResetComplete()));
- USB_Host_ResumeBus();
-
- FrameElapsed = false;
+ USB_Host_ResumeBus();
+
+ USB_INT_Clear(USB_INT_HSOFI);
for (uint8_t MSRem = 10; MSRem != 0; MSRem--)
{
@@ -270,10 +270,9 @@ static void USB_Host_ResetDevice(void) looked for - if it is found within 10ms, the device is still
present. */
- if (FrameElapsed)
+ if (USB_INT_HasOccurred(USB_INT_HSOFI))
{
- FrameElapsed = false;
-
+ USB_INT_Clear(USB_INT_HSOFI);
USB_INT_Clear(USB_INT_DDISCI);
break;
}
|