#include <modm/platform/uart/uart_hal_4.hpp>
|
enum | Parity : uint32_t { Even = 0,
Odd = 1,
Disabled = 2
} |
|
enum | RxPinout : uint8_t { RxPad0 = 0,
RxPad1 = 1,
RxPad2 = 2,
RxPad3 = 3
} |
|
enum | TxPinout : uint8_t { TxPad0_XckPad1 = 0,
TxPad2_XckPad3 = 1,
TxPad0_RtsTePad2_CtsPad3 = 2
} |
|
|
static void | enable () |
| Enables the hw module.
|
|
static void | disable () |
| Disables the hw module.
|
|
static void | reset () |
| RResets the hw module.
|
|
template<class SystemClock , baudrate_t baudrate, percent_t tolerance = pct(1)> |
static void | initialize (Parity parity=Parity::Disabled) |
|
static void | write (uint8_t data) |
| Write a single byte to the transmit register. More...
|
|
static void | read (uint8_t &data) |
|
static void | setTransmitterEnable (const bool enable) |
| Enable/Disable Transmitter.
|
|
static void | setReceiverEnable (bool enable) |
| Enable/Disable Receiver.
|
|
static void | enableOperation () |
| Set the UE (USART enable) bit.
|
|
static void | disableOperation () |
| Clear the UE (USART enable) bit.
|
|
static bool | isReceiveRegisterNotEmpty () |
| Returns true if data has been received.
|
|
static bool | isTransmitRegisterEmpty () |
| Returns true if data can be written.
|
|
static void | setRxPinout (RxPinout rxPinout) |
| Configure mapping between rx pin functions and IO pads.
|
|
static void | setTxPinout (TxPinout txPinout) |
| Configure mapping between tx pin functions and IO pads.
|
|
Universal asynchronous receiver transmitter (UartHal4)
Very basic implementation that exposes more hardware features than the regular Usart classes.
- Author
- Erik Henriksson
template<class SystemClock , baudrate_t baudrate, percent_t tolerance = pct(1)>
static void modm::platform::UartHal4::initialize |
( |
Parity |
parity = Parity::Disabled | ) |
|
|
static |
Initialize Uart HAL Peripheral
Enables clocks, the UART peripheral (but neither TX nor RX) Sets baudrate and parity.
static void modm::platform::UartHal4::read |
( |
uint8_t & |
data | ) |
|
|
inlinestatic |
Saves the value of the receive register to data
- Warning
- This method does NOT do any sanity checks!! It is your responsibility to check if the register contains something useful!
static void modm::platform::UartHal4::write |
( |
uint8_t |
data | ) |
|
|
inlinestatic |
Write a single byte to the transmit register.
- Warning
- This method does NOT do any sanity checks!! It is your responsibility to check if the register is empty!
The documentation for this class was generated from the following file: