|
enum | Interrupt : uint32_t {
Interrupt::CharacterMatch = USART_CR1_CMIE,
Interrupt::ParityError = USART_CR1_PEIE,
Interrupt::TxEmpty = USART_CR1_TXEIE,
Interrupt::TxComplete = USART_CR1_TCIE,
Interrupt::RxNotEmpty = USART_CR1_RXNEIE
} |
|
enum | InterruptFlag : uint32_t {
InterruptFlag::CharacterMatch = USART_ISR_CMF,
InterruptFlag::TxEmpty = USART_ISR_TXE,
InterruptFlag::TxComplete = USART_ISR_TC,
InterruptFlag::RxNotEmpty = USART_ISR_RXNE,
InterruptFlag::OverrunError = USART_ISR_ORE,
InterruptFlag::FramingError = USART_ISR_FE,
InterruptFlag::ParityError = USART_ISR_PE
} |
|
enum | LastBitClockPulse : uint32_t { DoNotOutput = 0b0,
Output = USART_CR2_LBCL
} |
|
enum | Parity : uint32_t { Disabled = 0,
Even = USART_CR1_PCE,
Odd = USART_CR1_PCE | USART_CR1_PS
} |
|
enum | SpiClock : uint32_t { Disabled = 0b0,
Enabled = USART_CR2_CLKEN
} |
|
enum | SpiDataMode : uint32_t { Mode0 = 0b00,
Mode1 = USART_CR2_CPHA,
Mode2 = USART_CR2_CPOL,
Mode3 = USART_CR2_CPOL | USART_CR2_CPHA
} |
|
enum | WordLength : uint32_t { Bit8 = 0,
Bit9 = USART_CR1_M
} |
|
|
static void | enable () |
|
static void | disable () |
| Disables the hw module (by disabling its clock line)
|
|
static void | enableOperation () |
| Set the UE (USART enable) bit.
|
|
static void | disableOperation () |
| Clear the UE (USART enable) bit.
|
|
template<class SystemClock , baudrate_t baudrate, percent_t tolerance> |
static void | initialize (Parity parity, WordLength length) |
|
static void | setSpiClock (SpiClock clk, LastBitClockPulse pulse) |
|
static void | setSpiDataMode (SpiDataMode mode) |
|
static void | write (uint16_t data) |
| Write a single byte to the transmit register. More...
|
|
static void | read (uint8_t &data) |
|
static void | read (uint16_t &data) |
|
static void | setTransmitterEnable (bool enable) |
|
static void | setReceiverEnable (bool enable) |
|
static bool | isReceiveRegisterNotEmpty () |
| Returns true if data has been received.
|
|
static bool | isTransmitRegisterEmpty () |
| Returns true if data can be written.
|
|
static bool | isTransmissionComplete () |
| Returns true if the transmission of a frame containing data is complete.
|
|
static void | enableInterruptVector (bool enable, uint32_t priority) |
|
static void | enableInterrupt (Interrupt_t interrupt) |
|
static void | disableInterrupt (Interrupt_t interrupt) |
|
static void | setInterruptPriority (uint32_t priority) |
|
static InterruptFlag_t | getInterruptFlags () |
|
static void | acknowledgeInterruptFlags (InterruptFlag_t flags) |
|
Universal asynchronous receiver transmitter (UsartHal3)
Not available on the low- and medium density devices.
Very basic implementation that exposes more hardware features than the regular Usart classes.
- Author
- Kevin Laeufer