Skip to content

Commit 2bbc2d8

Browse files
nessotrinfpistm
andcommitted
fix(c0): missing GPIO_AF0_USART2 for STM32C051xx
See STMicroelectronics/stm32c0xx-hal-driver#4 Signed-off-by: Nessotrin <[email protected]> Co-authored-by: Frederic Pillon <[email protected]>
1 parent 07e97a5 commit 2bbc2d8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

libraries/SrcWrapper/inc/stm32_def.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,14 @@ __STATIC_INLINE void LL_RTC_SetBinMixBCDU(RTC_TypeDef *RTCx, uint32_t BinMixBcdU
222222
#define GPIO_AF1_SPI1 STM_PIN_AFNUM_MASK
223223
#endif
224224

225-
#if defined(STM32C0xx) && defined(USART3) && !defined(GPIO_AF7_USART3)
226-
#define GPIO_AF7_USART3 ((uint8_t)0x07)
227-
#endif // STM32C0xx && !defined(USART3)
225+
#if defined(STM32C0xx)
226+
#if defined(USART3) && !defined(GPIO_AF7_USART3)
227+
#define GPIO_AF7_USART3 ((uint8_t)0x07)
228+
#endif /* USART3 & !GPIO_AF7_USART3*/
229+
#if defined(STM32C051xx) && !defined(GPIO_AF0_USART2)
230+
#define GPIO_AF0_USART2 ((uint8_t)0x00)
231+
#endif
232+
#endif // STM32C0xx
228233

229234
#if defined(STM32WBAxx) && defined(USB_OTG_HS) && !defined(GPIO_AF4_USB_OTG_HS)
230235
#define GPIO_AF4_USB_OTG_HS GPIO_AF4_OTG_HS

0 commit comments

Comments
 (0)