1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 22:35:12 +03:00

EXTMODULE TX and RX are inverted, we have to set them to high so that they cannot give power to the module

This commit is contained in:
Bertrand Songis 2020-11-24 10:10:33 +01:00 committed by 3djc
parent 0677c542d3
commit c1f005a2bc

View file

@ -37,7 +37,8 @@ void extmoduleStop()
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_Init(EXTMODULE_USART_GPIO, &GPIO_InitStructure);
GPIO_ResetBits(EXTMODULE_USART_GPIO, EXTMODULE_TX_GPIO_PIN | EXTMODULE_RX_GPIO_PIN);
// TX and RX are inverted, we set it to HIGH
GPIO_SetBits(EXTMODULE_USART_GPIO, EXTMODULE_TX_GPIO_PIN | EXTMODULE_RX_GPIO_PIN);
#endif
EXTMODULE_TIMER->DIER &= ~(TIM_DIER_CC2IE | TIM_DIER_UDE);