21 #ifndef COSA_SOFT_UART_HH 22 #define COSA_SOFT_UART_HH 31 #ifndef COSA_SOFT_UART_RX_BUFFER_MAX 32 # if defined(BOARD_ATTINY) 33 # define COSA_SOFT_UART_RX_BUFFER_MAX 16 35 # define COSA_SOFT_UART_RX_BUFFER_MAX 32 40 #ifndef COSA_SOFT_UART_TX_BUFFER_MAX 41 # if defined(BOARD_ATTINY) 42 # define COSA_SOFT_UART_TX_BUFFER_MAX 16 44 # define COSA_SOFT_UART_TX_BUFFER_MAX 32 118 return (m_ibuf->available());
130 return (m_ibuf->peekchar());
141 return (m_ibuf->peekchar(c));
153 return (m_ibuf->getchar());
191 virtual void on_interrupt(uint16_t arg = 0);
virtual int putchar(char c)
IOStream::Device * m_ibuf
#define COSA_SOFT_UART_RX_BUFFER_MAX
UAT(Board::DigitalPin tx)
virtual int peekchar(char c)
RXPinChangeInterrupt m_rx
#define COSA_SOFT_UART_TX_BUFFER_MAX
static const uint32_t DEFAULT_BAUDRATE
virtual bool begin(uint32_t baudrate=DEFAULT_BAUDRATE, uint8_t format=DEFAULT_FORMAT)
static IOBuffer< UART::RX_BUFFER_MAX > ibuf
static const uint8_t DEFAULT_FORMAT