Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 11 months ago.
fputc definition
I intend to do a port of some of the mbed library to another device so that I can reuse some libraries that I've written for mbed. The two libraries that are of most interest are SPI and Serial.
I can understand all of the workings of the SPI library and believe I can implement it on the other device. I'm struggling however with the Serial library. In the Stream library which Serial inherits from, the putc member function calls std::fputc
int Stream::putc(int c) { fflush(_file); return std::fputc(c, _file); }
Somehow fputc calls the Serial::_putc member function, but I can't find a definition of fputc anywhere in the mbed library. Please could someone tell me where the c code for fputc is or how the Serial::_putc method is called from it?
Thanks, Tim