diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-04-28 07:48:26 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-04-28 07:48:26 +0000 |
commit | 59c4871f8011247a056f6ca2ca8aca89000e3841 (patch) | |
tree | b26bb76882e9cca644ba0083bcc1c9ea50511463 /Demos/Device/LowLevel | |
parent | 85aaaf84ce14568580a35c31e22062ba529b49fe (diff) | |
download | lufa-59c4871f8011247a056f6ca2ca8aca89000e3841.tar.gz lufa-59c4871f8011247a056f6ca2ca8aca89000e3841.tar.bz2 lufa-59c4871f8011247a056f6ca2ca8aca89000e3841.zip |
USB_Init() no longer calls sei() to enable global interrupts - this must now be done in the user application once all init code has run.
Diffstat (limited to 'Demos/Device/LowLevel')
25 files changed, 29 insertions, 6 deletions
diff --git a/Demos/Device/LowLevel/AudioInput/AudioInput.c b/Demos/Device/LowLevel/AudioInput/AudioInput.c index 392609b07..aa8967cd0 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 4585ab5b6..6902dc8f0 100644 --- a/Demos/Device/LowLevel/AudioInput/AudioInput.h +++ b/Demos/Device/LowLevel/AudioInput/AudioInput.h @@ -40,6 +40,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include "Descriptors.h"
diff --git a/Demos/Device/LowLevel/AudioOutput/AudioOutput.c b/Demos/Device/LowLevel/AudioOutput/AudioOutput.c index 5dcb5c576..8cd6be17b 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 3812ae0fd..69b59b8fa 100644 --- a/Demos/Device/LowLevel/AudioOutput/AudioOutput.h +++ b/Demos/Device/LowLevel/AudioOutput/AudioOutput.h @@ -40,7 +40,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
- #include <stdlib.h>
+ #include <avr/interrupt.h>
#include "Descriptors.h"
diff --git a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.c index 9be089b2b..5c90c6ab8 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 a4c8f97ca..6ca8b72a6 100644 --- a/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h +++ b/Demos/Device/LowLevel/DualVirtualSerial/DualVirtualSerial.h @@ -40,6 +40,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include <string.h>
#include "Descriptors.h"
diff --git a/Demos/Device/LowLevel/GenericHID/GenericHID.c b/Demos/Device/LowLevel/GenericHID/GenericHID.c index 4d3f4c1ba..9d9012aff 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 c79ed6f44..deaee336c 100644 --- a/Demos/Device/LowLevel/GenericHID/GenericHID.h +++ b/Demos/Device/LowLevel/GenericHID/GenericHID.h @@ -40,6 +40,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include <stdbool.h>
#include <string.h>
diff --git a/Demos/Device/LowLevel/Joystick/Joystick.c b/Demos/Device/LowLevel/Joystick/Joystick.c index 0edead5c8..e84eef042 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 811cb4e42..761582d45 100644 --- a/Demos/Device/LowLevel/Joystick/Joystick.h +++ b/Demos/Device/LowLevel/Joystick/Joystick.h @@ -40,6 +40,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include <string.h>
#include "Descriptors.h"
diff --git a/Demos/Device/LowLevel/Keyboard/Keyboard.c b/Demos/Device/LowLevel/Keyboard/Keyboard.c index fd7e63e2b..67715843b 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 4cb3616c7..f41f6d4c3 100644 --- a/Demos/Device/LowLevel/Keyboard/Keyboard.h +++ b/Demos/Device/LowLevel/Keyboard/Keyboard.h @@ -41,6 +41,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include <stdbool.h>
#include <string.h>
diff --git a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.c index e41b7090b..ddcd3ce8e 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 7fcec978b..993b326a2 100644 --- a/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h +++ b/Demos/Device/LowLevel/KeyboardMouse/KeyboardMouse.h @@ -36,6 +36,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include <stdbool.h>
#include <string.h>
diff --git a/Demos/Device/LowLevel/MIDI/MIDI.c b/Demos/Device/LowLevel/MIDI/MIDI.c index edfc56f48..03536b2c5 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 82e42da0d..a49752729 100644 --- a/Demos/Device/LowLevel/MIDI/MIDI.h +++ b/Demos/Device/LowLevel/MIDI/MIDI.h @@ -40,6 +40,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include <stdbool.h>
#include "Descriptors.h"
diff --git a/Demos/Device/LowLevel/MassStorage/MassStorage.c b/Demos/Device/LowLevel/MassStorage/MassStorage.c index fc9a97de4..1ed84d326 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 44302084c..27d1e3b00 100644 --- a/Demos/Device/LowLevel/MassStorage/MassStorage.h +++ b/Demos/Device/LowLevel/MassStorage/MassStorage.h @@ -40,6 +40,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include "Descriptors.h"
diff --git a/Demos/Device/LowLevel/Mouse/Mouse.c b/Demos/Device/LowLevel/Mouse/Mouse.c index 70ed82cc8..3fce52210 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 884482b3d..6a1a518fb 100644 --- a/Demos/Device/LowLevel/Mouse/Mouse.h +++ b/Demos/Device/LowLevel/Mouse/Mouse.h @@ -40,6 +40,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include <stdbool.h>
#include <string.h>
diff --git a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h index 7bae188e8..018567550 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h +++ b/Demos/Device/LowLevel/RNDISEthernet/Lib/ProtocolDecoders.h @@ -38,6 +38,8 @@ /* Includes: */
#include <avr/io.h>
+ #include <avr/pgmspace.h>
+ #include <stdio.h>
#include <LUFA/Drivers/Peripheral/SerialStream.h>
diff --git a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.c index 1b617dd2e..cb06bc333 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 3828134ac..478ed1a23 100644 --- a/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h +++ b/Demos/Device/LowLevel/RNDISEthernet/RNDISEthernet.h @@ -39,10 +39,9 @@ /* Includes: */
#include <avr/io.h>
#include <avr/wdt.h>
- #include <avr/pgmspace.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include <string.h>
- #include <stdio.h>
#include "Descriptors.h"
diff --git a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.c index bad87578a..52ef28c6f 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 5427a6902..1ec261c41 100644 --- a/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h +++ b/Demos/Device/LowLevel/VirtualSerial/VirtualSerial.h @@ -40,6 +40,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include <string.h>
#include "Descriptors.h"
|