]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/adc12/HplAdc12P.nc
The bugfix of Apr 18 introduced a new problem that is now fixed.
[tinyos-2.x.git] / tos / chips / msp430 / adc12 / HplAdc12P.nc
index aaee9ce507e61846f7c65072b5226979c6a46382..54c9c3464511c7b7d7668c88bd2ed470cf08051b 100644 (file)
@@ -107,9 +107,11 @@ implementation
   
   async command void HplAdc12.stopConversion(){
     // stop conversion mode immediately, conversion data is unreliable
+    uint16_t ctl1 = ADC12CTL1;
     ADC12CTL1 &= ~(CONSEQ0 | CONSEQ1);
     ADC12CTL0 &= ~(ADC12SC + ENC); 
-    ADC12CTL0 &= ~(ADC12ON); 
+    ADC12CTL0 &= ~(ADC12ON);
+    ADC12CTL1 |= (ctl1 & (CONSEQ0 | CONSEQ1));
   }
   
   async command void HplAdc12.enableConversion(){