FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
uart.h File Reference

Hardware serial API. More...

#include "boards/board_traits.h"
#include "interrupts.h"
#include "uart_commons.h"
#include "streams.h"
Include dependency graph for uart.h:

Go to the source code of this file.

Classes

class  serial::hard::UATX< USART_ >
 Hardware serial transmitter API. More...
 
class  serial::hard::UARX< USART_ >
 Hardware serial receiver API. More...
 
class  serial::hard::UART< USART_ >
 Hardware serial receiver/transceiver API. More...
 

Namespaces

namespace  serial
 Defines all API for UART features.
 
namespace  serial::hard
 Defines API types used by hardware UART features.
 

Macros

#define REGISTER_UATX_ISR(UART_NUM)
 Register the necessary ISR (Interrupt Service Routine) for an serial::hard::UATX to work correctly. More...
 
#define REGISTER_UARX_ISR(UART_NUM)
 Register the necessary ISR (Interrupt Service Routine) for an serial::hard::UARX to work correctly. More...
 
#define REGISTER_UART_ISR(UART_NUM)
 Register the necessary ISR (Interrupt Service Routine) for an serial::hard::UART to work correctly. More...
 

Detailed Description

Hardware serial API.

Definition in file uart.h.

Macro Definition Documentation

◆ REGISTER_UATX_ISR

#define REGISTER_UATX_ISR (   UART_NUM)
Value:
ISR(CAT3(USART, UART_NUM, _UDRE_vect)) \
{ \
serial::hard::isr_handler::uatx<UART_NUM>(); \
}

Register the necessary ISR (Interrupt Service Routine) for an serial::hard::UATX to work correctly.

Parameters
UART_NUMthe number of the USART feature for the target MCU

Definition at line 37 of file uart.h.

◆ REGISTER_UARX_ISR

#define REGISTER_UARX_ISR (   UART_NUM)
Value:
ISR(CAT3(USART, UART_NUM, _RX_vect)) \
{ \
serial::hard::isr_handler::uarx<UART_NUM>(); \
}

Register the necessary ISR (Interrupt Service Routine) for an serial::hard::UARX to work correctly.

Parameters
UART_NUMthe number of the USART feature for the target MCU

Definition at line 48 of file uart.h.

◆ REGISTER_UART_ISR

#define REGISTER_UART_ISR (   UART_NUM)
Value:
ISR(CAT3(USART, UART_NUM, _UDRE_vect)) \
{ \
serial::hard::isr_handler::uart_tx<UART_NUM>(); \
} \
\
ISR(CAT3(USART, UART_NUM, _RX_vect)) \
{ \
serial::hard::isr_handler::uart_rx<UART_NUM>(); \
}

Register the necessary ISR (Interrupt Service Routine) for an serial::hard::UART to work correctly.

Parameters
UART_NUMthe number of the USART feature for the target MCU

Definition at line 59 of file uart.h.