[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
+16
View File
@@ -487,6 +487,22 @@ void sportSendBuffer(uint8_t * buffer, uint32_t count);
uint8_t telemetryGetByte(uint8_t * byte);
extern uint32_t telemetryErrors;
// PCBREV driver
#if defined(PCBX7)
#define IS_PCBREV_40() (GPIO_ReadInputDataBit(PCBREV_GPIO, PCBREV_GPIO_PIN) == Bit_SET)
#endif
// Sport update driver
#if defined(PCBX7)
void sportUpdatePowerOn(void);
void sportUpdatePowerOff(void);
#define SPORT_UPDATE_POWER_ON() sportUpdatePowerOn()
#define SPORT_UPDATE_POWER_OFF() sportUpdatePowerOff()
#else
#define SPORT_UPDATE_POWER_ON() EXTERNAL_MODULE_ON()
#define SPORT_UPDATE_POWER_OFF() EXTERNAL_MODULE_OFF()
#endif
// Audio driver
void audioInit(void) ;
void audioEnd(void) ;