[Tinyos Core WG] Printf
David Gay
dgay42 at gmail.com
Tue Oct 24 14:39:39 PDT 2006
FWIW, another approach is to simply allow the regular C printf to be
used. To do this, you need to implement a low-level "output character"
function. This could be put in tos/lib/Printf/PrintfP.nc (i.e., use
the current buffering/serial-output stuff, but skip the formatting
stuff).
Advantage:
- familiar, convenient printf syntax
Disadvantage:
- doesn't follow the component stuff
As this is presumably for debugging, I think the advantage is worth it.
The details would be slightly different for msp430 vs atm128:
- atm128: see http://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html
- telosb: if I understand correctly, just implement a putchar function
(note: if you put @C() on a function inside a module, it's as if it
was a global C function)
David
More information about the Tinyos-2.0wg
mailing list