#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];
+ }
}