]> git.zerfleddert.de Git - fnordlicht-mini/commitdiff
init eeprom
authorgitknilch <gitknilch@cwde.de>
Thu, 24 Mar 2011 18:18:29 +0000 (19:18 +0100)
committergitknilch <gitknilch@cwde.de>
Thu, 24 Mar 2011 18:18:29 +0000 (19:18 +0100)
firmware/fnordlicht-firmware/storage.c

index 637ad699edbfc8304460394b5ad8b672adcd1710..0ad522d9594ee6d969642896757828e12646721a 100644 (file)
 
 /* global structures */
 struct storage_config_t startup_config;
-EEMEM struct storage_t eeprom_storage;
+EEMEM struct storage_t eeprom_storage =
+{
+  /* struct storage_config_t config */
+  {
+    /* uint8_t magic */
+    EEPROM_MAGIC_BYTE,
+    /* uint8_t startup_addr */
+    1u,
+    /* struct startup_parameters_t params */
+    {
+      /* enum startup_mode_t mode */
+      STARTUP_PROGRAM,
+      {
+        /* uint8_t program */
+        CONFIG_SCRIPT_DEFAULT, /* FIXME expected to be 0 atm */
+        /* uint8_t program_parameters[PROGRAM_PARAMETER_SIZE] */
+        /* FIXME: hardcoded parameters for colorwheel */
+        1u, 2u, 0, 0, 0, 0, 60u, 0, 255u, 255u
+      }
+    }
+  },
+  /* struct storage_color_t color[CONFIG_EEPROM_COLORS] */
+  {
+    0u,
+  },
+  /* uint16_t checksum */
+  0x2323u /* FIXME */
+};
 
 /* internal state */
 struct storage_internal_t
Impressum, Datenschutz