diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-04-28 07:48:26 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2010-04-28 07:48:26 +0000 |
| commit | 704941fe8bed209c2848c8844d306867f78c2192 (patch) | |
| tree | b26bb76882e9cca644ba0083bcc1c9ea50511463 /Projects | |
| parent | ab31eb6e5ff2be73b590bb84c8e1a1f77b39f546 (diff) | |
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.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@1219 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Projects')
20 files changed, 30 insertions, 6 deletions
diff --git a/Projects/AVRISP-MKII/AVRISP.c b/Projects/AVRISP-MKII/AVRISP.c index 2ba80019..cea1161d 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 86da27a1..be623e90 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 4df37504..c86cd075 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 f7f39d5a..d2405f88 100644 --- a/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.h +++ b/Projects/Incomplete/MIDIToneGenerator/MIDIToneGenerator.h @@ -41,6 +41,7 @@ #include <avr/wdt.h>
#include <avr/power.h>
#include <avr/pgmspace.h>
+ #include <avr/interrupt.h>
#include <stdbool.h>
#include "Descriptors.h"
diff --git a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.c index 8090b5d1..239eb713 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 56239454..f61e369e 100644 --- a/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.h +++ b/Projects/Incomplete/StandaloneProgrammer/StandaloneProgrammer.h @@ -40,6 +40,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include <stdio.h>
#include "DiskDevice.h"
diff --git a/Projects/LEDNotifier/LEDNotifier.c b/Projects/LEDNotifier/LEDNotifier.c index 61d5efcb..5b539002 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 ee41d7d9..243723ec 100644 --- a/Projects/LEDNotifier/LEDNotifier.h +++ b/Projects/LEDNotifier/LEDNotifier.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 <stdio.h>
diff --git a/Projects/Magstripe/Magstripe.c b/Projects/Magstripe/Magstripe.c index 88950cc2..39149b48 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 ddadd0d7..8a48e7c1 100644 --- a/Projects/Magstripe/Magstripe.h +++ b/Projects/Magstripe/Magstripe.h @@ -41,6 +41,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include "Descriptors.h"
#include "Lib/MagstripeHW.h"
diff --git a/Projects/MissileLauncher/MissileLauncher.c b/Projects/MissileLauncher/MissileLauncher.c index a1867329..cb0bd857 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 a496679a..2fb7b696 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 2ffa5902..f42d78cd 100644 --- a/Projects/RelayBoard/RelayBoard.h +++ b/Projects/RelayBoard/RelayBoard.h @@ -41,6 +41,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include "Descriptors.h"
diff --git a/Projects/TemperatureDataLogger/TempDataLogger.c b/Projects/TemperatureDataLogger/TempDataLogger.c index 35bf68bd..59105286 100644 --- a/Projects/TemperatureDataLogger/TempDataLogger.c +++ b/Projects/TemperatureDataLogger/TempDataLogger.c @@ -137,16 +137,17 @@ ISR(TIMER1_COMPA_vect, ISR_BLOCK) */
int main(void)
{
- /* Fetch logging interval from EEPROM */
- LoggingInterval500MS_SRAM = eeprom_read_byte(&LoggingInterval500MS_EEPROM);
-
SetupHardware();
- LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
+ /* Fetch logging interval from EEPROM */
+ LoggingInterval500MS_SRAM = eeprom_read_byte(&LoggingInterval500MS_EEPROM);
/* 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 3f3a3c04..a6e770bb 100644 --- a/Projects/TemperatureDataLogger/TempDataLogger.h +++ b/Projects/TemperatureDataLogger/TempDataLogger.h @@ -40,6 +40,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include <stdio.h>
#include "Descriptors.h"
diff --git a/Projects/USBtoSerial/USBtoSerial.c b/Projects/USBtoSerial/USBtoSerial.c index 73be33e1..c9bc7173 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 541e0e2c..cecd8816 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 f1351d89..4fb5b37b 100644 --- a/Projects/Webserver/Webserver.h +++ b/Projects/Webserver/Webserver.h @@ -41,6 +41,7 @@ #include <avr/wdt.h>
#include <avr/pgmspace.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include <LUFA/Version.h>
#include <LUFA/Drivers/Board/LEDs.h>
diff --git a/Projects/XPLAINBridge/XPLAINBridge.c b/Projects/XPLAINBridge/XPLAINBridge.c index 090b7679..5457a228 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 0c3a56c9..877792d7 100644 --- a/Projects/XPLAINBridge/XPLAINBridge.h +++ b/Projects/XPLAINBridge/XPLAINBridge.h @@ -40,6 +40,7 @@ #include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
+ #include <avr/interrupt.h>
#include "AVRISPDescriptors.h"
#include "USARTDescriptors.h"
|
