]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/sensors/Msp430InternalTemperatureP.nc
Merge over into the trunk.
[tinyos-2.x.git] / tos / chips / msp430 / sensors / Msp430InternalTemperatureP.nc
index 4c1a991ac73b370cdefe6fb8d99453209819ff1b..d669d55237355b5da3114b82e4db035831f3aa80 100644 (file)
 #include "Msp430Adc12.h"
 
 module Msp430InternalTemperatureP {
-  provides interface Msp430Adc12Config;
+  provides interface AdcConfigure<const msp430adc12_channel_config_t*>;
 }
 implementation {
 
-  async command msp430adc12_channel_config_t Msp430Adc12Config.getChannelSettings() {
-    msp430adc12_channel_config_t config = {
+  const msp430adc12_channel_config_t config = {
       inch: TEMPERATURE_DIODE_CHANNEL,
       sref: REFERENCE_VREFplus_AVss,
       ref2_5v: REFVOLT_LEVEL_1_5,
@@ -46,8 +45,10 @@ implementation {
       sht: SAMPLE_HOLD_4_CYCLES,
       sampcon_ssel: SAMPCON_SOURCE_SMCLK,
       sampcon_id: SAMPCON_CLOCK_DIV_1
-    };
-
-    return config;
+  };
+  
+  async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration()
+  {
+    return &config;
   }
 }