Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Serial class

Serial class
[UART]

Functions

class MBED_DEPRECATED_SINCE ("mbed-os-6.0.0","Use printf and puts instead to access the console, BufferedSerial for blocking applications or UnbufferedSerial if bypassing locks in IRQ or short of RAM.") Serial

Function Documentation

class mbed::MBED_DEPRECATED_SINCE ( "mbed-os-6.0.0"  ,
"Use printf and puts instead to access the   console,
BufferedSerial for blocking applications or UnbufferedSerial if bypassing locks in IRQ or short of RAM."   
)

Can be used for Full Duplex communication, or Simplex by specifying one pin as NC (Not Connected)

Note:
Synchronization level: Thread safe

Example:

 // Print "Hello World" to the PC

 #include "mbed.h"

 Serial pc(USBTX, USBRX);

 int main() {
     pc.printf("Hello World\n");
 }

Resolve ambiguities in SerialBase and FileHandle (for enable_input and enable_output)

Parameters:
txTransmit pin
rxReceive pin
nameThe name of the stream associated with this serial port (optional)
baudThe baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE or 9600)
Note:
Either tx or rx may be specified as NC (Not Connected) if unused
Parameters:
static_pinmapreference to structure which holds static pinmap.
nameThe name of the stream associated with this serial port (optional)
baudThe baud rate of the serial port (optional, defaults to MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE or 9600)
Note:
Either tx or rx may be specified as NC (Not Connected) if unused
Parameters:
txTransmit pin
rxReceive pin
baudThe baud rate of the serial port
Note:
Either tx or rx may be specified as NC (Not Connected) if unused
Parameters:
static_pinmapreference to structure which holds static pinmap.
baudThe baud rate of the serial port
Note:
Either tx or rx may be specified as NC (Not Connected) if unused

Definition at line 58 of file Serial.h.