Hardware serial receiver API.
More...
#include <fastarduino/uart.h>
template<
board::USART USART_>
class serial::hard::UARX< USART_ >
Hardware serial receiver API.
For this API to be fully functional, you must register the right ISR in your program, through REGISTER_UARX_ISR()
.
- Template Parameters
-
- See also
- REGISTER_UARX_ISR()
Definition at line 351 of file uart.h.
◆ UARX()
template<uint8_t SIZE_RX>
Construct a new hardware serial receiver and provide it with a buffer for interrupt-based reception.
Reception is asynchronous.
- Parameters
-
input | an array of characters used by this receiver to store content received through serial line, buffered until read through in() . |
- See also
- REGISTER_UARX_ISR()
Definition at line 366 of file uart.h.
◆ begin()
Enable the receiver.
This is needed before any reception can take place. Once called, it is possible to read content, received through serial connection, by using in()
.
- Parameters
-
rate | the transmission rate in bits per second (bps) |
parity | the kind of parity check used by transmission |
stop_bits | the number of stop bits used by transmission |
Definition at line 381 of file uart.h.
◆ end()
Stop reception.
Once called, it is possible to re-enable reception again by calling begin()
.
- Parameters
-
buffer_handling | how to handle input buffer before ending transmissions |
- See also
- BufferHandling
Definition at line 394 of file uart.h.
◆ isr_handler
friend struct isr_handler |
|
friend |
◆ USART
The documentation for this class was generated from the following file: