altos: mark gps date written only after it gets into eeprom
[fw/altos] / src / ao.h
index 9c418db2e804298f04335062dd6e14d9f150be71..8db22799f24df6fca7ec59fb30cc54416572d504 100644 (file)
--- a/src/ao.h
+++ b/src/ao.h
@@ -293,12 +293,13 @@ ao_led_init(uint8_t enable);
  * ao_romconfig.c
  */
 
-#define AO_ROMCONFIG_VERSION   1
+#define AO_ROMCONFIG_VERSION   2
 
 extern __code __at (0x00a0) uint16_t ao_romconfig_version;
 extern __code __at (0x00a2) uint16_t ao_romconfig_check;
 extern __code __at (0x00a4) uint16_t ao_serial_number;
 extern __code __at (0x00a6) uint32_t ao_radio_cal;
+extern __code __at (0x00aa) uint8_t ao_usb_descriptors [];
 
 /*
  * ao_usb.c
@@ -563,6 +564,7 @@ struct ao_log_record {
                        uint8_t         year;
                        uint8_t         month;
                        uint8_t         day;
+                       uint8_t         extra;
                } gps_date;
                struct {
                        uint16_t        d0;
@@ -572,7 +574,7 @@ struct ao_log_record {
 };
 
 /* Write a record to the eeprom log */
-void
+uint8_t
 ao_log_data(__xdata struct ao_log_record *log) __reentrant;
 
 /* Flush the log */
@@ -1008,7 +1010,7 @@ ao_rssi_init(uint8_t rssi_led);
  * each instance of a product
  */
 
-extern const uint8_t ao_usb_descriptors [];
+extern __code __at(0x00aa) uint8_t ao_usb_descriptors [];
 extern const char ao_version[];
 extern const char ao_manufacturer[];
 extern const char ao_product[];