34#ifndef _FREERTOS_DRIVERS_COMMON_SERIAL_HXX_
35#define _FREERTOS_DRIVERS_COMMON_SERIAL_HXX_
54 size_t tx_buffer_size = config_serial_tx_buffer_size(),
55 size_t rx_buffer_size = config_serial_rx_buffer_size())
Implements a smart buffer specifically designed for character device drivers.
void destroy()
Destroy an existing DeviceBuffer instance.
const char * name
device name
Private data for a serial device.
DeviceBuffer< uint8_t > * rxBuf
receive buffer
DeviceBuffer< uint8_t > * txBuf
transmit buffer
Serial(const char *name, size_t tx_buffer_size=config_serial_tx_buffer_size(), size_t rx_buffer_size=config_serial_rx_buffer_size())
Constructor.
bool select(File *file, int mode) OVERRIDE
Device select method.
void flush_buffers() OVERRIDE
Discards all pending buffers.
virtual void tx_char()=0
Function to try and transmit a character.
ssize_t write(File *file, const void *buf, size_t count) OVERRIDE
Write to a file or device.
unsigned int overrunCount
overrun count
ssize_t read(File *file, void *buf, size_t count) OVERRIDE
Read from a file or device.
int ioctl(File *file, unsigned long int key, unsigned long data) OVERRIDE
Request an ioctl transaction.
#define OVERRIDE
Function attribute for virtual functions declaring that this funciton is overriding a funciton that s...
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.