]> git.tnoah.ca Git - lora-radio.git/commitdiff
Add conditionals for nRF
authorMark Qvist <mark@unsigned.io>
Sat, 18 May 2024 09:34:00 +0000 (11:34 +0200)
committerMark Qvist <mark@unsigned.io>
Sat, 18 May 2024 09:34:00 +0000 (11:34 +0200)
Device.h
Release/console_image.bin

index 1f027dda30764b1fd791f145dc5d5f855c125e75..944479dbb9ebf2d39b58f2d67796f4eb2995b293 100644 (file)
--- a/Device.h
+++ b/Device.h
 
 // Forward declaration from Utilities.h
 void eeprom_update(int mapped_addr, uint8_t byte);
-void eeprom_flush();
 uint8_t eeprom_read(uint32_t addr);
 void hard_reset(void);
 
+#if !HAS_EEPROM && MCU_VARIANT == MCU_NRF52
+  void eeprom_flush();
+#endif
+
 const uint8_t dev_keys [] PROGMEM = {
    0x0f, 0x15, 0x86, 0x74, 0xa0, 0x7d, 0xf2, 0xde, 0x32, 0x11, 0x29, 0xc1, 0x0d, 0xda, 0xcc, 0xc3,
    0xe1, 0x9b, 0xac, 0xf2, 0x27, 0x06, 0xee, 0x89, 0x1f, 0x7a, 0xfc, 0xc3, 0x6a, 0xf5, 0x38, 0x08
@@ -131,7 +134,9 @@ void device_save_firmware_hash() {
   for (uint8_t i = 0; i < DEV_HASH_LEN; i++) {
     eeprom_update(dev_fwhash_addr(i), dev_firmware_hash_target[i]);
   }
-  eeprom_flush();
+  #if !HAS_EEPROM && MCU_VARIANT == MCU_NRF52
+    eeprom_flush();
+  #endif
   if (!fw_signature_validated) hard_reset();
 }
 
index 3ab425279e345383e5d6913e110cc854057c4dc6..8588f4a212a4e836f26d5295b8ceb2d8e0e77354 100644 (file)
Binary files a/Release/console_image.bin and b/Release/console_image.bin differ