projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove MIDI ClassDriver device demo's accidental inclusion of the unused ADC peripher...
[pub/USBasp.git]
/
LUFA
/
Drivers
/
USB
/
LowLevel
/
Host.c
diff --git
a/LUFA/Drivers/USB/LowLevel/Host.c
b/LUFA/Drivers/USB/LowLevel/Host.c
index
2b66e28
..
1d7faa1
100644
(file)
--- a/
LUFA/Drivers/USB/LowLevel/Host.c
+++ b/
LUFA/Drivers/USB/LowLevel/Host.c
@@
-194,19
+194,21
@@
void USB_Host_ProcessNextHostState(void)
uint8_t USB_Host_WaitMS(uint8_t MS)
{
uint8_t USB_Host_WaitMS(uint8_t MS)
{
- bool BusSuspended = USB_Host_IsBusSuspended();
- uint8_t ErrorCode = HOST_WAITERROR_Successful;
- uint16_t PreviousFrameNumber = USB_Host_GetFrameNumber();
+ bool BusSuspended = USB_Host_IsBusSuspended();
+ uint8_t ErrorCode = HOST_WAITERROR_Successful;
USB_Host_ResumeBus();
USB_Host_ResumeBus();
+ bool HSOFIEnabled = USB_INT_IsEnabled(USB_INT_HSOFI);
+
+ USB_INT_Disable(USB_INT_HSOFI);
+ USB_INT_Clear(USB_INT_HSOFI);
+
while (MS)
{
while (MS)
{
- uint16_t CurrentFrameNumber = USB_Host_GetFrameNumber();
-
- if (CurrentFrameNumber != PreviousFrameNumber)
+ if (USB_INT_HasOccurred(USB_INT_HSOFI))
{
{
-
PreviousFrameNumber = CurrentFrameNumber
;
+
USB_INT_Clear(USB_INT_HSOFI)
;
MS--;
}
MS--;
}
@@
-234,6
+236,9
@@
uint8_t USB_Host_WaitMS(uint8_t MS)
}
}
}
}
+ if (HSOFIEnabled)
+ USB_INT_Enable(USB_INT_HSOFI);
+
if (BusSuspended)
USB_Host_SuspendBus();
if (BusSuspended)
USB_Host_SuspendBus();
@@
-333,9
+338,6
@@
uint8_t USB_Host_GetDeviceStringDescriptor(const uint8_t Index,
uint8_t USB_Host_ClearPipeStall(uint8_t EndpointNum)
{
uint8_t USB_Host_ClearPipeStall(uint8_t EndpointNum)
{
- if (Pipe_GetPipeToken() == PIPE_TOKEN_IN)
- EndpointNum |= ENDPOINT_DESCRIPTOR_DIR_IN;
-
USB_ControlRequest = (USB_Request_Header_t)
{
.bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),
USB_ControlRequest = (USB_Request_Header_t)
{
.bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_STANDARD | REQREC_ENDPOINT),