From f45ebdde4f1d90249464ca10b62bcd7380708fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Sat, 11 Nov 2017 01:15:27 +0100 Subject: [PATCH] Comment that the EEPROM address has to be big-endian. --- right/src/eeprom.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/right/src/eeprom.c b/right/src/eeprom.c index c6db190..00066bb 100644 --- a/right/src/eeprom.c +++ b/right/src/eeprom.c @@ -4,6 +4,7 @@ #include "i2c.h" #include "eeprom.h" #include "config_parser/config_globals.h" +#include "buffer.h" bool IsEepromBusy; static eeprom_operation_t CurrentEepromOperation; @@ -108,6 +109,8 @@ status_t EEPROM_LaunchTransfer(eeprom_operation_t operation, config_buffer_id_t SuccessCallback = successCallback; bool isHardwareConfig = CurrentConfigBufferId == ConfigBufferId_HardwareConfig; eepromStartAddress = isHardwareConfig ? 0 : HARDWARE_CONFIG_SIZE; + + // This has to be big-endian. addressBuffer[0] = eepromStartAddress >> 8; addressBuffer[1] = eepromStartAddress & 0xff;