From 461ce740a40dbeaeb4f42fa7d9b350fdc476d9f3 Mon Sep 17 00:00:00 2001 From: klaute Date: Fri, 14 Oct 2016 21:15:43 +0200 Subject: [PATCH] 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!?). --- firmware/firmware.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/firmware.ino b/firmware/firmware.ino index 8567a36..3b1082f 100644 --- a/firmware/firmware.ino +++ b/firmware/firmware.ino @@ -113,13 +113,11 @@ void write16BitEEPROM(uint8_t addr, uint16_t value) void writeEEPROMConfig() { - write32BitEEPROM( 0, start_freq); write32BitEEPROM( 4, end_freq); write32BitEEPROM( 8, step_freq); write16BitEEPROM(12, intervall); 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; tmp += (uint16_t)EEPROM.read(addr + 1); + + return tmp; } /*****************************************************************************/