JeeLib
An easy interface to the port headers, the RF12 driver library, timers, low-power code, and more.
 All Classes Files Functions Variables Enumerations Macros Pages
UartPlug Class Reference

Interface for the UART Plug - see https://jeelabs.org/up. More...

#include <Ports.h>

Inheritance diagram for UartPlug:

Public Member Functions

 UartPlug (PortI2C &port, byte addr)
 
void begin (long)
 Initialize a UartPlug. More...
 
byte available ()
 Test if UartPlug has incoming data. More...
 
int read ()
 Read two bytes from the UartPlug's serial input. More...
 
void flush ()
 Clear the RX and TX queues.
 
virtual WRITE_RESULT write (byte)
 Write data on the serial port of the UartPlug. More...
 

Detailed Description

Interface for the UART Plug - see https://jeelabs.org/up.

Member Function Documentation

byte UartPlug::available ( )

Test if UartPlug has incoming data.

Returns
True if data in device buffer. False if no data in device buffer.
void UartPlug::begin ( long  baud)

Initialize a UartPlug.

Parameters
baudBaud rate for the serial port.
int UartPlug::read ( )

Read two bytes from the UartPlug's serial input.

Returns
Two bytes with the data read.
WRITE_RESULT UartPlug::write ( byte  data)
virtual

Write data on the serial port of the UartPlug.

Parameters
dataByte of data to send out.

The documentation for this class was generated from the following files: