altosdroid: Send device name and connected state back to TelemetryService
[fw/altos] / src / cc1111 / ao_arch.h
index 9d0643b4ba4f0f7d0135b7b81b4a45859d619a60..06b04b93651d75fcad23fd40433ad3a0d9fd5622 100644 (file)
 
 #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;
+#define AO_ROMCONFIG_SYMBOL(a) __code __at(a)
+
+extern AO_ROMCONFIG_SYMBOL(0x00a0) uint16_t ao_romconfig_version;
+extern AO_ROMCONFIG_SYMBOL(0x00a2) uint16_t ao_romconfig_check;
+extern AO_ROMCONFIG_SYMBOL(0x00a4) uint16_t ao_serial_number;
+extern AO_ROMCONFIG_SYMBOL(0x00a6) uint32_t ao_radio_cal;
 
 #ifndef HAS_USB
 #error Please define HAS_USB
@@ -199,16 +201,18 @@ extern __code __at (0x00a6) uint32_t ao_radio_cal;
 #define ao_arch_critical(b) __critical { b }
 
 struct ao_adc {
-       uint16_t        tick;           /* tick when the sample was read */
        int16_t         accel;          /* accelerometer */
        int16_t         pres;           /* pressure sensor */
        int16_t         temp;           /* temperature sensor */
        int16_t         v_batt;         /* battery voltage */
        int16_t         sense_d;        /* drogue continuity sense */
        int16_t         sense_m;        /* main continuity sense */
+#if HAS_ACCEL_REF
+       uint16_t        accel_ref;      /* acceleration reference */
+#endif
 };
 
-#define AO_ADC_RING    32
+#define AO_DATA_RING   32
 
 /* ao_button.c */
 #ifdef HAS_BUTTON