[avr] wrap eeprom_read_blocks in a cli/sei pair

This commit is contained in:
Bart Van Der Meerssche 2011-02-16 16:37:16 +01:00
parent a90b7a8dce
commit acf658dd26
1 changed files with 2 additions and 0 deletions

View File

@ -257,11 +257,13 @@ ISR(TIMER1_CAPT_vect)
void setup_datastructs(void) void setup_datastructs(void)
{ {
cli();
eeprom_read_block((void*)&version, (const void*)&EEPROM_version, sizeof(version)); eeprom_read_block((void*)&version, (const void*)&EEPROM_version, sizeof(version));
eeprom_read_block((void*)&event, (const void*)&EEPROM_event, sizeof(event)); eeprom_read_block((void*)&event, (const void*)&EEPROM_event, sizeof(event));
eeprom_read_block((void*)&enabled, (const void*)&EEPROM_enabled, sizeof(enabled)); eeprom_read_block((void*)&enabled, (const void*)&EEPROM_enabled, sizeof(enabled));
eeprom_read_block((void*)&phy_to_log, (const void*)&EEPROM_phy_to_log, sizeof(phy_to_log)); eeprom_read_block((void*)&phy_to_log, (const void*)&EEPROM_phy_to_log, sizeof(phy_to_log));
eeprom_read_block((void*)&sensor, (const void*)&EEPROM_sensor, sizeof(sensor)); eeprom_read_block((void*)&sensor, (const void*)&EEPROM_sensor, sizeof(sensor));
sei();
} }
void setup_led(void) void setup_led(void)