The top (HIL) ADC layer uses the AdcConfigure interface and provides the Read, ReadNow and ReadStream interfaces - AdcConfigure is for ADC configuration (e.g input channel), the others are for reading out data. AdcConfigure is *called* by the ADC stack every time a client has asked for ADC data via the Read interfaces, i.e. the client never actively configures the ADC, but instead provides a AdcConfigure.getConfiguration() handler that returns its individual configuration. The top level ADC components, on which you could build sensor components, are: AdcReadClientC, AdcReadStreamClientC, AdcReadNowClientC, located in tinyos-2.x/tos/chips/msp430/adc12.
On telos by default DemoSensorC is a wrapper on Msp430InternalVoltageC (tinyos-2.x/tos/chips/msp430/sensors), which "forwards" the read interfaces from the ADC stack adding only the wiring for the AdcConfigure interface: AdcReadClientC.AdcConfigure -> Msp430InternalVoltageP; ...and all Msp430InternalVoltageP does is return the configuration for the msp430 internal voltage sensor. If the Read interfaces are not "good enough", take a look at tinyos-2.x/tos/chips/msp430/adc12/Msp430Adc12Client*.nc. These components export the msp430 specific functionality. If you use them your code will not be so portable anymore, but you can do things like high-frequency sampling of multiple ADC channels via DMA. Start with: tinyos-2.x/tos/chips/msp430/adc12/README.txt. Jan On 7/30/07, Michael Schippling <[EMAIL PROTECTED]> wrote: > Well, yeah...But doesn't every platform also have the "raw" ADC implementation > which provides exactly the same interface, with a (well, to my low-level mind) > more straightforward connection to the external world? Admittedly there are > some 'tricks' that need to be performed to get, e.g., the micasb Photo/Temp > sensors to work. But the extra "Demo" layer increases obscurity without > providing any additional modularity. And making changes, say Photo to Temp, > requires editing a file in the "system" area rather than directly in the app. > > Anyway, Software Design is still a Black Art... > MS > > > Joe Polastre wrote: > >> What you will find is that it is a dimly veiled layer over an ADC input, > >> which, IMHO, just obscures and obfuscates the usage... > > > > Yes, however every platform has a DemoSensor, which allows demos (not > > applications) to be written and compiled irregardless of the platform > > (thus the prefix "Demo") > > > > -Joe > _______________________________________________ > Tinyos-help mailing list > Tinyos-help@Millennium.Berkeley.EDU > https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > _______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help