@@ -61,6 +61,13 @@ void boardOff();
|
||||
void init2MhzTimer();
|
||||
void init5msTimer();
|
||||
|
||||
// PCBREV driver
|
||||
enum {
|
||||
// X7
|
||||
PCBREV_X7_STD = 0,
|
||||
PCBREV_X7_40 = 1,
|
||||
};
|
||||
|
||||
// SD driver
|
||||
#define BLOCK_SIZE 512 /* Block Size in Bytes */
|
||||
#if !defined(SIMU) || defined(SIMU_DISKIO)
|
||||
@@ -545,16 +552,11 @@ enum Analogs {
|
||||
#define STICKS_PWM_ENABLED() false
|
||||
#endif
|
||||
|
||||
#if NUM_PWMSTICKS > 0
|
||||
PACK(typedef struct {
|
||||
uint8_t pcbrev:2;
|
||||
uint8_t sticksPwmDisabled:1;
|
||||
uint8_t pxx2Enabled:1;
|
||||
}) HardwareOptions;
|
||||
#else
|
||||
PACK(typedef struct {
|
||||
uint8_t pxx2Enabled:1;
|
||||
}) HardwareOptions;
|
||||
#endif
|
||||
|
||||
extern HardwareOptions hardwareOptions;
|
||||
|
||||
@@ -705,7 +707,7 @@ void telemetryPortInvertedInit(uint32_t baudrate);
|
||||
#if defined(PCBX7ACCESS)
|
||||
#define HAS_SPORT_UPDATE_CONNECTOR() true
|
||||
#elif defined(PCBX7)
|
||||
#define IS_PCBREV_40() (GPIO_ReadInputDataBit(PCBREV_GPIO, PCBREV_GPIO_PIN) == Bit_SET)
|
||||
#define IS_PCBREV_40() (hardwareOptions.pcbrev == PCBREV_X7_40)
|
||||
#define HAS_SPORT_UPDATE_CONNECTOR() IS_PCBREV_40()
|
||||
#elif defined(SPORT_UPDATE_PWR_GPIO)
|
||||
#define HAS_SPORT_UPDATE_CONNECTOR() true
|
||||
|
||||
Reference in New Issue
Block a user