8 years ago.

where is documentation for 'gets' 'getc' 'putc' for serial communication?

my devboard: nrf51 DK

I am currently testing a simple UART serial communication code and checked out examples from this page.

https://developer.mbed.org/handbook/Serial

but I found something weird.

The example uses 'printf' function but this is not explained in the API summary for serial class reference(where it explains baud, read, write, kind of functions).

I know that the serial.printf(" ") functions work but why isn't this mentioned in the API summary?

This is the same for 'gets' function. I want to know more about 'gets' function for serial class because I'm trying to implement a read buffer with gets in serial communication.

can someone explain why 'printf, gets' sort of functions are not included in the API summary but still works?

Here main thing we have to understand is that ........these functions are normally used in c and c++.....These are not directly related to the serial class.....so that not included into serial class public member functions..... These classes are inherited from the parent class from default c and c++ libraries.....

note -see in raw serial class (raw serial)..... here is the Raw serial link-> https://developer.mbed.org/users/mbed_official/code/mbed/docs/252557024ec3/classmbed_1_1RawSerial.html

posted by Sharveya Bhise 15 Jul 2016

3 Answers

5 years, 6 months ago.

"Page not found" does not really help with the documentation.

Hi Tasos,

I apologize, since I posted my previous answer the URLs to the documentation pages got changed. I've updated the links in my answer below. Please let me know if you have any questions!

- Jenny, team Mbed

posted by Jenny Plunkett 17 Oct 2018

Thanks Jenny, that was fast!

posted by Tasos Ch 19 Oct 2018
5 years, 10 months ago.

Hi there,

For Mbed OS 5+ the documentation for gets, putc, getc, etc. are available within the Serial API documentation page here: https://os.mbed.com/docs/latest/apis/serial.html

Also, as Sharveya stated in the comments, the RawSerial API documentation is here: https://os.mbed.com/docs/latest/apis/rawserial.html

Please let me know if you have any questions!

- Jenny, team Mbed

If this solved your question, please make sure to click the "Thanks" link below!

They are not in there.

posted by E Flam 04 Jan 2019

Hi Jenny,

This is weak documentation. As someone pointed out, these functions are not even documented in there. Very disorganized. Nothing on gets, puts, printf. Examples scattered all over the place with no explanation. Not acceptable.

posted by Peter Backeris 01 Apr 2019
4 years, 11 months ago.

Hello Jenny, what's going on? You said "For Mbed OS 5+ the documentation for gets, putc, getc, etc. are available within the Serial API documentation page here: https://os.mbed.com/docs/latest/apis/serial.html" but that is not true.