Hardware serial transmitter API.
More...
#include <fastarduino/uart.h>
template<
board::USART USART_>
class serial::hard::UATX< USART_ >
Hardware serial transmitter API.
For this API to be fully functional, you must register the right ISR in your program, through REGISTER_UATX_ISR()
. You must also register this class as a streams::ostreambuf
callback listener through REGISTER_OSTREAMBUF_LISTENERS()
.
- Template Parameters
-
- See also
- REGISTER_UATX_ISR()
-
REGISTER_OSTREAMBUF_LISTENERS()
Definition at line 240 of file uart.h.
◆ UATX()
template<uint8_t SIZE_TX>
Construct a new hardware serial transmitter and provide it with a buffer for interrupt-based transmission.
- Parameters
-
output | an array of characters used by this transmitter to buffer output during transmission so that write methods are not blocking. |
- See also
- REGISTER_UATX_ISR()
Definition at line 254 of file uart.h.
◆ begin()
Enable the transmitter.
This is needed before any transmission can take place. Once called, it is possible to push content to out()
, which will be then transmitted through the serial connection.
- 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 269 of file uart.h.
◆ end()
Stop all transmissions.
Once called, it is possible to re-enable transmission again by calling begin()
.
- Parameters
-
buffer_handling | how to handle output buffer before ending transmissions |
- See also
- BufferHandling
Definition at line 282 of file uart.h.
◆ isr_handler
friend struct isr_handler |
|
friend |
◆ USART
The documentation for this class was generated from the following file: