Mercurial > public > ostc4
comparison Discovery/Src/stm32f4xx_hal_msp_hw2.c @ 393:879709909dd6 ImproveBluetooth
Configurate FlowCntrl Pins as noPull
author | ideenmodellierer |
---|---|
date | Tue, 26 Nov 2019 21:14:58 +0100 |
parents | b7689d9e888a |
children |
comparison
equal
deleted
inserted
replaced
392:b57f497726f7 | 393:879709909dd6 |
---|---|
576 PA9 ------> USART1_TX | 576 PA9 ------> USART1_TX |
577 PA10 ------> USART1_RX | 577 PA10 ------> USART1_RX |
578 PA11 ------> USART1_CTS | 578 PA11 ------> USART1_CTS |
579 PA12 ------> USART1_RTS | 579 PA12 ------> USART1_RTS |
580 */ | 580 */ |
581 #ifdef USARTx_CTS_PIN | |
582 GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12; | |
583 #else | |
584 GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10; | 581 GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10; |
585 #endif | |
586 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; | 582 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; |
587 GPIO_InitStruct.Pull = GPIO_PULLUP; | 583 GPIO_InitStruct.Pull = GPIO_PULLUP; |
588 GPIO_InitStruct.Speed = GPIO_SPEED_FAST;//GPIO_SPEED_LOW; | 584 GPIO_InitStruct.Speed = GPIO_SPEED_FAST;//GPIO_SPEED_LOW; |
589 GPIO_InitStruct.Alternate = GPIO_AF7_USART1; | 585 GPIO_InitStruct.Alternate = GPIO_AF7_USART1; |
590 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); | 586 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); |
587 | |
588 #ifdef USARTx_CTS_PIN /* config control flow pins */ | |
589 GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12; | |
590 GPIO_InitStruct.Pull = GPIO_NOPULL; | |
591 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); | |
592 #endif | |
591 | 593 |
592 HAL_NVIC_SetPriority(USART1_IRQn, 0, 1); | 594 HAL_NVIC_SetPriority(USART1_IRQn, 0, 1); |
593 HAL_NVIC_EnableIRQ(USART1_IRQn); | 595 HAL_NVIC_EnableIRQ(USART1_IRQn); |
594 } | 596 } |
595 #ifdef USART_IR_HUD | 597 #ifdef USART_IR_HUD |