device configuration prepared
This commit is contained in:
parent
7d03900ada
commit
243c487546
@ -5,7 +5,7 @@
|
||||
#include <spi.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define CONFIG_MAGIC 0xdead0005
|
||||
#define CONFIG_MAGIC 0xdead0006
|
||||
#define DEVICE_MAGIC 0xaffe0000
|
||||
|
||||
typedef struct __attribute__((__packed__)) s_configBlock {
|
||||
|
@ -108,8 +108,9 @@ void configInit() {
|
||||
eepromWriteConfigBlock(&defaultConfigBlock);
|
||||
coloredMsg(LOG_BLUE, false, "cfg ci Default configuration block written to eeprom");
|
||||
|
||||
eepromWriteDeviceBlock(0, &defaultDeviceBlock[0]);
|
||||
eepromWriteDeviceBlock(1, &defaultDeviceBlock[1]);
|
||||
for (uint8_t i = 0; i < sizeof(defaultConfigBlock) / sizeof(t_deviceBlock); i++) {
|
||||
eepromWriteDeviceBlock(i, &defaultDeviceBlock[i]);
|
||||
}
|
||||
coloredMsg(LOG_BLUE, false, "cfg ci Default device blocks written to eeprom");
|
||||
|
||||
coloredMsg(LOG_BLUE, false, "cfg ci Reading configuration block from eeprom again");
|
||||
|
Loading…
x
Reference in New Issue
Block a user