#include <modm/platform/rtt/rtt.hpp>
|
| Rtt (uint8_t channel) |
|
void | writeBlocking (uint8_t data) |
|
void | writeBlocking (const uint8_t *data, std::size_t length) |
|
void | flushWriteBuffer () |
|
bool | write (uint8_t data) |
|
std::size_t | write (const uint8_t *data, std::size_t length) |
|
bool | isWriteFinished () |
|
std::size_t | transmitBufferSize () |
|
std::size_t | discardTransmitBuffer () |
|
bool | read (uint8_t &data) |
|
std::size_t | read (uint8_t *data, std::size_t length) |
|
std::size_t | receiveBufferSize () |
|
std::size_t | discardReceiveBuffer () |
|
bool | hasError () |
|
void | clearError () |
|
|
static void | acknowledgeInterruptFlag () |
|
template<uint64_t available, uint64_t requested, percent_t tolerance> |
static void | assertBaudrateInTolerance () |
|
template<double available, double requested, percent_t tolerance> |
static void | assertDurationInTolerance () |
|
static void | configurePurpose () |
| configures a peripheral for a specific purpose
|
|
template<class... Signals> |
static void | connect () |
|
static bool | getInterruptFlag () |
| Read an interrupt flag.
|
|
static void | getParameter () |
| returns a parameter
|
|
template<class SystemClock , baudrate_t baudrate, percent_t tolerance = 10_pct> |
static void | initialize () |
|
static void | setParameter () |
| sets a parameter
|
|
|
static constexpr size_t | RxBufferSize = 16 |
| Size of the receive buffer.
|
|
static constexpr size_t | TxBufferSize = 16 |
| Size of the transmit buffer.
|
|
Real Time Transfer (RTT) Uart Interface
- Author
- Niklas Hauser
static void modm::PeripheralDriver::acknowledgeInterruptFlag |
( |
| ) |
|
|
inheritedstatic |
Acknowledge an interrupt flag.
We use acknowledge here, since it describes the intention rather than the actual implementation.
template<uint64_t available, uint64_t requested, percent_t tolerance>
static void modm::PeripheralDriver::assertBaudrateInTolerance |
( |
| ) |
|
|
inheritedinlinestatic |
Since baudrates are usually generated by prescaling a system clock, only several distinct values can be generated. This method checks if the user requested baudrate is within error tolerance of the system achievable baudrate.
template<class... Signals>
static void modm::Uart::connect |
( |
| ) |
|
|
inheritedstatic |
Connect GPIOs to the peripheral and configure them.
This configures the Tx and Rx signals as output and input and connects them.
- Template Parameters
-
Signals | One Tx and one Rx signal are required and can be passed out-of-order. |
template<class SystemClock , baudrate_t baudrate, percent_t tolerance = 10_pct>
static void modm::Uart::initialize |
( |
| ) |
|
|
inheritedstatic |
Initializes the hardware and sets the baudrate.
- Template Parameters
-
SystemClock | the currently active system clock |
baudrate | desired baud rate in Hz |
tolerance | the allowed absolute tolerance for the resulting baudrate |
The documentation for this class was generated from the following files: