Go to the documentation of this file.
19 #ifndef ARDUINO_SERIAL_H
20 #define ARDUINO_SERIAL_H
30 #define SERIAL_RX_BUFSIZE (64)
51 template<
typename T>
size_t _println(T val);
52 template<
typename T>
size_t _println(T val,
SerialFormat format);
89 void begin(
long speed);
116 size_t print(
int val);
145 size_t print(
unsigned int val);
174 size_t print(
long val);
203 size_t print(
unsigned long val);
224 size_t print(
float val);
236 size_t print(
float val,
int format);
247 size_t print(
char val);
258 size_t print(
const char *val);
302 size_t println(
unsigned int val);
360 size_t println(
unsigned long val);
401 size_t println(
float val,
int format);
427 size_t println(
const char *val);
472 int write(
const char *str);
483 int write(
char *buf,
int len);
@ BIN
format to binary representation
int available(void)
Get the number of bytes (characters) available for reading from the serial port.
A utility for storing and retrieving byte data using a ring buffer.
int write(int val)
Writes binary data to the serial port.
size_t print(int val)
Prints data to the serial port as human-readable ASCII text.
SerialFormat
Formatting options for Serial.print(int, format)
size_t println(void)
Prints a carriage return character (ASCII 13, or "\r") and a newline character (ASCII 10,...
void end(void)
Disables serial communication, allowing the RX and TX pins to be used for general input and output.
unsigned int uart_t
Define default UART type identifier.
Low-level UART peripheral driver interface definition.
@ OCT
format to octal representation
Arduino Serial Interface.
@ HEX
format to hex representation
#define SERIAL_RX_BUFSIZE
Default RX buffer size - same as the original Arduino...
SerialPort(uart_t dev)
Constructor maps the serial port to a RIOT UART device.
@ DEC
format to decimal representation
int read(void)
Reads incoming serial data.
void begin(long speed)
Sets the data rate in bits per second (baud) for serial data transmission.