[Tinyos Core WG] Re: AdcConfigure and struct return

Philip Levis pal at cs.stanford.edu
Wed Oct 4 12:57:16 PDT 2006


On Sep 22, 2006, at 6:53 AM, Jan Hauer wrote:

>>
>
>  interface AdcConfigure<adc_config_t>{
>    async command adc_config_t getConfiguration();
>  }
>
> In the second option I can see two advantages: we don't make every
> platform write an "Adc.h". And we can deal with multiple ADCs on the
> same platform (don't know how likely this is, though). Can you see any
> disadvantages ?

The consensus on the call today was that this is the best approach.  
Not only do you have a single interface that can be used with  
different platforms, it will also play out nicely when trying to  
tackle the multiple ADCs on a single platform issue. E.g., the MDA300  
can provide its own AdcConfigure<mda300_adc_config_t> while the  
atm128 can provide the AdcConfigure<atm128_adc_config_t>. Generic  
components above that want to be able to be ADC-independent merely  
need to be generic components that have this type as a parameter.  
They cannot modify the structure regardless. so this works well.

Phil



More information about the Tinyos-2.0wg mailing list