Mercurial > public > ostc4
changeset 393:879709909dd6 ImproveBluetooth
Configurate FlowCntrl Pins as noPull
author | ideenmodellierer |
---|---|
date | Tue, 26 Nov 2019 21:14:58 +0100 |
parents | b57f497726f7 |
children | 717f335cc5c9 |
files | Discovery/Src/stm32f4xx_hal_msp_hw2.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Src/stm32f4xx_hal_msp_hw2.c Tue Nov 26 18:13:26 2019 +0100 +++ b/Discovery/Src/stm32f4xx_hal_msp_hw2.c Tue Nov 26 21:14:58 2019 +0100 @@ -578,17 +578,19 @@ PA11 ------> USART1_CTS PA12 ------> USART1_RTS */ -#ifdef USARTx_CTS_PIN - GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12; -#else GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10; -#endif GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_PULLUP; GPIO_InitStruct.Speed = GPIO_SPEED_FAST;//GPIO_SPEED_LOW; GPIO_InitStruct.Alternate = GPIO_AF7_USART1; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); +#ifdef USARTx_CTS_PIN /* config control flow pins */ + GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); +#endif + HAL_NVIC_SetPriority(USART1_IRQn, 0, 1); HAL_NVIC_EnableIRQ(USART1_IRQn); }