/*---------------------------------------------------------------------------*/ void irq_adc12_deactivate(const struct sensors_sensor *sensor, unsigned char adcno) { /* stop converting */ ADC12CTL0 &= ~ENC; /* wait for conversion to stop */ while(ADC12CTL0 & ADC12BUSY); ADC12CTL0 &= ~(ADC12ON | REFON); ADC12IE = 0; /* clear any pending interrupts */ ADC12IFG = 0; adcflags &= ~(1 << adcno); ADC12MCTL_NO(adcno) = 0; sethilo(); sensors_remove_irq(sensor, IRQ_ADC); if(adcflags) { /* Turn on the ADC12 */ ADC12CTL0 |= (ADC12ON | REFON); /* Delay */ clock_delay(20000); /* Still active. Turn on the conversion. */ ADC12CTL0 |= ENC | ADC12SC; } }
/*---------------------------------------------------------------------------*/ static void deactivate(void) { BUTTON_DISABLE_IRQ(); sensors_remove_irq(&button_sensor, BUTTON_IRQ_PORT()); }
/*---------------------------------------------------------------------------*/ static void deactivate(void) { PIR_DISABLE_IRQ(); sensors_remove_irq(&pir_sensor, PIR_IRQ_PORT()); }