Use the framework provided GlobalInterruptEnable() function instead of the AVR8/XMEGA specific sei() macro, for future demo/project portability.

pull/1469/head
Dean Camera 12 years ago
parent 92ee5ad826
commit 1eefbf9041

@ -119,7 +119,7 @@ int main(void)
LEDs_SetAllLEDs(LEDS_LED1); LEDs_SetAllLEDs(LEDS_LED1);
/* Enable global interrupts so that the USB stack can function */ /* Enable global interrupts so that the USB stack can function */
sei(); GlobalInterruptEnable();
while (RunBootloader) while (RunBootloader)
{ {

@ -155,7 +155,7 @@ int main(void)
LEDs_SetAllLEDs(LEDS_LED1); LEDs_SetAllLEDs(LEDS_LED1);
/* Enable global interrupts so that the USB stack can function */ /* Enable global interrupts so that the USB stack can function */
sei(); GlobalInterruptEnable();
/* Run the USB management task while the bootloader is supposed to be running */ /* Run the USB management task while the bootloader is supposed to be running */
while (RunBootloader || WaitForExit) while (RunBootloader || WaitForExit)

@ -73,7 +73,7 @@ int main(void)
SetupHardware(); SetupHardware();
/* Enable global interrupts so that the USB stack can function */ /* Enable global interrupts so that the USB stack can function */
sei(); GlobalInterruptEnable();
while (RunBootloader) while (RunBootloader)
USB_USBTask(); USB_USBTask();

@ -67,7 +67,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -67,7 +67,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -108,7 +108,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -68,7 +68,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -68,7 +68,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -68,7 +68,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -93,7 +93,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -68,7 +68,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -69,7 +69,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -70,7 +70,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -93,7 +93,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -68,7 +68,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -85,7 +85,7 @@ int main(void)
Webserver_Init(); Webserver_Init();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -83,7 +83,7 @@ int main(void)
CDC_Device_CreateStream(&VirtualSerial_CDC_Interface, &USBSerialStream); CDC_Device_CreateStream(&VirtualSerial_CDC_Interface, &USBSerialStream);
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -108,7 +108,7 @@ int main(void)
CDC_Device_CreateStream(&VirtualSerial_CDC_Interface, &USBSerialStream); CDC_Device_CreateStream(&VirtualSerial_CDC_Interface, &USBSerialStream);
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -98,7 +98,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -81,7 +81,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -51,7 +51,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -51,7 +51,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -71,7 +71,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -45,7 +45,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -44,7 +44,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -62,7 +62,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -52,7 +52,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -44,7 +44,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -55,7 +55,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -61,7 +61,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -48,7 +48,7 @@ int main(void)
Webserver_Init(); Webserver_Init();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -58,7 +58,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Mouse Host/Device Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Mouse Host/Device Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -77,7 +77,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Android Accessory Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Android Accessory Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -62,7 +62,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Audio Input Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Audio Input Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -62,7 +62,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Audio Output Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Audio Output Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -73,7 +73,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Joystick Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Joystick Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -69,7 +69,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Keyboard Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Keyboard Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -73,7 +73,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Keyboard Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Keyboard Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -68,7 +68,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "MIDI Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "MIDI Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -68,7 +68,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Mass Storage Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Mass Storage Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -69,7 +69,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Mouse Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Mouse Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -71,9 +71,9 @@ int main(void)
SetupHardware(); SetupHardware();
puts_P(PSTR(ESC_FG_CYAN "Mouse Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Mouse Host Demo running.\r\n" ESC_FG_WHITE));
sei();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -68,7 +68,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Printer Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Printer Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -73,7 +73,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Still Image Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Still Image Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -73,7 +73,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "CDC Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "CDC Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Android Accessory Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Android Accessory Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Audio Input Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Audio Input Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Audio Output Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Audio Output Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Generic HID Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Generic HID Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Joystick HID Parser Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Joystick HID Parser Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Keyboard HID Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Keyboard HID Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Keyboard HID Parser Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Keyboard HID Parser Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "MIDI Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "MIDI Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -50,7 +50,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Mass Storage Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Mass Storage Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Mouse HID Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Mouse HID Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Mouse HID Parser Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Mouse HID Parser Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -43,10 +43,10 @@ int main(void)
{ {
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
puts_P(PSTR(ESC_FG_CYAN "Printer Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Printer Host Demo running.\r\n" ESC_FG_WHITE));
sei();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "RNDIS Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "RNDIS Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "Still Image Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "Still Image Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -46,7 +46,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "CDC Host Demo running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "CDC Host Demo running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -45,7 +45,7 @@ int main(void)
V2Protocol_Init(); V2Protocol_Init();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -93,7 +93,7 @@ int main(void)
RingBuffer_InitBuffer(&USARTtoUSB_Buffer, USARTtoUSB_Buffer_Data, sizeof(USARTtoUSB_Buffer_Data)); RingBuffer_InitBuffer(&USARTtoUSB_Buffer, USARTtoUSB_Buffer_Data, sizeof(USARTtoUSB_Buffer_Data));
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -73,7 +73,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "HID Device Report Viewer Running.\r\n" ESC_FG_WHITE)); puts_P(PSTR(ESC_FG_CYAN "HID Device Report Viewer Running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -114,7 +114,7 @@ int main(void)
/* Create a regular blocking character stream for the interface so that it can be used with the stdio.h functions */ /* 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); CDC_Device_CreateBlockingStream(&VirtualSerial_CDC_Interface, &USBSerialStream);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -93,7 +93,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -79,7 +79,7 @@ int main(void)
for (uint8_t Buffer = 0; Buffer < TOTAL_TRACKS; Buffer++) for (uint8_t Buffer = 0; Buffer < TOTAL_TRACKS; Buffer++)
BitBuffer_Init(&TrackDataBuffers[Buffer]); BitBuffer_Init(&TrackDataBuffers[Buffer]);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -68,7 +68,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -98,7 +98,7 @@ int main(void)
CmdState = CMD_STOP; CmdState = CMD_STOP;
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -45,7 +45,7 @@ int main(void)
{ {
SetupHardware(); SetupHardware();
sei(); GlobalInterruptEnable();
for (;;) for (;;)
USB_USBTask(); USB_USBTask();

@ -83,7 +83,7 @@ int main(void)
RingBuffer_InitBuffer(&FromHost_Buffer, FromHost_Buffer_Data, sizeof(FromHost_Buffer_Data)); RingBuffer_InitBuffer(&FromHost_Buffer, FromHost_Buffer_Data, sizeof(FromHost_Buffer_Data));
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -153,7 +153,7 @@ int main(void)
OpenLogFile(); OpenLogFile();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -90,7 +90,7 @@ int main(void)
RingBuffer_InitBuffer(&USARTtoUSB_Buffer, USARTtoUSB_Buffer_Data, sizeof(USARTtoUSB_Buffer_Data)); RingBuffer_InitBuffer(&USARTtoUSB_Buffer, USARTtoUSB_Buffer_Data, sizeof(USARTtoUSB_Buffer_Data));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -44,7 +44,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

@ -90,7 +90,7 @@ int main(void)
SetupHardware(); SetupHardware();
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY); LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei(); GlobalInterruptEnable();
for (;;) for (;;)
{ {

Loading…
Cancel
Save