I am making some A2D code to  average some readings.
For a case of condensing a struct filled with readings:
uint16_t a
uint16_t b
uint16_t c
uint16_t d
a  = (a + b + c + d) >> 2
?

Will that compile efficiently?

for 12 bit Adc readings, this should lose no precision,
and not require declaring longs.

See any gotchas?

Thanks,

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

Reply via email to