diff --git a/Bootloaders/CDC/BootloaderCDC.c b/Bootloaders/CDC/BootloaderCDC.c index 482859bda04..83fd0ee9240 100644 --- a/Bootloaders/CDC/BootloaderCDC.c +++ b/Bootloaders/CDC/BootloaderCDC.c @@ -69,6 +69,9 @@ int main(void) /* Setup hardware required for the bootloader */ SetupHardware(); + /* Enable global interrupts so that the USB stack can function */ + sei(); + while (RunBootloader) { CDC_Task(); diff --git a/Bootloaders/CDC/BootloaderCDC.h b/Bootloaders/CDC/BootloaderCDC.h index 8367002798f..22b57438dfe 100644 --- a/Bootloaders/CDC/BootloaderCDC.h +++ b/Bootloaders/CDC/BootloaderCDC.h @@ -42,6 +42,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c index 157b78ffbfe..d90accb6c5e 100644 --- a/Bootloaders/DFU/BootloaderDFU.c +++ b/Bootloaders/DFU/BootloaderDFU.c @@ -101,6 +101,9 @@ int main(void) { /* Configure hardware required by the bootloader */ SetupHardware(); + + /* Enable global interrupts so that the USB stack can function */ + sei(); /* Run the USB management task while the bootloader is supposed to be running */ while (RunBootloader || WaitForExit) diff --git a/Bootloaders/DFU/BootloaderDFU.h b/Bootloaders/DFU/BootloaderDFU.h index ca53266bf87..4583d6ce101 100644 --- a/Bootloaders/DFU/BootloaderDFU.h +++ b/Bootloaders/DFU/BootloaderDFU.h @@ -43,6 +43,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Bootloaders/Incomplete/MIDI/BootloaderMIDI.c b/Bootloaders/Incomplete/MIDI/BootloaderMIDI.c index 8d26d56a05b..863820157df 100644 --- a/Bootloaders/Incomplete/MIDI/BootloaderMIDI.c +++ b/Bootloaders/Incomplete/MIDI/BootloaderMIDI.c @@ -42,8 +42,6 @@ int main(void) { SetupHardware(); - - LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); for (;;) { @@ -63,48 +61,22 @@ void SetupHardware(void) clock_prescale_set(clock_div_1); /* Hardware Initialization */ - LEDs_Init(); USB_Init(); } -/** Event handler for the USB_Connect event. This indicates that the device is enumerating via the status LEDs. */ -void EVENT_USB_Device_Connect(void) -{ - /* Indicate USB enumerating */ - LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING); -} - -/** Event handler for the USB_Disconnect event. This indicates that the device is no longer connected to a host via - * the status LEDs, disables the sample update and PWM output timers and stops the USB and MIDI management tasks. - */ -void EVENT_USB_Device_Disconnect(void) -{ - /* Indicate USB not ready */ - LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); -} - /** Event handler for the USB_ConfigurationChanged event. This is fired when the host set the current configuration * of the USB device after enumeration - the device endpoints are configured and the MIDI management task started. */ void EVENT_USB_Device_ConfigurationChanged(void) { - /* Indicate USB connected and ready */ - LEDs_SetAllLEDs(LEDMASK_USB_READY); - /* Setup MIDI stream endpoints */ - if (!(Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPNUM, EP_TYPE_BULK, - ENDPOINT_DIR_OUT, MIDI_STREAM_EPSIZE, - ENDPOINT_BANK_SINGLE))) - { - LEDs_SetAllLEDs(LEDMASK_USB_ERROR); - } + Endpoint_ConfigureEndpoint(MIDI_STREAM_OUT_EPNUM, EP_TYPE_BULK, + ENDPOINT_DIR_OUT, MIDI_STREAM_EPSIZE, + ENDPOINT_BANK_SINGLE); - if (!(Endpoint_ConfigureEndpoint(MIDI_STREAM_IN_EPNUM, EP_TYPE_BULK, - ENDPOINT_DIR_IN, MIDI_STREAM_EPSIZE, - ENDPOINT_BANK_SINGLE))) - { - LEDs_SetAllLEDs(LEDMASK_USB_ERROR); - } + Endpoint_ConfigureEndpoint(MIDI_STREAM_IN_EPNUM, EP_TYPE_BULK, + ENDPOINT_DIR_IN, MIDI_STREAM_EPSIZE, + ENDPOINT_BANK_SINGLE); } /** Task to handle the generation of MIDI note change events in response to presses of the board joystick, and send them @@ -122,9 +94,7 @@ void MIDI_Task(void) if (Endpoint_IsOUTReceived()) { USB_MIDI_EventPacket_t InPacket; - Endpoint_Read_Stream_LE(&InPacket, sizeof(InPacket)); - - LEDs_SetAllLEDs(InPacket.Data2 > 64 ? LEDS_LED1 : LEDS_LED2); + Endpoint_Read_Stream_LE(&InPacket, sizeof(InPacket)); Endpoint_ClearOUT(); uint8_t Channel = InPacket.Data1; diff --git a/Bootloaders/Incomplete/MIDI/BootloaderMIDI.h b/Bootloaders/Incomplete/MIDI/BootloaderMIDI.h index 5af684da466..b5688195b36 100644 --- a/Bootloaders/Incomplete/MIDI/BootloaderMIDI.h +++ b/Bootloaders/Incomplete/MIDI/BootloaderMIDI.h @@ -41,12 +41,12 @@ #include #include #include + #include #include #include "Descriptors.h" #include - #include #include /* Macros: */ diff --git a/Bootloaders/TeensyHID/TeensyHID.c b/Bootloaders/TeensyHID/TeensyHID.c index 2317ea4e5de..5431a57004f 100644 --- a/Bootloaders/TeensyHID/TeensyHID.c +++ b/Bootloaders/TeensyHID/TeensyHID.c @@ -49,6 +49,9 @@ int main(void) /* Setup hardware required for the bootloader */ SetupHardware(); + /* Enable global interrupts so that the USB stack can function */ + sei(); + while (RunBootloader) USB_USBTask(); diff --git a/Bootloaders/TeensyHID/TeensyHID.h b/Bootloaders/TeensyHID/TeensyHID.h index 6393898705a..7e3d72dcf71 100644 --- a/Bootloaders/TeensyHID/TeensyHID.h +++ b/Bootloaders/TeensyHID/TeensyHID.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.c b/Demos/Device/ClassDriver/AudioInput/AudioInput.c index 22d0173a9f3..09a2f0f01de 100644 --- a/Demos/Device/ClassDriver/AudioInput/AudioInput.c +++ b/Demos/Device/ClassDriver/AudioInput/AudioInput.c @@ -59,6 +59,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/AudioInput/AudioInput.h b/Demos/Device/ClassDriver/AudioInput/AudioInput.h index 98fec78133b..dc3475e693b 100644 --- a/Demos/Device/ClassDriver/AudioInput/AudioInput.h +++ b/Demos/Device/ClassDriver/AudioInput/AudioInput.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c index be3eb42c957..0dda68c3724 100644 --- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c +++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.c @@ -59,6 +59,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h index e8bd7691455..cf0034f8782 100644 --- a/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h +++ b/Demos/Device/ClassDriver/AudioOutput/AudioOutput.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c index dd64c285138..ba3b86f1212 100644 --- a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c +++ b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.c @@ -94,6 +94,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h index a7ce35df71b..1c99cfde8f6 100644 --- a/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h +++ b/Demos/Device/ClassDriver/DualVirtualSerial/DualVirtualSerial.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Demos/Device/ClassDriver/GenericHID/GenericHID.c b/Demos/Device/ClassDriver/GenericHID/GenericHID.c index 3516f085739..285a197b76e 100644 --- a/Demos/Device/ClassDriver/GenericHID/GenericHID.c +++ b/Demos/Device/ClassDriver/GenericHID/GenericHID.c @@ -74,6 +74,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/GenericHID/GenericHID.h b/Demos/Device/ClassDriver/GenericHID/GenericHID.h index 423e28f430a..595bd0ea048 100644 --- a/Demos/Device/ClassDriver/GenericHID/GenericHID.h +++ b/Demos/Device/ClassDriver/GenericHID/GenericHID.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.c b/Demos/Device/ClassDriver/Joystick/Joystick.c index 518c86e8f3c..6a259d7c3ed 100644 --- a/Demos/Device/ClassDriver/Joystick/Joystick.c +++ b/Demos/Device/ClassDriver/Joystick/Joystick.c @@ -66,6 +66,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.h b/Demos/Device/ClassDriver/Joystick/Joystick.h index 7932ab5c27a..9f666fe72c4 100644 --- a/Demos/Device/ClassDriver/Joystick/Joystick.h +++ b/Demos/Device/ClassDriver/Joystick/Joystick.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.c b/Demos/Device/ClassDriver/Keyboard/Keyboard.c index ea4fbf8192a..0da529543e7 100644 --- a/Demos/Device/ClassDriver/Keyboard/Keyboard.c +++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.c @@ -66,6 +66,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/Keyboard/Keyboard.h b/Demos/Device/ClassDriver/Keyboard/Keyboard.h index 945c7e89452..2c86bf5a2c2 100644 --- a/Demos/Device/ClassDriver/Keyboard/Keyboard.h +++ b/Demos/Device/ClassDriver/Keyboard/Keyboard.h @@ -40,8 +40,8 @@ /* Includes: */ #include #include - #include #include + #include #include #include diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c index 1f87a7a6b09..94f27bd1bd1 100644 --- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c +++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.c @@ -89,6 +89,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h index ca4cfecd859..4c540ccb0f4 100644 --- a/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h +++ b/Demos/Device/ClassDriver/KeyboardMouse/KeyboardMouse.h @@ -36,6 +36,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Device/ClassDriver/MIDI/MIDI.c b/Demos/Device/ClassDriver/MIDI/MIDI.c index 5c0f25e6498..7fcdfcc5fef 100644 --- a/Demos/Device/ClassDriver/MIDI/MIDI.c +++ b/Demos/Device/ClassDriver/MIDI/MIDI.c @@ -64,6 +64,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/MIDI/MIDI.h b/Demos/Device/ClassDriver/MIDI/MIDI.h index c8cb4268df0..96e2b40d862 100644 --- a/Demos/Device/ClassDriver/MIDI/MIDI.h +++ b/Demos/Device/ClassDriver/MIDI/MIDI.h @@ -40,7 +40,9 @@ #include #include #include + #include #include + #include #include "Descriptors.h" diff --git a/Demos/Device/ClassDriver/MassStorage/MassStorage.c b/Demos/Device/ClassDriver/MassStorage/MassStorage.c index ce8e04bc93e..c58dff95f74 100644 --- a/Demos/Device/ClassDriver/MassStorage/MassStorage.c +++ b/Demos/Device/ClassDriver/MassStorage/MassStorage.c @@ -66,6 +66,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/MassStorage/MassStorage.h b/Demos/Device/ClassDriver/MassStorage/MassStorage.h index 2c7fa7d7feb..64da5b3bc67 100644 --- a/Demos/Device/ClassDriver/MassStorage/MassStorage.h +++ b/Demos/Device/ClassDriver/MassStorage/MassStorage.h @@ -40,6 +40,8 @@ #include #include #include + #include + #include #include "Descriptors.h" diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c index 828699af56d..9b4efb67988 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.c @@ -89,6 +89,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h index deeb6e048e1..65600eef1f7 100644 --- a/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h +++ b/Demos/Device/ClassDriver/MassStorageKeyboard/MassStorageKeyboard.h @@ -42,6 +42,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Device/ClassDriver/Mouse/Mouse.c b/Demos/Device/ClassDriver/Mouse/Mouse.c index 48348c774a8..96af1455874 100644 --- a/Demos/Device/ClassDriver/Mouse/Mouse.c +++ b/Demos/Device/ClassDriver/Mouse/Mouse.c @@ -66,6 +66,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/Mouse/Mouse.h b/Demos/Device/ClassDriver/Mouse/Mouse.h index 79d56aa506d..818d540691b 100644 --- a/Demos/Device/ClassDriver/Mouse/Mouse.h +++ b/Demos/Device/ClassDriver/Mouse/Mouse.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h index a3b92fa5bbf..2dfc6086888 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h +++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/ProtocolDecoders.h @@ -38,6 +38,8 @@ /* Includes: */ #include + #include + #include #include #include diff --git a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c index dbdbb8ab86c..14016aa64c1 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c +++ b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.c @@ -70,12 +70,11 @@ int main(void) { SetupHardware(); - LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); - TCP_Init(); Webserver_Init(); - printf_P(PSTR("\r\n\r\n****** RNDIS Demo running. ******\r\n")); + LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h index 3bed7f8514f..c6c092ccc38 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h +++ b/Demos/Device/ClassDriver/RNDISEthernet/RNDISEthernet.h @@ -39,10 +39,9 @@ /* Includes: */ #include #include - #include #include + #include #include - #include #include "Descriptors.h" diff --git a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c index 30cbc6695cf..1a8d6ede833 100644 --- a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c +++ b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.c @@ -76,6 +76,7 @@ int main(void) CDC_Device_CreateStream(&VirtualSerial_CDC_Interface, &USBSerialStream); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h index 96d83800b25..0edac545b84 100644 --- a/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h +++ b/Demos/Device/ClassDriver/VirtualSerial/VirtualSerial.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c index e7c899b79dd..c55d6d00143 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c +++ b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.c @@ -90,6 +90,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h index c0e6e790381..3d6d3a7e399 100644 --- a/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h +++ b/Demos/Device/ClassDriver/VirtualSerialMouse/VirtualSerialMouse.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Demos/Device/Incomplete/Sideshow/Sideshow.c b/Demos/Device/Incomplete/Sideshow/Sideshow.c index 6c48c34e3cf..5f70b34c6c1 100644 --- a/Demos/Device/Incomplete/Sideshow/Sideshow.c +++ b/Demos/Device/Incomplete/Sideshow/Sideshow.c @@ -58,6 +58,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/Incomplete/Sideshow/Sideshow.h b/Demos/Device/Incomplete/Sideshow/Sideshow.h index a75d3d9bcd6..871e4770617 100644 --- a/Demos/Device/Incomplete/Sideshow/Sideshow.h +++ b/Demos/Device/Incomplete/Sideshow/Sideshow.h @@ -35,6 +35,7 @@ #include #include #include + #include #include "Descriptors.h" #include "Lib/SideshowCommands.h" diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.c b/Demos/Device/LowLevel/AudioInput/AudioInput.c index 392609b0721..aa8967cd06d 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.c +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.c @@ -47,6 +47,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.h b/Demos/Device/LowLevel/AudioInput/AudioInput.h index 4585ab5b6de..6902dc8f084 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.h +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.h @@ -40,6 +40,7 @@ #include #include #include + #include #include "Descriptors.h" diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c index 5dcb5c576c7..8cd6be17bb9 100644 --- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c +++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c @@ -47,6 +47,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.h b/Demos/Device/LowLevel/AudioOutput/AudioOutput.h index 3812ae0fd14..69b59b8fad8 100644 --- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.h +++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.h @@ -40,7 +40,7 @@ #include #include #include - #include + #include #include "Descriptors.h" diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c index 9be089b2b06..5c90c6ab81a 100644 --- a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c +++ b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c @@ -69,6 +69,9 @@ CDC_Line_Coding_t LineEncoding2 = { .BaudRateBPS = 0, int main(void) { SetupHardware(); + + LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h index a4c8f97ca58..6ca8b72a6da 100644 --- a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h +++ b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.c b/Demos/Device/LowLevel/GenericHID/GenericHID.c index 4d3f4c1bab3..9d9012aff1f 100644 --- a/Demos/Device/LowLevel/GenericHID/GenericHID.c +++ b/Demos/Device/LowLevel/GenericHID/GenericHID.c @@ -48,6 +48,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.h b/Demos/Device/LowLevel/GenericHID/GenericHID.h index c79ed6f449d..deaee336c0a 100644 --- a/Demos/Device/LowLevel/GenericHID/GenericHID.h +++ b/Demos/Device/LowLevel/GenericHID/GenericHID.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Device/LowLevel/Joystick/Joystick.c b/Demos/Device/LowLevel/Joystick/Joystick.c index 0edead5c8ea..e84eef04245 100644 --- a/Demos/Device/LowLevel/Joystick/Joystick.c +++ b/Demos/Device/LowLevel/Joystick/Joystick.c @@ -44,6 +44,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/LowLevel/Joystick/Joystick.h b/Demos/Device/LowLevel/Joystick/Joystick.h index 811cb4e4279..761582d4516 100644 --- a/Demos/Device/LowLevel/Joystick/Joystick.h +++ b/Demos/Device/LowLevel/Joystick/Joystick.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Demos/Device/LowLevel/Keyboard/Keyboard.c b/Demos/Device/LowLevel/Keyboard/Keyboard.c index fd7e63e2b56..67715843b9a 100644 --- a/Demos/Device/LowLevel/Keyboard/Keyboard.c +++ b/Demos/Device/LowLevel/Keyboard/Keyboard.c @@ -62,6 +62,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/LowLevel/Keyboard/Keyboard.h b/Demos/Device/LowLevel/Keyboard/Keyboard.h index 4cb3616c7d7..f41f6d4c31a 100644 --- a/Demos/Device/LowLevel/Keyboard/Keyboard.h +++ b/Demos/Device/LowLevel/Keyboard/Keyboard.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c index e41b7090bdc..ddcd3ce8ecd 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c +++ b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c @@ -52,6 +52,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h index 7fcec978ba3..993b326a298 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h +++ b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h @@ -36,6 +36,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Device/LowLevel/MIDI/MIDI.c b/Demos/Device/LowLevel/MIDI/MIDI.c index edfc56f48c4..03536b2c56a 100644 --- a/Demos/Device/LowLevel/MIDI/MIDI.c +++ b/Demos/Device/LowLevel/MIDI/MIDI.c @@ -44,7 +44,8 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); - + sei(); + for (;;) { MIDI_Task(); diff --git a/Demos/Device/LowLevel/MIDI/MIDI.h b/Demos/Device/LowLevel/MIDI/MIDI.h index 82e42da0d9d..a4975272987 100644 --- a/Demos/Device/LowLevel/MIDI/MIDI.h +++ b/Demos/Device/LowLevel/MIDI/MIDI.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.c b/Demos/Device/LowLevel/MassStorage/MassStorage.c index fc9a97de48c..1ed84d326b6 100644 --- a/Demos/Device/LowLevel/MassStorage/MassStorage.c +++ b/Demos/Device/LowLevel/MassStorage/MassStorage.c @@ -55,6 +55,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.h b/Demos/Device/LowLevel/MassStorage/MassStorage.h index 44302084c37..27d1e3b000c 100644 --- a/Demos/Device/LowLevel/MassStorage/MassStorage.h +++ b/Demos/Device/LowLevel/MassStorage/MassStorage.h @@ -40,6 +40,7 @@ #include #include #include + #include #include "Descriptors.h" diff --git a/Demos/Device/LowLevel/Mouse/Mouse.c b/Demos/Device/LowLevel/Mouse/Mouse.c index 70ed82cc844..3fce5221004 100644 --- a/Demos/Device/LowLevel/Mouse/Mouse.c +++ b/Demos/Device/LowLevel/Mouse/Mouse.c @@ -61,6 +61,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/LowLevel/Mouse/Mouse.h b/Demos/Device/LowLevel/Mouse/Mouse.h index 884482b3d18..6a1a518fbc9 100644 --- a/Demos/Device/LowLevel/Mouse/Mouse.h +++ b/Demos/Device/LowLevel/Mouse/Mouse.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h index 7bae188e884..01856755042 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h @@ -38,6 +38,8 @@ /* Includes: */ #include + #include + #include #include diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c index 1b617dd2ecd..cb06bc33358 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c +++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c @@ -47,9 +47,8 @@ int main(void) TCP_Init(); Webserver_Init(); - printf_P(PSTR("\r\n\r\n****** RNDIS Demo running. ******\r\n")); - LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h index 3828134acd0..478ed1a23c4 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h +++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h @@ -39,10 +39,9 @@ /* Includes: */ #include #include - #include #include + #include #include - #include #include "Descriptors.h" diff --git a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c index bad87578a41..52ef28c6fa0 100644 --- a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c +++ b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c @@ -57,6 +57,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h index 5427a6902c7..1ec261c4190 100644 --- a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h +++ b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c index dc94e1fba4d..98bf50bfffe 100644 --- a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c +++ b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.c @@ -46,6 +46,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Mouse Host/Device Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.h b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.h index 50b89ad3211..48035d62457 100644 --- a/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.h +++ b/Demos/DualRole/ClassDriver/MouseHostDevice/MouseHostDevice.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c index 0e7e5798243..32c9b698f88 100644 --- a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c +++ b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c @@ -70,6 +70,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Joystick Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h index b47630ae486..7ee7b80d7e3 100644 --- a/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h +++ b/Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c index 15b93199eff..61292a4d02b 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c +++ b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c @@ -65,7 +65,8 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Keyboard Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); - + sei(); + for (;;) { switch (USB_HostState) diff --git a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h index 0dc2d3bf5fa..2e5f1caeef6 100644 --- a/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h +++ b/Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c index 14b65012065..531757a4ae6 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -70,6 +70,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Keyboard Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h index 8f419481618..98d00fb3ce9 100644 --- a/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h +++ b/Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c index 064c22dd633..8fbf31b86d2 100644 --- a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c +++ b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.c @@ -63,6 +63,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "MIDI Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h index 6a93c97174b..8da4a95ef4a 100644 --- a/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h +++ b/Demos/Host/ClassDriver/MIDIHost/MIDIHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c index 6740d9cb7f6..a442c1b47c8 100644 --- a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c +++ b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c @@ -63,6 +63,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Mass Storage Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h index 5a61c268ed2..e97d1e3fecf 100644 --- a/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h +++ b/Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.c b/Demos/Host/ClassDriver/MouseHost/MouseHost.c index 4501a25dc22..af75d4ba54b 100644 --- a/Demos/Host/ClassDriver/MouseHost/MouseHost.c +++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.c @@ -65,6 +65,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Mouse Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/ClassDriver/MouseHost/MouseHost.h b/Demos/Host/ClassDriver/MouseHost/MouseHost.h index 1fdf42b8687..bc64120f05a 100644 --- a/Demos/Host/ClassDriver/MouseHost/MouseHost.h +++ b/Demos/Host/ClassDriver/MouseHost/MouseHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c index c735b5c0051..296f86bfb54 100644 --- a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c @@ -68,6 +68,7 @@ int main(void) SetupHardware(); puts_P(PSTR(ESC_FG_CYAN "Mouse Host Demo running.\r\n" ESC_FG_WHITE)); + sei(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); diff --git a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h index 8d798ab37bd..e88738d5af5 100644 --- a/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h +++ b/Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c index 2df65729324..d2baad6200d 100644 --- a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c +++ b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.c @@ -62,6 +62,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Printer Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h index c2ebede684a..2fb7c8cefb9 100644 --- a/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h +++ b/Demos/Host/ClassDriver/PrinterHost/PrinterHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c index e31f9a3362b..f5c3e4256f5 100644 --- a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c +++ b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c @@ -70,6 +70,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "RNDIS Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h index 06b9fd525d9..c0d0c60832c 100644 --- a/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h +++ b/Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c index ff33c457d56..81bfbe4212f 100644 --- a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c +++ b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.c @@ -65,6 +65,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Still Image Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h index 35c9f127600..4078238e08c 100644 --- a/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h +++ b/Demos/Host/ClassDriver/StillImageHost/StillImageHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c index d5ec0417b97..df6ad9796e3 100644 --- a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c +++ b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c @@ -65,6 +65,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "CDC Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h index 785a605a060..a54e75f9f99 100644 --- a/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h +++ b/Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c b/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c index 8f6e1f2ffff..e74d37749d0 100644 --- a/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c +++ b/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.c @@ -54,6 +54,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Bluetooth Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.h b/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.h index 62baf06abe8..8a2817cb710 100644 --- a/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.h +++ b/Demos/Host/Incomplete/BluetoothHost/BluetoothHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include "Lib/ServiceDiscoveryProtocol.h" diff --git a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c index 38d96a3dfa3..3dc314e49c6 100644 --- a/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c +++ b/Demos/Host/LowLevel/GenericHIDHost/GenericHIDHost.c @@ -46,6 +46,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Generic HID Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c index 144830ec4e9..04870b10acf 100644 --- a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c +++ b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c @@ -46,6 +46,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Joystick HID Parser Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h index 38fe3e44b3a..2ac9d5cffe7 100644 --- a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h +++ b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c index b85d40d1867..633094f138f 100644 --- a/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c +++ b/Demos/Host/LowLevel/KeyboardHost/KeyboardHost.c @@ -46,6 +46,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Keyboard HID Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c index 778220b470e..431e76aea11 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.c @@ -46,6 +46,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Keyboard HID Parser Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h index f5aaf2da816..5df5622d7d7 100644 --- a/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h +++ b/Demos/Host/LowLevel/KeyboardHostWithParser/KeyboardHostWithParser.h @@ -36,6 +36,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c index 6964f71eaea..cbbb0c565fb 100644 --- a/Demos/Host/LowLevel/MIDIHost/MIDIHost.c +++ b/Demos/Host/LowLevel/MIDIHost/MIDIHost.c @@ -46,6 +46,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "MIDI Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/LowLevel/MIDIHost/MIDIHost.h b/Demos/Host/LowLevel/MIDIHost/MIDIHost.h index 094adcc4a8f..576ad601e2f 100644 --- a/Demos/Host/LowLevel/MIDIHost/MIDIHost.h +++ b/Demos/Host/LowLevel/MIDIHost/MIDIHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c index 55b85939f10..31d2c104d50 100644 --- a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c +++ b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c @@ -50,6 +50,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Mass Storage Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h index fad372c4e6e..0d92fd53386 100644 --- a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h +++ b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include #include diff --git a/Demos/Host/LowLevel/MouseHost/MouseHost.c b/Demos/Host/LowLevel/MouseHost/MouseHost.c index 1c594000522..5cf5e4485fa 100644 --- a/Demos/Host/LowLevel/MouseHost/MouseHost.c +++ b/Demos/Host/LowLevel/MouseHost/MouseHost.c @@ -46,6 +46,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Mouse HID Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c index 14883018c3e..e13f5f48ed3 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c +++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.c @@ -46,6 +46,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Mouse HID Parser Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h index e05beb8dd4a..10cd8ecefeb 100644 --- a/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h +++ b/Demos/Host/LowLevel/MouseHostWithParser/MouseHostWithParser.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c index 6840138b592..a2c9fd86342 100644 --- a/Demos/Host/LowLevel/PrinterHost/PrinterHost.c +++ b/Demos/Host/LowLevel/PrinterHost/PrinterHost.c @@ -46,6 +46,7 @@ int main(void) LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); puts_P(PSTR(ESC_FG_CYAN "Printer Host Demo running.\r\n" ESC_FG_WHITE)); + sei(); for (;;) { diff --git a/Demos/Host/LowLevel/PrinterHost/PrinterHost.h b/Demos/Host/LowLevel/PrinterHost/PrinterHost.h index 7fa572cf92a..9b0bb5dda21 100644 --- a/Demos/Host/LowLevel/PrinterHost/PrinterHost.h +++ b/Demos/Host/LowLevel/PrinterHost/PrinterHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c index 5ca59157879..8e274302e9c 100644 --- a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c +++ b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.c @@ -46,6 +46,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "RNDIS Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h index 20a48ac1049..8e9215751c0 100644 --- a/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h +++ b/Demos/Host/LowLevel/RNDISEthernetHost/RNDISEthernetHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c index 45613197f10..2daf3ef4b44 100644 --- a/Demos/Host/LowLevel/StillImageHost/StillImageHost.c +++ b/Demos/Host/LowLevel/StillImageHost/StillImageHost.c @@ -46,6 +46,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "Still Image Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/LowLevel/StillImageHost/StillImageHost.h b/Demos/Host/LowLevel/StillImageHost/StillImageHost.h index ddbffeec4b1..92f007be9f6 100644 --- a/Demos/Host/LowLevel/StillImageHost/StillImageHost.h +++ b/Demos/Host/LowLevel/StillImageHost/StillImageHost.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include "ConfigDescriptor.h" diff --git a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c index 588198bb40a..735ebba3196 100644 --- a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c +++ b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.c @@ -46,6 +46,7 @@ int main(void) puts_P(PSTR(ESC_FG_CYAN "CDC Host Demo running.\r\n" ESC_FG_WHITE)); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h index 7bfc13f3155..ecf35229d73 100644 --- a/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h +++ b/Demos/Host/LowLevel/VirtualSerialHost/VirtualSerialHost.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.c b/LUFA/Drivers/USB/LowLevel/LowLevel.c index c9d0493b4ca..a088654f781 100644 --- a/LUFA/Drivers/USB/LowLevel/LowLevel.c +++ b/LUFA/Drivers/USB/LowLevel/LowLevel.c @@ -103,8 +103,6 @@ void USB_Init( #endif USB_IsInitialized = true; - - sei(); } void USB_ShutDown(void) diff --git a/LUFA/Drivers/USB/LowLevel/LowLevel.h b/LUFA/Drivers/USB/LowLevel/LowLevel.h index 79261cd441b..337a004a58e 100644 --- a/LUFA/Drivers/USB/LowLevel/LowLevel.h +++ b/LUFA/Drivers/USB/LowLevel/LowLevel.h @@ -236,8 +236,12 @@ * allow for device connection to a host when in device mode, or for device enumeration while in * host mode. * - * As the USB library relies on USB interrupts for some of its functionality, this routine will - * enable global interrupts. + * As the USB library relies on interrupts for the device and host mode enumeration processes, + * the user must enable global interrupts before or shortly after this function is called. In + * device mode, interrupts must be enabled within 500ms of this function being called to ensure + * that the host does not time out whilst enumerating the device. In host mode, interrupts may be + * enabled at the application's leisure however enumeration will not begin of an attached device + * until after this has occurred. * * Calling this function when the USB interface is already initialized will cause a complete USB * interface reset and re-enumeration. diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt index 425cb4372c3..2a772b88097 100644 --- a/LUFA/ManPages/ChangeLog.txt +++ b/LUFA/ManPages/ChangeLog.txt @@ -28,6 +28,7 @@ * - Added LIBUSB_FILTERDRV_COMPAT compile time option to the AVRISP programmer project to make the code compatible with Windows * builds of avrdude at the expense of AVRStudio compatibility * - Removed two-step endpoint/pipe bank clear and switch sequence for smaller, faster endpoint/pipe code + * - The USB_Init() function no longer calls sei() - the user is now responsible for enabling interrupts when they are ready * * Fixed: * - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin diff --git a/LUFA/ManPages/MigrationInformation.txt b/LUFA/ManPages/MigrationInformation.txt index 8467e001937..baed5098798 100644 --- a/LUFA/ManPages/MigrationInformation.txt +++ b/LUFA/ManPages/MigrationInformation.txt @@ -16,6 +16,18 @@ * - The \ref TWI_StartTransmission() function now takes in a timeout period, expressed in milliseconds, within which the addressed * device must respond or the function will abort. * + * Device Mode + * - The \ref USB_Init() function no longer calls sei() to enable global interrupts, as the user application may need + * to perform other initialization before it is ready to handle global interrupts. The user application is now responsible + * for enabling global interrupts before or shortly after calling \ref USB_Init() to ensure that the enumeration process + * functions correctly. + * + * Host Mode + * - The \ref USB_Init() function no longer calls sei() to enable global interrupts, as the user application may need + * to perform other initialization before it is ready to handle global interrupts. The user application is now responsible + * for enabling global interrupts before or shortly after calling \ref USB_Init() to ensure that the enumeration process + * functions correctly. + * * \section Sec_Migration100219 Migrating from 091223 to 100219 * * Non-USB Library Components diff --git a/Projects/AVRISP-MKII/AVRISP.c b/Projects/AVRISP-MKII/AVRISP.c index 2ba80019949..cea1161d515 100644 --- a/Projects/AVRISP-MKII/AVRISP.c +++ b/Projects/AVRISP-MKII/AVRISP.c @@ -44,6 +44,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Projects/Benito/Benito.c b/Projects/Benito/Benito.c index 86da27a1297..be623e90ef2 100644 --- a/Projects/Benito/Benito.c +++ b/Projects/Benito/Benito.c @@ -83,6 +83,8 @@ int main(void) SetupHardware(); Buffer_Initialize(&Tx_Buffer); + + sei(); for (;;) { diff --git a/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.c b/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.c index 4df37504f5e..c86cd07529a 100644 --- a/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.c +++ b/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.c @@ -88,6 +88,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.h b/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.h index f7f39d5a908..d2405f881cf 100644 --- a/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.h +++ b/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c index 8090b5d158a..239eb7137f5 100644 --- a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c +++ b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c @@ -108,6 +108,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.h b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.h index 5623945458e..f61e369ebb8 100644 --- a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.h +++ b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include "DiskDevice.h" diff --git a/Projects/LEDNotifier/LEDNotifier.c b/Projects/LEDNotifier/LEDNotifier.c index 61d5efcbb57..5b53900249e 100644 --- a/Projects/LEDNotifier/LEDNotifier.c +++ b/Projects/LEDNotifier/LEDNotifier.c @@ -107,6 +107,8 @@ int main(void) /* Create a regular blocking character stream for the interface so that it can be used with the stdio.h functions */ CDC_Device_CreateBlockingStream(&VirtualSerial_CDC_Interface, &USBSerialStream); + + sei(); for (;;) { diff --git a/Projects/LEDNotifier/LEDNotifier.h b/Projects/LEDNotifier/LEDNotifier.h index ee41d7d9336..243723ec8b0 100644 --- a/Projects/LEDNotifier/LEDNotifier.h +++ b/Projects/LEDNotifier/LEDNotifier.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include diff --git a/Projects/Magstripe/Magstripe.c b/Projects/Magstripe/Magstripe.c index 88950cc2177..39149b48056 100644 --- a/Projects/Magstripe/Magstripe.c +++ b/Projects/Magstripe/Magstripe.c @@ -76,6 +76,8 @@ int main(void) for (uint8_t Buffer = 0; Buffer < TOTAL_TRACKS; Buffer++) BitBuffer_Init(&TrackDataBuffers[Buffer]); + + sei(); for (;;) { diff --git a/Projects/Magstripe/Magstripe.h b/Projects/Magstripe/Magstripe.h index ddadd0d7537..8a48e7c1ad4 100644 --- a/Projects/Magstripe/Magstripe.h +++ b/Projects/Magstripe/Magstripe.h @@ -41,6 +41,7 @@ #include #include #include + #include #include "Descriptors.h" #include "Lib/MagstripeHW.h" diff --git a/Projects/MissileLauncher/MissileLauncher.c b/Projects/MissileLauncher/MissileLauncher.c index a1867329050..cb0bd8570c0 100644 --- a/Projects/MissileLauncher/MissileLauncher.c +++ b/Projects/MissileLauncher/MissileLauncher.c @@ -95,10 +95,11 @@ int main(void) { SetupHardware(); - LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); - CmdState = CMD_STOP; + LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); + for (;;) { Read_Joystick_Status(); diff --git a/Projects/RelayBoard/RelayBoard.c b/Projects/RelayBoard/RelayBoard.c index a496679aea2..2fb7b696cee 100644 --- a/Projects/RelayBoard/RelayBoard.c +++ b/Projects/RelayBoard/RelayBoard.c @@ -44,6 +44,8 @@ int main(void) { SetupHardware(); + + sei(); for (;;) USB_USBTask(); diff --git a/Projects/RelayBoard/RelayBoard.h b/Projects/RelayBoard/RelayBoard.h index 2ffa59023c8..f42d78cde06 100644 --- a/Projects/RelayBoard/RelayBoard.h +++ b/Projects/RelayBoard/RelayBoard.h @@ -41,6 +41,7 @@ #include #include #include + #include #include "Descriptors.h" diff --git a/Projects/TemperatureDataLogger/TempDataLogger.c b/Projects/TemperatureDataLogger/TempDataLogger.c index 35bf68bd6c3..59105286e88 100644 --- a/Projects/TemperatureDataLogger/TempDataLogger.c +++ b/Projects/TemperatureDataLogger/TempDataLogger.c @@ -137,16 +137,17 @@ ISR(TIMER1_COMPA_vect, ISR_BLOCK) */ int main(void) { + SetupHardware(); + /* Fetch logging interval from EEPROM */ LoggingInterval500MS_SRAM = eeprom_read_byte(&LoggingInterval500MS_EEPROM); - SetupHardware(); - - LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); - /* Mount and open the log file on the dataflash FAT partition */ OpenLogFile(); + LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); + /* Discard the first sample from the temperature sensor, as it is generally incorrect */ volatile uint8_t Dummy = Temperature_GetTemperature(); (void)Dummy; diff --git a/Projects/TemperatureDataLogger/TempDataLogger.h b/Projects/TemperatureDataLogger/TempDataLogger.h index 3f3a3c04e23..a6e770bb0c4 100644 --- a/Projects/TemperatureDataLogger/TempDataLogger.h +++ b/Projects/TemperatureDataLogger/TempDataLogger.h @@ -40,6 +40,7 @@ #include #include #include + #include #include #include "Descriptors.h" diff --git a/Projects/USBtoSerial/USBtoSerial.c b/Projects/USBtoSerial/USBtoSerial.c index 73be33e1fd1..c9bc717341e 100644 --- a/Projects/USBtoSerial/USBtoSerial.c +++ b/Projects/USBtoSerial/USBtoSerial.c @@ -77,6 +77,7 @@ int main(void) Buffer_Initialize(&USARTtoUSB_Buffer); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Projects/Webserver/Webserver.c b/Projects/Webserver/Webserver.c index 541e0e2c528..cecd881688f 100644 --- a/Projects/Webserver/Webserver.c +++ b/Projects/Webserver/Webserver.c @@ -44,6 +44,7 @@ int main(void) SetupHardware(); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Projects/Webserver/Webserver.h b/Projects/Webserver/Webserver.h index f1351d8913a..4fb5b37b480 100644 --- a/Projects/Webserver/Webserver.h +++ b/Projects/Webserver/Webserver.h @@ -41,6 +41,7 @@ #include #include #include + #include #include #include diff --git a/Projects/XPLAINBridge/XPLAINBridge.c b/Projects/XPLAINBridge/XPLAINBridge.c index 090b7679194..5457a2283ea 100644 --- a/Projects/XPLAINBridge/XPLAINBridge.c +++ b/Projects/XPLAINBridge/XPLAINBridge.c @@ -81,6 +81,7 @@ int main(void) Buffer_Initialize(&UARTtoUSB_Buffer); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); + sei(); for (;;) { diff --git a/Projects/XPLAINBridge/XPLAINBridge.h b/Projects/XPLAINBridge/XPLAINBridge.h index 0c3a56c9dc3..877792d7ff2 100644 --- a/Projects/XPLAINBridge/XPLAINBridge.h +++ b/Projects/XPLAINBridge/XPLAINBridge.h @@ -40,6 +40,7 @@ #include #include #include + #include #include "AVRISPDescriptors.h" #include "USARTDescriptors.h"