0/1

here's the define from T1 tos/platform/avrmote/avrhardware.h

        static inline int TOSH_READ_##name##_PIN() \
                {return (inp(PIN##port) & (1 << bit)) != 0;}

One hopes that T2 and other platforms behave similarly.
MS



Nashwa Abo Elneel wrote:
Hi,

I want to know what is the return of the TOSH_READ_##name##_PIN() command if for example i put the result in a variable

uint16_t tmp;

tmp= TOSH_READ_##name##_PIN()

will the command return be placed in the least significant bit of "tmp" or the return value will be in the position of the port pin number?

i.e if the name assigned is to port B6 for example, then what will be returned from the reading will be placed as follows:

tmp= 0000 0000 0X00 0000, where X  is what read from the port pin
or it will be as :

tmp= 0000 0000 0000 000X, where X  is what read from the port pin

and how to get the result to be put in the LSB?

Thanks

------------------------------------------------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search. <http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping>


------------------------------------------------------------------------

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

--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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

Reply via email to