[X7] S.PORT devices update is now done on the bottom connector (#4457)

* [X7] S.PORT devices update is now done on the bottom connector

* [X7] I introduce a PCBREV option, as previous versions didn't have this S.PORT bottom connector

* [X7] Introduce a PCBREV PIN to avoid having different 2 different firmware on X7

* Compilation fix

* [X7] PCBREV PIN was inverted

* [X7] PULL DOWN on PCBREV PIN

* S.PORT bottom connector is powered by PB.02, not PB.01

* [X7] PCBREV resistor changed

* [X7] PCBREV resistor changed
This commit is contained in:
Bertrand Songis
2017-02-21 11:03:37 +01:00
committed by GitHub
parent 2fbd1d8955
commit 24c0f5008d
6 changed files with 88 additions and 5 deletions
+18
View File
@@ -551,6 +551,24 @@
#define TELEMETRY_USART_IRQHandler USART2_IRQHandler
#define TELEMETRY_USART_IRQn USART2_IRQn
// PCBREV
#if defined(PCBX7)
#define PCBREV_RCC_AHB1Periph RCC_AHB1Periph_GPIOA
#define PCBREV_GPIO GPIOA
#define PCBREV_GPIO_PIN GPIO_Pin_14 // PA.14
#else
#define PCBREV_RCC_AHB1Periph 0
#endif
// SPORT update connector
#if defined(PCBX7)
#define SPORT_UPDATE_RCC_AHB1Periph RCC_AHB1Periph_GPIOB
#define SPORT_UPDATE_PWR_GPIO GPIOB
#define SPORT_UPDATE_PWR_GPIO_PIN GPIO_Pin_2 // PB.02
#else
#define SPORT_UPDATE_RCC_AHB1Periph 0
#endif
// Heartbeat
#define HEARTBEAT_RCC_AHB1Periph RCC_AHB1Periph_GPIOC
#define HEARTBEAT_RCC_APB2Periph RCC_APB2Periph_USART6