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);
/* Enable global interrupts so that the USB stack can function */
sei();
GlobalInterruptEnable();
while (RunBootloader)
{

@ -155,7 +155,7 @@ int main(void)
LEDs_SetAllLEDs(LEDS_LED1);
/* 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 */
while (RunBootloader || WaitForExit)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -46,7 +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();
GlobalInterruptEnable();
for (;;)
{

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

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

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

@ -73,7 +73,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();
GlobalInterruptEnable();
for (;;)
{

@ -69,7 +69,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();
GlobalInterruptEnable();
for (;;)
{

@ -73,7 +73,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();
GlobalInterruptEnable();
for (;;)
{

@ -68,7 +68,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();
GlobalInterruptEnable();
for (;;)
{

@ -68,7 +68,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();
GlobalInterruptEnable();
for (;;)
{

@ -69,7 +69,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();
GlobalInterruptEnable();
for (;;)
{

@ -71,9 +71,9 @@ 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);
GlobalInterruptEnable();
for (;;)
{

@ -68,7 +68,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();
GlobalInterruptEnable();
for (;;)
{

@ -73,7 +73,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();
GlobalInterruptEnable();
for (;;)
{

@ -73,7 +73,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();
GlobalInterruptEnable();
for (;;)
{

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

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

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

@ -46,7 +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();
GlobalInterruptEnable();
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));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei();
GlobalInterruptEnable();
for (;;)
{

@ -46,7 +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();
GlobalInterruptEnable();
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));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei();
GlobalInterruptEnable();
for (;;)
{

@ -46,7 +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();
GlobalInterruptEnable();
for (;;)
{

@ -50,7 +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();
GlobalInterruptEnable();
for (;;)
{

@ -46,7 +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();
GlobalInterruptEnable();
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));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei();
GlobalInterruptEnable();
for (;;)
{

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

@ -46,7 +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();
GlobalInterruptEnable();
for (;;)
{

@ -46,7 +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();
GlobalInterruptEnable();
for (;;)
{

@ -46,7 +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();
GlobalInterruptEnable();
for (;;)
{

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

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

@ -73,7 +73,7 @@ int main(void)
puts_P(PSTR(ESC_FG_CYAN "HID Device Report Viewer Running.\r\n" ESC_FG_WHITE));
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
sei();
GlobalInterruptEnable();
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 */
CDC_Device_CreateBlockingStream(&VirtualSerial_CDC_Interface, &USBSerialStream);
sei();
GlobalInterruptEnable();
for (;;)
{

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save