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);
236 size_t print(
float val,
int format);
Arduino Serial Interface.
int write(const char *str)
Writes binary data to the serial port.
size_t print(long val)
Prints data to the serial port as human-readable ASCII text.
size_t print(const char *val)
Prints data to the serial port as human-readable ASCII text.
size_t println(unsigned long val)
Prints data to the serial port as human-readable ASCII text followed by a carriage return character (...
size_t println(long val)
Prints data to the serial port as human-readable ASCII text followed by a carriage return character (...
size_t print(unsigned int val, SerialFormat format)
Prints data to the serial port as human-readable ASCII text.
int write(int val)
Writes binary data to the serial port.
size_t print(float val, int format)
Prints data to the serial port as human-readable ASCII text.
size_t print(long val, SerialFormat format)
Prints data to the serial port as human-readable ASCII text.
size_t print(char val)
Prints data to the serial port as human-readable ASCII text.
int read(void)
Reads incoming serial data.
size_t print(int val)
Prints data to the serial port as human-readable ASCII text.
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.
int available(void)
Get the number of bytes (characters) available for reading from the serial port.
size_t println(float val)
Prints data to the serial port as human-readable ASCII text followed by a carriage return character (...
size_t print(unsigned int val)
Prints data to the serial port as human-readable ASCII text.
size_t println(long val, SerialFormat format)
Prints data to the serial port as human-readable ASCII text followed by a carriage return character (...
size_t println(int val, SerialFormat format)
Prints data to the serial port as human-readable ASCII text followed by a carriage return character (...
size_t println(unsigned int val)
Prints data to the serial port as human-readable ASCII text followed by a carriage return character (...
size_t print(int val, SerialFormat format)
Prints data to the serial port as human-readable ASCII text.
size_t println(char val)
Prints data to the serial port as human-readable ASCII text followed by a carriage return character (...
void begin(long speed)
Sets the data rate in bits per second (baud) for serial data transmission.
int write(char *buf, int len)
Writes binary data to the serial port.
size_t println(int val)
Prints data to the serial port as human-readable ASCII text followed by a carriage return character (...
size_t println(unsigned int val, SerialFormat format)
Prints data to the serial port as human-readable ASCII text followed by a carriage return character (...
size_t println(float val, int format)
Prints data to the serial port as human-readable ASCII text followed by a carriage return character (...
size_t print(unsigned long val, SerialFormat format)
Prints data to the serial port as human-readable ASCII text.
SerialPort(uart_t dev)
Constructor maps the serial port to a RIOT UART device.
size_t print(unsigned long val)
Prints data to the serial port as human-readable ASCII text.
size_t println(unsigned long val, SerialFormat format)
Prints data to the serial port as human-readable ASCII text followed by a carriage return character (...
size_t print(float val)
Prints data to the serial port as human-readable ASCII text.
size_t println(const char *val)
Prints data to the serial port as human-readable ASCII text followed by a carriage return character (...
Low-level UART peripheral driver interface definition.
uint_fast8_t uart_t
Define default UART type identifier.
A utility for storing and retrieving byte data using a ring buffer.
SerialFormat
Formatting options for Serial.print(int, format)
@ BIN
format to binary representation
@ OCT
format to octal representation
@ DEC
format to decimal representation
@ HEX
format to hex representation
#define SERIAL_RX_BUFSIZE
Default RX buffer size - same as the original Arduino...