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.
This commit is contained in:
parent
85aaaf84ce
commit
59c4871f80
135 changed files with 181 additions and 61 deletions
|
@ -44,6 +44,7 @@ int main(void)
|
|||
SetupHardware();
|
||||
|
||||
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
|
||||
sei();
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
|
|
@ -83,6 +83,8 @@ int main(void)
|
|||
SetupHardware();
|
||||
|
||||
Buffer_Initialize(&Tx_Buffer);
|
||||
|
||||
sei();
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
|
|
@ -88,6 +88,7 @@ int main(void)
|
|||
SetupHardware();
|
||||
|
||||
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
|
||||
sei();
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -108,6 +108,7 @@ int main(void)
|
|||
SetupHardware();
|
||||
|
||||
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
|
||||
sei();
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 (;;)
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -76,6 +76,8 @@ int main(void)
|
|||
|
||||
for (uint8_t Buffer = 0; Buffer < TOTAL_TRACKS; Buffer++)
|
||||
BitBuffer_Init(&TrackDataBuffers[Buffer]);
|
||||
|
||||
sei();
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -44,6 +44,8 @@
|
|||
int main(void)
|
||||
{
|
||||
SetupHardware();
|
||||
|
||||
sei();
|
||||
|
||||
for (;;)
|
||||
USB_USBTask();
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <avr/io.h>
|
||||
#include <avr/wdt.h>
|
||||
#include <avr/power.h>
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
#include "Descriptors.h"
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -77,6 +77,7 @@ int main(void)
|
|||
Buffer_Initialize(&USARTtoUSB_Buffer);
|
||||
|
||||
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
|
||||
sei();
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
|
|
@ -44,6 +44,7 @@ int main(void)
|
|||
SetupHardware();
|
||||
|
||||
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
|
||||
sei();
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -81,6 +81,7 @@ int main(void)
|
|||
Buffer_Initialize(&UARTtoUSB_Buffer);
|
||||
|
||||
LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
|
||||
sei();
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue