I've made a module supposed to act the same as Msp430Adc12MultiChannel
so I can add some logic to it for a mux sensorboard. I get compiler message:


I'm confused by the way I could resolve compiler messages about pointer type by having
some be pointers and some not.

The interface says,

async command error_t ch12Adc.configure(const msp430adc12_channel_config_t *config, adc12memctl_t *memctl, uint8_t numMemctl, uint16_t *buffer, uint16_t numSamples, uint16_t jiffies)

So, that means config and memctl and buffer are pointers, right?

But  the interface only compiles OK with this call:

if ( call ch12Adc.configure(&config, memctl, numMemctl, buffer, numSamples, jiffies) == SUCCESS)

where only &config is an address pointing to config. memctl and buffer were not declared pointers, and no error messages...

but, I can also get the compiler happy with this:
uint16_t buf[BUFFER_SIZE];
uint16_t *buffer = &buf[0];
and the same call as above.

A little help with the struct for memctl would be appreciated. Is a two line method like above the way to do it?

Code files are at:

http://ecosensory.com/Testch12AdcC.nc
http://ecosensory.com/Testch12AdcP.nc
http://ecosensory.com/ch12AdcC.nc
http://ecosensory.com/ch12AdcP.nc

Thanks,

John Griessen

--
Ecosensory
tinyOS devel on:  ubuntu Linux;   tinyOS v2.0.2;   telosb ecosens1
--
Ecosensory
tinyOS devel on:  ubuntu Linux;   tinyOS v2.0.2;   telosb ecosens1
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to