SerialStream fork implementing sigio, attach, readable, and writable

Embed: (wiki syntax)

« Back to documentation index

SerialStream< SerialClass > Class Template Reference

SerialStream< SerialClass > Class Template Reference

SerialStream Bringing MBed serial ports back like it's 1999... More...

#include <SerialStream.h>

Public Member Functions

 SerialStream (SerialClass &_serialClass, const char *name=nullptr)
 Create a SerialStream from a serial port.

Detailed Description

template<class SerialClass>
class SerialStream< SerialClass >

SerialStream Bringing MBed serial ports back like it's 1999...

or at least 2019.

This class adapts an MBed 6.0 serial port class into a Stream instance. This lets you do two useful things with it:

  • Call printf() and scanf() on it
  • Pass it to code that expects a Stream to print things on.

Definition at line 17 of file SerialStream.h.


Constructor & Destructor Documentation

SerialStream ( SerialClass &  _serialClass,
const char *  name = nullptr 
)

Create a SerialStream from a serial port.

Parameters:
_serialClassBufferedSerial or UnbufferedSerial instance
nameThe name of the stream associated with this serial port (optional)

Definition at line 28 of file SerialStream.h.