fprintf() to serial port on AVR
Posted: Fri Feb 04, 2011 9:04 am
I'm thinking it would be nice to be able to call fprintf() and print directly to a serial port on the AVR. I don't know if there's already support for this or not.
Otherwise, I have to either malloc() or permanently assign space for a buffer to build the string (either statically, or by statically allocating a bigger stack). I figure internally, fprintf() outputs a byte at a time into the FILE structure, I just have to associate one with a call to sdWrite() somehow.
Any suggestions?
TIA!
Otherwise, I have to either malloc() or permanently assign space for a buffer to build the string (either statically, or by statically allocating a bigger stack). I figure internally, fprintf() outputs a byte at a time into the FILE structure, I just have to associate one with a call to sdWrite() somehow.
Any suggestions?
TIA!