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.
11 years, 11 months ago.
getc and putc
I'm curious why getc and putc aren't listed as public functions of Serial.
I see them used in examples, but they aren't documented as Serial functions.
Question relating to:
1 Answer
11 years, 11 months ago.
The problem is they are inherited from the parent class via default C library functions. So it isn't directly via the Serial class, and it isn't included in the API documentation of the Serial class. That said it would indeed be clearer if it was included anyway.
In looking through it I also saw they added the RawSerial class few days ago, there it is included (http://mbed.org/users/mbed_official/code/mbed-src/docs/e8b66477f5bf/classmbed_1_1RawSerial.html), since there the putc and getc functions are defined explicitly (to get around RTOS issues).
was wondering the same thing myself. good question.
posted by Michael Wasko 11 Jan 2014