modm API documentation
modm::platform::UartBase Class Reference

#include <modm/platform/uart/uart_base.hpp>

Inheritance diagram for modm::platform::UartBase:
modm::platform::BufferedUart< Hal, Buffers > modm::platform::LpuartHal1 modm::platform::UartHal4 modm::platform::UartHal5 modm::platform::UartSpiMaster1 modm::platform::UartSpiMaster2 modm::platform::UartSpiMaster3 modm::platform::UsartHal1 modm::platform::UsartHal2 modm::platform::UsartHal3

Public Types

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  Parity : uint32_t { Disabled = 0, Even = USART_CR1_PCE, Odd = USART_CR1_PCE | USART_CR1_PS }
 
enum  WordLength : uint32_t { Bit8 = 0, Bit9 = USART_CR1_M }
 
enum  SpiClock : uint32_t { Disabled = 0b0, Enabled = USART_CR2_CLKEN }
 
enum  LastBitClockPulse : uint32_t { DoNotOutput = 0b0, Output = USART_CR2_LBCL }
 
enum  SpiDataMode : uint32_t { Mode0 = 0b00, Mode1 = USART_CR2_CPHA, Mode2 = USART_CR2_CPOL, Mode3 = USART_CR2_CPOL | USART_CR2_CPHA }
 

Public Member Functions

 MODM_FLAGS32 (Interrupt)
 
 MODM_FLAGS32 (InterruptFlag)
 

Detailed Description

Base class for the UART classes

Provides some common enum that do not depend on the specific UART.

Author
Kevin Laeufer

Member Enumeration Documentation

enum modm::platform::UartBase::Interrupt : uint32_t
strong
Enum ValuesDocumentation
CharacterMatch 

A USART interrupt is generated when match character is received.

ParityError 

Call interrupt when a parity error occurred.

TxEmpty 

Call interrupt when transmit register is empty (i.e. the byte has been transfered to the shift out register.

TxComplete 

Called when the byte was completely transmitted.

RxNotEmpty 

Call interrupt when char received (RXNE) or overrun occurred (ORE)

Enum ValuesDocumentation
CharacterMatch 

Set if match character is received.

TxEmpty 

Set if the transmit data register is empty.

TxComplete 

Set if the transmission is complete.

RxNotEmpty 

Set if the receive data register is not empty.

OverrunError 

Set if receive register was not cleared.

FramingError 

Set if a de-synchronization, excessive noise or a break character is detected.

ParityError 

Set if a parity error was detected.


The documentation for this class was generated from the following file: