]> git.zerfleddert.de Git - fnordlicht-mini/blobdiff - firmware/fnordlicht-firmware/storage.h
add initialization of node address via eeprom
[fnordlicht-mini] / firmware / fnordlicht-firmware / storage.h
index 09e293d9c9e969b221d3265182a6bf370fce6037..76f352e58c065bb773a67d72fc2b98bf9b5dac3d 100644 (file)
@@ -44,27 +44,29 @@ struct storage_color_t
 #define EEPROM_MAGIC_BYTE 0x23
 
 /* store the startup configuration in EEPROM
- * size: 13 byte */
+ * size: 14 bytes */
 struct storage_config_t
 {
     /* magic byte, must match EEPROM_MAGIC_BYTE to mark a valid configuration */
     uint8_t magic;
-    /* startup parameters, defined in remote_proto.h, size: 12 byte */
+    /* initial node address to use at startup */
+    uint8_t startup_addr;
+    /* startup parameters, defined in remote_proto.h, size: 12 bytes */
     struct startup_parameters_t params;
 };
 
 /* storage structure for EEPROM
- * size: 494 byte
- * (means: 18 byte left) */
+ * size: 496 bytes
+ * (means: 16 bytes left) */
 struct storage_t
 {
-    /* startup configuration, size: 12 byte */
+    /* startup configuration, size: 14 bytes */
     struct storage_config_t config;
 
-    /* color storage, size: 60*8 == 480 byte */
+    /* color storage, size: 60*8 == 480 bytes */
     struct storage_color_t color[CONFIG_EEPROM_COLORS];
 
-    /* crc16 checksum over config and color[], size: 2 byte */
+    /* crc16 checksum over config and color[], size: 2 bytes */
     uint16_t checksum;
 };
 
Impressum, Datenschutz