Add conditionals for nRF
This commit is contained in:
parent
d05d119a30
commit
ddab106e61
7
Device.h
7
Device.h
@ -42,10 +42,13 @@
|
|||||||
|
|
||||||
// Forward declaration from Utilities.h
|
// Forward declaration from Utilities.h
|
||||||
void eeprom_update(int mapped_addr, uint8_t byte);
|
void eeprom_update(int mapped_addr, uint8_t byte);
|
||||||
void eeprom_flush();
|
|
||||||
uint8_t eeprom_read(uint32_t addr);
|
uint8_t eeprom_read(uint32_t addr);
|
||||||
void hard_reset(void);
|
void hard_reset(void);
|
||||||
|
|
||||||
|
#if !HAS_EEPROM && MCU_VARIANT == MCU_NRF52
|
||||||
|
void eeprom_flush();
|
||||||
|
#endif
|
||||||
|
|
||||||
const uint8_t dev_keys [] PROGMEM = {
|
const uint8_t dev_keys [] PROGMEM = {
|
||||||
0x0f, 0x15, 0x86, 0x74, 0xa0, 0x7d, 0xf2, 0xde, 0x32, 0x11, 0x29, 0xc1, 0x0d, 0xda, 0xcc, 0xc3,
|
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
|
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++) {
|
for (uint8_t i = 0; i < DEV_HASH_LEN; i++) {
|
||||||
eeprom_update(dev_fwhash_addr(i), dev_firmware_hash_target[i]);
|
eeprom_update(dev_fwhash_addr(i), dev_firmware_hash_target[i]);
|
||||||
}
|
}
|
||||||
|
#if !HAS_EEPROM && MCU_VARIANT == MCU_NRF52
|
||||||
eeprom_flush();
|
eeprom_flush();
|
||||||
|
#endif
|
||||||
if (!fw_signature_validated) hard_reset();
|
if (!fw_signature_validated) hard_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user