Skip to content

Commit ce6fc14

Browse files
committed
VANTAC_RF007: combine targets
1 parent e14ba5d commit ce6fc14

File tree

3 files changed

+9
-31
lines changed

3 files changed

+9
-31
lines changed
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
target_stm32f722xe(VANTAC_RF007)
2-
target_stm32f722xe(VANTAC_RF007_9SERVOS)
3-
target_stm32f722xe(VANTAC_RF007_NOI2C)

src/main/target/VANTAC_RF007/target.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ timerHardware_t timerHardware[] = {
3636
DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // labelled "RPM", clashes with UART2 TX
3737
DEF_TIM(TIM5, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 0), // labelled "TLM", clashes with UART2 RX
3838

39-
#if defined(VANTAC_RF007_9SERVOS) || defined(VANTAC_RF007_NOI2C)
4039
DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0), // labelled "AUX", clashes with UART1 TX and I2C1 SCL
4140
DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // labelled "SBUS", clashes with UART1 RX and I2C1 SDA
42-
#endif
4341
};
4442

4543
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);

src/main/target/VANTAC_RF007/target.h

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,22 @@
4747
//#define I2C1_SCL PB6
4848
//#define I2C1_SDA PB7
4949

50-
#if defined(VANTAC_RF007) || defined(VANTAC_RF007_9SERVOS)
5150
#define USE_I2C_DEVICE_2 // clashes with UART3
5251
#define I2C2_SCL PB10
5352
#define I2C2_SDA PB11
54-
#define DEFAULT_I2C BUS_I2C2
55-
#else
56-
#define DEFAULT_I2C BUS_I2C1
57-
#endif
53+
#define EXTERNAL_I2C BUS_I2C2
5854

5955
#define USE_BARO
6056
#define BARO_I2C_BUS BUS_I2C1
6157
#define USE_BARO_SPL06
6258
#define SPL06_I2C_ADDR 119
6359

64-
#define TEMPERATURE_I2C_BUS DEFAULT_I2C
60+
#define TEMPERATURE_I2C_BUS EXTERNAL_I2C
6561

66-
#define PITOT_I2C_BUS DEFAULT_I2C
62+
#define PITOT_I2C_BUS EXTERNAL_I2C
6763

6864
#define USE_RANGEFINDER
69-
#define RANGEFINDER_I2C_BUS DEFAULT_I2C
65+
#define RANGEFINDER_I2C_BUS EXTERNAL_I2C
7066

7167
// *************** SPI2 Blackbox *******************
7268
#define USE_SPI_DEVICE_2
@@ -83,22 +79,18 @@
8379
// *************** UART *****************************
8480
#define USE_VCP
8581

86-
#ifdef VANTAC_RF007
8782
#define USE_UART1 // clashes with I2C1
8883
#define UART1_TX_PIN PB6
8984
#define UART1_RX_PIN PB7 // pin labelled "SBUS"
90-
#endif
9185

92-
//#define USE_UART2 // clashes with 2 servo outputs
93-
//#define UART2_TX_PIN PA2 // pin labelled as "RPM"
94-
//#define UART2_RX_PIN PA3 // pin labelled as "TLM"
86+
#define USE_UART2
87+
#define UART2_TX_PIN PA2 // pin labelled as "RPM"
88+
#define UART2_RX_PIN PA3 // pin labelled as "TLM"
9589

96-
#ifdef VANTAC_RF007_NOI2C
97-
#define USE_UART3
90+
#define USE_UART3 // clashes with I2C2
9891
// port labelled "C"
9992
#define UART3_TX_PIN PB10
10093
#define UART3_RX_PIN PB11
101-
#endif
10294

10395
#define USE_UART4
10496
// port labelled "A"
@@ -110,13 +102,7 @@
110102
#define UART5_TX_PIN PC12
111103
#define UART5_RX_PIN PD2
112104

113-
#if defined(VANTAC_RF007)
114-
#define SERIAL_PORT_COUNT 4
115-
#elif defined(VANTAC_RF007_9SERVOS)
116-
#define SERIAL_PORT_COUNT 3
117-
#elif defined(VANTAC_RF007_NOI2C)
118-
#define SERIAL_PORT_COUNT 4
119-
#endif
105+
#define SERIAL_PORT_COUNT 6
120106

121107
#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
122108
#define SERIALRX_PROVIDER SERIALRX_FBUS
@@ -148,11 +134,7 @@
148134
#define TARGET_IO_PORTC 0xffff
149135
#define TARGET_IO_PORTD 0xffff
150136

151-
#if defined(VANTAC_RF007)
152-
#define MAX_PWM_OUTPUT_PORTS 7
153-
#elif defined(VANTAC_RF007_9SERVOS) || defined(VANTAC_RF007_NOI2C)
154137
#define MAX_PWM_OUTPUT_PORTS 9
155-
#endif
156138

157139
#define USE_DSHOT
158140
#define USE_SERIALSHOT

0 commit comments

Comments
 (0)