Hello,
I have recently used the TOSH_ASSIGN_OUTPUT_ONLY_PIN, because I
needed to power a device from one of the data-pins on a node. So in
order to turn the device on, I did basicly:
TOSH_ASSIGN_OUTPUT_ONLY_PIN(ACCEL_CTL, F, 4);
command result_t StdControl.init()
{
TOSH_MAKE_ACCEL_CTL_OUTPUT();
TOSH_SET_ACCEL_CTL_PIN();
}
However, these two calls are not enough to use the pin as a source. This
is because TOSH_MAKE_ACCEL_CTL_OUTPUT is an empty function, when created
by TOSH_ASSIGN_OUTPUT_ONLY_PIN. If TOSH_ASSIGN_PIN is used, the call
will result in a sbi(DDRF, 4); , which will mark pin F4 as an output.
Is this by design, or is it an error?
I use the btnode platform (from the tinybt contrib), so it might be that
the initialization process is different on the other platforms (ie. they
might initialize all pins for output). All the avrhardware.h files I
have been able to locate define TOSH_MAKE_xxx_OUTPUT to an empty
function, if they are created by TOSH_ASSIGN_OUTPUT_ONLY_PIN.
--
Best regards,
Klaus S. Madsen
Dept. of Computer Science, University of Copenhagen
_______________________________________________
Tinyos-users mailing list
[EMAIL PROTECTED]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users