Skip to content

Commit

Permalink
Add definition of ChipUartLowLevel::lpuart2Parameters for STM32G0
Browse files Browse the repository at this point in the history
  • Loading branch information
KamilSzczygiel committed Apr 12, 2024
1 parent 4451ce7 commit c5cc9a8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,11 @@ const ChipUartLowLevel::Parameters ChipUartLowLevel::lpuart1Parameters {LPUART1_
#endif
#endif // def DISTORTOS_CHIP_LPUART1_ENABLE

#ifdef DISTORTOS_CHIP_LPUART2_ENABLE
const ChipUartLowLevel::Parameters ChipUartLowLevel::lpuart2Parameters {LPUART2_BASE, offsetof(RCC_TypeDef, APBENR1),
RCC_APBENR1_LPUART2EN, offsetof(RCC_TypeDef, APBRSTR1), RCC_APBRSTR1_LPUART2RST};
#endif // def DISTORTOS_CHIP_LPUART2_ENABLE

#ifdef DISTORTOS_CHIP_USART1_ENABLE
#if defined(RCC_APB2ENR_USART1EN)
const ChipUartLowLevel::Parameters ChipUartLowLevel::usart1Parameters {USART1_BASE, offsetof(RCC_TypeDef, APB2ENR),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* \file
* \brief ChipUartLowLevel class header for USARTv2 in STM32
*
* \author Copyright (C) 2016-2022 Kamil Szczygiel https://distortec.com https://freddiechopin.info
* \author Copyright (C) 2016-2024 Kamil Szczygiel https://distortec.com https://freddiechopin.info
*
* \par License
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
Expand Down Expand Up @@ -51,6 +51,13 @@ class ChipUartLowLevel : public devices::UartLowLevel

#endif // def DISTORTOS_CHIP_LPUART1_ENABLE

#ifdef DISTORTOS_CHIP_LPUART2_ENABLE

/// parameters for construction of UART low-level driver for LPUART2
static const Parameters lpuart2Parameters;

#endif // def DISTORTOS_CHIP_LPUART1_ENABLE

#ifdef DISTORTOS_CHIP_USART1_ENABLE

/// parameters for construction of UART low-level driver for USART1
Expand Down

0 comments on commit c5cc9a8

Please sign in to comment.