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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user