parameters for construction of UART low-level drivers
More...
parameters for construction of UART low-level drivers
◆ Parameters()
constexpr distortos::chip::ChipUartLowLevel::Parameters::Parameters |
( |
const uintptr_t |
uartBase, |
|
|
const uintptr_t |
rccEnBbAddress, |
|
|
const uintptr_t |
rccRstBbAddress |
|
) |
| |
|
inline |
Parameters's constructor.
- Parameters
-
[in] | uartBase | is a base address of UART peripheral |
[in] | rccEnBb | is an address of bitband alias of appropriate U[S]ARTxEN bit in RCC register |
[in] | rccRstBb | is an address of bitband alias of appropriate U[S]ARTxRST bit in RCC register |
◆ enablePeripheralClock()
void distortos::chip::ChipUartLowLevel::Parameters::enablePeripheralClock |
( |
const bool |
enable | ) |
const |
|
inline |
Enables or disables peripheral clock in RCC.
- Parameters
-
[in] | enable | selects whether the clock will be enabled (true) or disabled (false) |
◆ enableRxneInterrupt()
void distortos::chip::ChipUartLowLevel::Parameters::enableRxneInterrupt |
( |
const bool |
enable | ) |
const |
|
inline |
Enables or disables RXNE interrupt of UART.
- Parameters
-
[in] | enable | selects whether the interrupt will be enabled (true) or disabled (false) |
◆ enableTcInterrupt()
void distortos::chip::ChipUartLowLevel::Parameters::enableTcInterrupt |
( |
const bool |
enable | ) |
const |
|
inline |
Enables or disables TC interrupt of UART.
- Parameters
-
[in] | enable | selects whether the interrupt will be enabled (true) or disabled (false) |
◆ enableTxeInterrupt()
void distortos::chip::ChipUartLowLevel::Parameters::enableTxeInterrupt |
( |
const bool |
enable | ) |
const |
|
inline |
Enables or disables TXE interrupt of UART.
- Parameters
-
[in] | enable | selects whether the interrupt will be enabled (true) or disabled (false) |
◆ getCharacterLength()
uint8_t distortos::chip::ChipUartLowLevel::Parameters::getCharacterLength |
( |
| ) |
const |
|
inline |
- Returns
- character length, bits
◆ getPeripheralFrequency()
uint32_t distortos::chip::ChipUartLowLevel::Parameters::getPeripheralFrequency |
( |
| ) |
const |
|
inline |
- Returns
- peripheral clock frequency, Hz
◆ getUart()
USART_TypeDef& distortos::chip::ChipUartLowLevel::Parameters::getUart |
( |
| ) |
const |
|
inline |
- Returns
- reference to USART_TypeDef object
◆ resetPeripheral()
void distortos::chip::ChipUartLowLevel::Parameters::resetPeripheral |
( |
| ) |
const |
|
inline |
Resets all peripheral's registers via RCC.
- Note
- Peripheral clock must be enabled in RCC for this operation to work.
◆ peripheralFrequency_
uint32_t distortos::chip::ChipUartLowLevel::Parameters::peripheralFrequency_ |
|
private |
peripheral clock frequency, Hz
◆ rccEnBbAddress_
uintptr_t distortos::chip::ChipUartLowLevel::Parameters::rccEnBbAddress_ |
|
private |
address of bitband alias of appropriate U[S]ARTxEN bit in RCC register
◆ rccRstBbAddress_
uintptr_t distortos::chip::ChipUartLowLevel::Parameters::rccRstBbAddress_ |
|
private |
address of bitband alias of appropriate U[S]ARTxRST bit in RCC register
◆ rxneieBbAddress_
uintptr_t distortos::chip::ChipUartLowLevel::Parameters::rxneieBbAddress_ |
|
private |
address of bitband alias of RXNEIE bit in USART_CR1 register
◆ tcieBbAddress_
uintptr_t distortos::chip::ChipUartLowLevel::Parameters::tcieBbAddress_ |
|
private |
address of bitband alias of TCIE bit in USART_CR1 register
◆ txeieBbAddress_
uintptr_t distortos::chip::ChipUartLowLevel::Parameters::txeieBbAddress_ |
|
private |
address of bitband alias of TXEIE bit in USART_CR1 register
◆ uartBase_
uintptr_t distortos::chip::ChipUartLowLevel::Parameters::uartBase_ |
|
private |
base address of UART peripheral
The documentation for this class was generated from the following file: