25 #ifndef COSA_UART_RX_BUFFER_MAX 26 # if defined(BOARD_ATTINY) 27 # define COSA_UART_RX_BUFFER_MAX 16 29 # define COSA_UART_RX_BUFFER_MAX 32 34 #ifndef COSA_UART_TX_BUFFER_MAX 35 # if defined(BOARD_ATTINY) 36 # define COSA_UART_TX_BUFFER_MAX 16 38 # define COSA_UART_TX_BUFFER_MAX 32 42 #if defined(BOARD_ATTINY) 238 return ((
volatile uint16_t*) (m_sfr + 4));
269 #if defined(USART_UDRE_vect) 274 #if defined(USART1_UDRE_vect) 279 #if defined(USART2_UDRE_vect) 284 #if defined(USART3_UDRE_vect)
#define COSA_UART_RX_BUFFER_MAX
IOStream::Device * m_obuf
Output Buffer/Device.
void USART1_RX_vect(void)
void USART2_TX_vect(void)
volatile uint8_t * UCSRnA() const
volatile uint8_t * UCSRnC() const
virtual int peekchar(char c)
virtual bool begin(uint32_t baudrate=DEFAULT_BAUDRATE, uint8_t format=DEFAULT_FORMAT)
void USART1_UDRE_vect(void)
bool m_idle
Flag idle mode.
static UART * uart[Board::UART_MAX]
UART(uint8_t port, IOStream::Device *ibuf, IOStream::Device *obuf)
volatile uint16_t * UBRRn() const
virtual void on_udre_interrupt()
#define COSA_UART_TX_BUFFER_MAX
void USART2_UDRE_vect(void)
void USART1_TX_vect(void)
static IOBuffer< UART::TX_BUFFER_MAX > obuf
IOStream::Device * m_ibuf
Input Buffer/Device.
volatile uint8_t *const m_sfr
Special Function Register Pointer.
virtual void on_tx_interrupt()
static const uint32_t DEFAULT_BAUDRATE
void USART3_RX_vect(void)
virtual void on_rx_interrupt()
static const uint16_t TX_BUFFER_MAX
void USART3_UDRE_vect(void)
static const uint16_t RX_BUFFER_MAX
static IOBuffer< UART::RX_BUFFER_MAX > ibuf
uint8_t m_port
UART port index.
volatile uint8_t * UCSRnB() const
static const uint8_t DEFAULT_FORMAT
void USART3_TX_vect(void)
volatile uint8_t * UDRn() const
void USART2_RX_vect(void)
virtual int putchar(char c)