Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
Functions | |
class | MBED_DEPRECATED_SINCE ("mbed-os-6.0.0","Use UnbufferedSerial instead.") RawSerial |
Function Documentation
class mbed::MBED_DEPRECATED_SINCE | ( | "mbed-os-6.0.0" | , |
"Use UnbufferedSerial instead." | |||
) |
Can be used for Full Duplex communication, or Simplex by specifying one pin as NC (Not Connected)
- Note:
- Synchronization level: Not protected
Example:
// Send a char to the PC #include "mbed.h" RawSerial pc(USBTX, USBRX); int main() { pc.putc('A'); }
- Parameters:
-
tx Transmit pin rx Receive pin baud The baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE)
- Note:
- Either tx or rx may be specified as NC if unused
- Parameters:
-
c The char to write
- Returns:
- The written char or -1 if an error occurred
- Returns:
- The char read from the serial port
- Parameters:
-
str The string to write
- Returns:
- 0 if the write succeeds, EOF for error
Definition at line 64 of file RawSerial.h.
Generated on Tue Jul 12 2022 13:55:20 by
