Update 'firmware/firmware.ino'
Bug fixed - the EEPROM read 16 bit value doesn't return a value before (shouldn't the compiler recognize this error!?).
This commit is contained in:
parent
48c40411d0
commit
461ce740a4
1 changed files with 2 additions and 2 deletions
|
@ -113,13 +113,11 @@ void write16BitEEPROM(uint8_t addr, uint16_t value)
|
||||||
|
|
||||||
void writeEEPROMConfig()
|
void writeEEPROMConfig()
|
||||||
{
|
{
|
||||||
|
|
||||||
write32BitEEPROM( 0, start_freq);
|
write32BitEEPROM( 0, start_freq);
|
||||||
write32BitEEPROM( 4, end_freq);
|
write32BitEEPROM( 4, end_freq);
|
||||||
write32BitEEPROM( 8, step_freq);
|
write32BitEEPROM( 8, step_freq);
|
||||||
write16BitEEPROM(12, intervall);
|
write16BitEEPROM(12, intervall);
|
||||||
EEPROM.write(14, (uint8_t)drive_str);
|
EEPROM.write(14, (uint8_t)drive_str);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -138,6 +136,8 @@ uint16_t read16BitEEPROM(uint8_t addr)
|
||||||
{
|
{
|
||||||
uint16_t tmp = (uint16_t)EEPROM.read(addr ) << 8;
|
uint16_t tmp = (uint16_t)EEPROM.read(addr ) << 8;
|
||||||
tmp += (uint16_t)EEPROM.read(addr + 1);
|
tmp += (uint16_t)EEPROM.read(addr + 1);
|
||||||
|
|
||||||
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in a new issue