]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/eyesIFX/sensors/SensorSettingsC.nc
Merge over into the trunk.
[tinyos-2.x.git] / tos / platforms / eyesIFX / sensors / SensorSettingsC.nc
index 6d75514546763f2276ac5a0eb2b90ecba7ebcc19..0387dcf7f0f48bbe4b3408056277e4bea83f4521 100644 (file)
 
 #include <sensors.h>
 module SensorSettingsC {
-    provides interface Msp430Adc12Config[uint8_t type];  
+  provides interface AdcConfigure<const msp430adc12_channel_config_t*> as AdcConfigure[uint8_t type];  
 }
 implementation
 {
-    async command msp430adc12_channel_config_t Msp430Adc12Config.getChannelSettings[uint8_t type]() {
-        msp430adc12_channel_config_t config;
-        if(type < SENSOR_SENTINEL) {
-            config = sensorconfigurations[type];
-        } else {
-            config = sensorconfigurations[SENSOR_SENTINEL];
-        }
-        return config;
-    }
+  async command const msp430adc12_channel_config_t* AdcConfigure.getConfiguration[uint8_t type]() {
+    if (type < SENSOR_SENTINEL)
+      return &sensorconfigurations[type];
+    else
+      return &sensorconfigurations[SENSOR_SENTINEL];
+  }
 }