altos: Clean up ADC selection for cc1111
authorKeith Packard <keithp@keithp.com>
Mon, 28 May 2012 17:45:53 +0000 (11:45 -0600)
committerKeith Packard <keithp@keithp.com>
Mon, 28 May 2012 17:45:53 +0000 (11:45 -0600)
Depend directly on product defines instead of trying to guess

Signed-off-by: Keith Packard <keithp@keithp.com>
src/cc1111/ao_adc.c

index f34bc04227e35996d4d48c1970d18d2cad9c9cb1..956439566abacdaa3340cc98dae5c668dcf64645 100644 (file)
@@ -52,7 +52,7 @@ ao_adc_isr(void) __interrupt 1
        uint8_t __xdata *a;
 
        sequence = (ADCCON2 & ADCCON2_SCH_MASK) >> ADCCON2_SCH_SHIFT;
-#if IGNITE_ON_P2
+#if TELEMETRUM_V_0_1 || TELEMETRUM_V_0_2 || TELEMETRUM_V_1_0 || TELEMETRUM_V_1_1 || TELEMETRUM_V_1_2 || TELELAUNCH_V_0_1
        /* TeleMetrum readings */
 #if HAS_ACCEL_REF
        if (sequence == 2) {
@@ -81,10 +81,10 @@ ao_adc_isr(void) __interrupt 1
        }
 #endif
 
-#if IGNITE_ON_P0
+#if TELEMINI_V_1_0 || TELENANO_V_0_1
        /* TeleMini readings */
        a = (uint8_t __xdata *) (&ao_data_ring[ao_data_head].adc.pres);
-#ifdef TELEMINI_V_1_0
+#if TELEMINI_V_1_0
        switch (sequence) {
        case 0:
                /* pressure */
@@ -138,7 +138,8 @@ ao_adc_isr(void) __interrupt 1
                /* Start next conversion */
                ADCCON3 = sequence;
        }
-#endif
+#endif /* telemini || telenano */
+
 #ifndef GOT_ADC
 #error No known ADC configuration set
 #endif