Added new USB_DeviceState variable to keep track of the current Device mode USB state.
authorDean Camera <dean@fourwalledcubicle.com>
Tue, 21 Jul 2009 13:31:21 +0000 (13:31 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Tue, 21 Jul 2009 13:31:21 +0000 (13:31 +0000)
commite071f3897a0946c6be1e1b5e1f78eda8dcbf6fc7
tree51ac5c80564fd76c93a357ee4d52a347384ac84b
parent44179abcf85acb14fb3aff72ce50ae84281c0f2e
Added new USB_DeviceState variable to keep track of the current Device mode USB state.

Added new Endpoint_ClearStatusStage() convenience function to assist with the status stages of control transfers.

Removed vague USB_IsConnected global - test USB_DeviceState or USB_HostState explicitly to gain previous functionality.

Removed USB_IsSuspended global - test USB_DeviceState against DEVICE_STATE_Suspended instead.

Fixed possible enumeration errors from spinloops which may fail to exit if the USB connection is severed before the exit condition becomes true.
58 files changed:
Bootloaders/CDC/BootloaderCDC.c
Bootloaders/DFU/BootloaderDFU.c
Bootloaders/TeensyHID/TeensyHID.c
Demos/Device/ClassDriver/MassStorage/Lib/DataflashManager.c
Demos/Device/ClassDriver/USBtoSerial/USBtoSerial.c
Demos/Device/Incomplete/Sideshow/Sideshow.c
Demos/Device/LowLevel/AudioInput/AudioInput.c
Demos/Device/LowLevel/AudioOutput/AudioOutput.c
Demos/Device/LowLevel/CDC/CDC.c
Demos/Device/LowLevel/DualCDC/DualCDC.c
Demos/Device/LowLevel/GenericHID/GenericHID.c
Demos/Device/LowLevel/Joystick/Joystick.c
Demos/Device/LowLevel/Keyboard/Keyboard.c
Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c
Demos/Device/LowLevel/MIDI/MIDI.c
Demos/Device/LowLevel/MassStorage/Lib/DataflashManager.c
Demos/Device/LowLevel/MassStorage/MassStorage.c
Demos/Device/LowLevel/Mouse/Mouse.c
Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c
Demos/Device/LowLevel/USBtoSerial/USBtoSerial.c
Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothHCICommands.c
Demos/Host/Incomplete/BluetoothHost/Lib/BluetoothStack.c
Demos/Host/LowLevel/CDCHost/CDCHost.c
Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c
Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c
Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c
Demos/Host/LowLevel/MassStorageHost/Lib/MassStoreCommands.c
Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
Demos/Host/LowLevel/MouseHost/MouseHost.c
Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c
Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c
Demos/Host/LowLevel/PrinterHost/PrinterHost.c
Demos/Host/LowLevel/StillImageHost/Lib/StillImageCommands.c
Demos/Host/LowLevel/StillImageHost/StillImageHost.c
LUFA/Drivers/USB/Class/Device/Audio.c
LUFA/Drivers/USB/Class/Device/CDC.c
LUFA/Drivers/USB/Class/Device/HID.c
LUFA/Drivers/USB/Class/Device/MIDI.c
LUFA/Drivers/USB/Class/Device/MassStorage.c
LUFA/Drivers/USB/Class/Device/RNDIS.c
LUFA/Drivers/USB/HighLevel/Events.h
LUFA/Drivers/USB/HighLevel/USBInterrupt.c
LUFA/Drivers/USB/HighLevel/USBTask.c
LUFA/Drivers/USB/HighLevel/USBTask.h
LUFA/Drivers/USB/LowLevel/DevChapter9.c
LUFA/Drivers/USB/LowLevel/Device.h
LUFA/Drivers/USB/LowLevel/Endpoint.c
LUFA/Drivers/USB/LowLevel/Endpoint.h
LUFA/Drivers/USB/LowLevel/Host.c
LUFA/Drivers/USB/LowLevel/Host.h
LUFA/Drivers/USB/LowLevel/LowLevel.c
LUFA/Drivers/USB/LowLevel/Pipe.c
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_R.c
LUFA/Drivers/USB/LowLevel/Template/Template_Endpoint_Control_W.c
LUFA/ManPages/ChangeLog.txt
LUFA/ManPages/CompileTimeTokens.txt
LUFA/ManPages/MigrationInformation.txt
Projects/MissileLauncher/MissileLauncher.c