77#ifndef USART_SERIAL_CONFIG
78#define USART_SERIAL_CONFIG
211 size_t write(
const char* c,
size_t n );
230 size_t write(
const uint8_t* c,
size_t n );
349 virtual size_t write(
const char* str );
360 virtual size_t write(
const char* buffer,
size_t size );
371 virtual size_t write(
const uint8_t* buffer,
size_t size );
This file provides a generic interface to incoming data streams of any kind. It is designed around ho...
UsartSerialConfiguration
This enum lists serial configuration in terms of data bits, parity, and stop bits.
Definition USART0.h:91
@ kSerial_8N2
8 data bits, no parity, 2 stop bits
Definition USART0.h:99
@ kSerial_6E1
6 data bits, even parity, 1 stop bit
Definition USART0.h:101
@ kSerial_5E2
5 data bits, even parity, 2 stop bits
Definition USART0.h:104
@ kSerial_7E1
7 data bits, even parity, 1 stop bit
Definition USART0.h:102
@ kSerial_5O1
5 data bits, odd parity, 1 stop bit
Definition USART0.h:108
@ kSerial_5O2
5 data bits, odd parity, 2 stop bits
Definition USART0.h:112
@ kSerial_6O1
6 data bits, odd parity, 1 stop bit
Definition USART0.h:109
@ kSerial_6N1
6 data bits, no parity, 1 stop bit
Definition USART0.h:93
@ kSerial_8O2
8 data bits, odd parity, 2 stop bits
Definition USART0.h:115
@ kSerial_8E2
8 data bits, even parity, 2 stop bits
Definition USART0.h:107
@ kSerial_8E1
8 data bits, even parity, 1 stop bit
Definition USART0.h:103
@ kSerial_6O2
6 data bits, odd parity, 2 stop bits
Definition USART0.h:113
@ kSerial_7O1
7 data bits, odd parity, 1 stop bit
Definition USART0.h:110
@ kSerial_8O1
8 data bits, odd parity, 1 stop bit
Definition USART0.h:111
@ kSerial_5N2
5 data bits, no parity, 2 stop bits
Definition USART0.h:96
@ kSerial_7E2
7 data bits, even parity, 2 stop bits
Definition USART0.h:106
@ kSerial_7N1
7 data bits, no parity, 1 stop bit
Definition USART0.h:94
@ kSerial_7N2
7 data bits, no parity, 2 stop bits
Definition USART0.h:98
@ kSerial_7O2
7 data bits, odd parity, 2 stop bits
Definition USART0.h:114
@ kSerial_6N2
6 data bits, no parity, 2 stop bits
Definition USART0.h:97
@ kSerial_8N1
8 data bits, no parity, 1 stop bit
Definition USART0.h:95
@ kSerial_5E1
5 data bits, even parity, 1 stop bit
Definition USART0.h:100
@ kSerial_6E2
6 data bits, even parity, 2 stop bits
Definition USART0.h:105
@ kSerial_5N1
5 data bits, no parity, 1 stop bit
Definition USART0.h:92
This file provides a generic interface to outgoing data streams of any kind. It is designed around ho...
This is an abstract class defining a generic interface to read numbers and strings from a sequential ...
Definition Reader.h:66
Provides a high-end interface to serial communications using USART0.
Definition USART0.h:296
virtual int read()
Read and remove the next byte from the input stream. This implements the pure virtual function Reader...
void start(unsigned long baudRate, UsartSerialConfiguration config=kSerial_8N1)
Configure the hardware for two-way serial communications, including turning on associated interrupts....
Definition USART0.h:311
void stop()
Stops buffered serial communications using Serial0 on USART0 by deconfiguring the hardware and turnin...
Definition USART0.h:324
virtual size_t write(const uint8_t *buffer, size_t size)
Write a given number of bytes from a buffer to the output stream. This implements the pure virtual fu...
virtual size_t write(char c)
Write a single character to the output stream. This implements the pure virtual function Writer::writ...
virtual size_t write(const char *str)
Write a null-terminated string to the output stream. This implements the pure virtual function Writer...
virtual bool available()
Determine if data is available in the input stream. This implements the pure virtual function Reader:...
virtual void flush()
Flush the output stream. When this function returns, all previously written data will have been trans...
virtual size_t write(const char *buffer, size_t size)
Write a given number of characters from a buffer to the output stream. This implements the pure virtu...
virtual int peek()
Examine the next byte from the input stream, without removing it. This implements the pure virtual fu...
This is an abstract class defining a generic interface to write numbers and strings to a sequential s...
Definition Writer.h:64
This namespace bundles a high-level buffered interface to the USART0 hardware. It provides logical co...
Definition USART0.h:129
void flush()
Flush transmit buffer.
void start(unsigned long baudRate, UsartSerialConfiguration config=kSerial_8N1)
Initialize USART0 for buffered, asynchronous serial communications using interrupts.
int peek()
Examine the next character in the receive buffer without removing it from the buffer.
size_t write(char c)
Write a single byte to the transmit buffer.
int read()
Return the next character in the receive buffer, removing it from the buffer.
bool available()
Determine if there is data in the receive buffer..
void stop()
Stops buffered serial communications using interrupts on USART0.