having just been corrected for spreading my incomplete understanding
of events I'll go out on a limb here anyway...
I believe TOSH_ASSIGN_PIN() just sets a compile time name for a
port/pin combo. When you later use those names to set ins and outs
you actually set pins to specific values and directions. But doing
that on the controller side is not going to change the sense of whatever
is connected to the pin, which seems to be the radio in this case...
Setting an input to output when something is connected to it is
probably OK as long as the source currents are reasonably small,
they will fight each other but probably not release any smoke.
If there is a way to disable the external connection's output
like tri-stating or something, then you could multiplex the use
of the controller pin, which may be what you are asking about?
MS
Lifeng Sang wrote:
In hardware.h, there are some macros for ChipCon control assignments
TOSH_ASSIGN_PIN(CC_CHP_OUT, A, 6); // chipcon CHP_OUT
TOSH_ASSIGN_PIN(CC_PDATA, D, 7); // chipcon PDATA
TOSH_ASSIGN_PIN(CC_PCLK, D, 6); // chipcon PCLK
TOSH_ASSIGN_PIN(CC_PALE, D, 4); // chipcon PALE
if we exchange the port number for OUTPUT PIN and INPUT PIN, does the
hardware take the input pin as its output, and output pin as its input?
If it does, will the hardware burn because of short circuit? why not fix
the pin number in the lower level, e.g., TOSH_MAKE_CC_CHP_OUT_INPUT?
Thanks,
Lifeng Sang
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help