25 #if !defined(__AVR_ATmega2560__) 26 #error "USART1 doesn't exist on ATMega328p (Arduino Uno); you can only use this on ATMega2560 (Arduino Mega)." 84 #ifndef USART_SERIAL_CONFIG 85 #define USART_SERIAL_CONFIG 182 size_t write(
char c );
199 size_t write(
const char* c );
218 size_t write(
const char* c,
size_t n );
237 size_t write(
const uint8_t* c,
size_t n );
346 virtual size_t write(
char c );
356 virtual size_t write(
const char* str );
367 virtual size_t write(
const char* buffer,
size_t size );
378 virtual size_t write(
const uint8_t* buffer,
size_t size );
385 virtual void flush();
int read()
Return the next character in the receive buffer, removing it from the buffer.
Definition: USART1.cpp:191
This is an abstract class defining a generic interface to read numbers and strings from a sequential ...
Definition: Reader.h:65
7 data bits, no parity, 2 stop bits
Definition: USART1.h:105
5 data bits, no parity, 1 stop bit
Definition: USART1.h:99
7 data bits, no parity, 1 stop bit
Definition: USART1.h:101
5 data bits, even parity, 1 stop bit
Definition: USART1.h:107
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:90
This is an abstract class defining a generic interface to write numbers and strings to a sequential s...
Definition: Writer.h:63
5 data bits, even parity, 2 stop bits
Definition: USART1.h:111
8 data bits, odd parity, 2 stop bits
Definition: USART1.h:122
void flush()
Flush transmit buffer.
Definition: USART1.cpp:171
6 data bits, odd parity, 2 stop bits
Definition: USART1.h:120
void start(unsigned long baudRate, UsartSerialConfiguration config=kSerial_8N1)
Initialize USART1 for buffered, asynchronous serial communications using interrupts.
Definition: USART1.cpp:114
void stop()
Stops buffered serial communications using Serial1 on USART1 by deconfiguring the hardware and turnin...
Definition: USART1.h:331
5 data bits, odd parity, 1 stop bit
Definition: USART1.h:115
8 data bits, no parity, 1 stop bit
Definition: USART1.h:102
6 data bits, even parity, 2 stop bits
Definition: USART1.h:112
void start(unsigned long baudRate, UsartSerialConfiguration config=kSerial_8N1)
Configure the hardware for two-way serial communications, including turning on associated interrupts...
Definition: USART1.h:318
8 data bits, even parity, 2 stop bits
Definition: USART1.h:114
6 data bits, even parity, 1 stop bit
Definition: USART1.h:108
6 data bits, odd parity, 1 stop bit
Definition: USART1.h:116
7 data bits, even parity, 1 stop bit
Definition: USART1.h:109
6 data bits, no parity, 2 stop bits
Definition: USART1.h:104
size_t write(char c)
Write a single byte to the transmit buffer.
Definition: USART1.cpp:198
This file provides a generic interface to outgoing data streams of any kind. It is designed around ho...
8 data bits, no parity, 2 stop bits
Definition: USART1.h:106
6 data bits, no parity, 1 stop bit
Definition: USART1.h:100
5 data bits, odd parity, 2 stop bits
Definition: USART1.h:119
This namespace bundles a high-level buffered interface to the USART1 hardware. It provides logical co...
Definition: USART1.h:135
8 data bits, odd parity, 1 stop bit
Definition: USART1.h:118
Provides a high-end interface to serial communications using USART1.
Definition: USART1.h:302
8 data bits, even parity, 1 stop bit
Definition: USART1.h:110
5 data bits, no parity, 2 stop bits
Definition: USART1.h:103
int peek()
Examine the next character in the receive buffer without removing it from the buffer.
Definition: USART1.cpp:184
void stop()
Stops buffered serial communications using interrupts on USART1.
Definition: USART1.cpp:158
7 data bits, odd parity, 1 stop bit
Definition: USART1.h:117
7 data bits, odd parity, 2 stop bits
Definition: USART1.h:121
bool available()
Determine if there is data in the receive buffer..
Definition: USART1.cpp:280
7 data bits, even parity, 2 stop bits
Definition: USART1.h:113