]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/adc12/Msp430Adc12ImplP.nc
The commit from Jun 17 that introduced deputy annotations created a problem for the...
[tinyos-2.x.git] / tos / chips / msp430 / adc12 / Msp430Adc12ImplP.nc
index 0ce8a5450799aa351bee46ebf8407da3ba35afbc..0dabc51a3cc0705eb46233e34adab391662c3949 100644 (file)
@@ -379,7 +379,7 @@ implementation
   {
     atomic {
       if (call ADCArbiterInfo.userId() == id){
-        if (state & MULTIPLE_DATA_REPEAT && !resultBufferStart)
+        if ((state & MULTIPLE_DATA_REPEAT) && !resultBufferStart)
           return EINVAL;
         if (state & ADC_BUSY)
           return EBUSY;
@@ -554,7 +554,7 @@ implementation
       case MULTI_CHANNEL:
         {
           uint16_t i = 0, k;
-          resultBuffer = resultBufferStart;
+          resultBuffer = resultBufferStart + resultBufferIndex;
           do {
             *resultBuffer++ = call HplAdc12.getMem(i);
           } while (++i < numChannels);
@@ -566,7 +566,7 @@ implementation
             resultBufferIndex = 0;
             signal MultiChannel.dataReady[clientID](resultBuffer, 
                 overflow ? k : resultBufferLength);
-          } else call HplAdc12.enableConversion();
+          }
         }
         break;
       case MULTIPLE_DATA: