When you declare an array of values, the variable name itself is a
pointer to the first element in the array.

i.e.  int blah[5];

blah is of type int* and points to blah[0]

Kevin

On 8/23/07, John Griessen <[EMAIL PROTECTED]> wrote:
> 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'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.
>
> In Msp430Adc12.h  memctl is a struct I don't understand with type
> volatile unsigned.
>
> Should
>   memctl and buffer be pointers?
>
> 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
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>


-- 
~Kevin
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to