Hardware serial API.
More...
#include "boards/board_traits.h"
#include "interrupts.h"
#include "uart_commons.h"
#include "streams.h"
Go to the source code of this file.
|
namespace | serial |
| Defines all API for UART features.
|
|
namespace | serial::hard |
| Defines API types used by hardware UART features.
|
|
Hardware serial API.
Definition in file uart.h.
◆ 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_NUM | the 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_NUM | the 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_NUM | the number of the USART feature for the target MCU |
Definition at line 59 of file uart.h.