Skip to content

Commit 8225241

Browse files
michael-cerasulohaslinghuisot0tot
authored
add AEROH7DIGITAL (#900)
* add AEROH7DIGITAL * fix: update timer map, remove ADC2, default voltage meter scale * fix: remove USE_MAG, USE_GPS (user flags) * Apply suggestions from code review remove defaults, fix typos Co-authored-by: Mark Haslinghuis <[email protected]> * Update configs/AEROH7DIGITAL/config.h add conditional define for GPS Co-authored-by: Mark Haslinghuis <[email protected]> * Apply suggestion from @ot0tot Co-authored-by: ot0tot <[email protected]> * Apply suggestion from @ot0tot Co-authored-by: ot0tot <[email protected]> * Apply suggestion from @ot0tot Co-authored-by: ot0tot <[email protected]> * Update configs/AEROH7DIGITAL/config.h * Refactor config.h for improved readability --------- Co-authored-by: Mark Haslinghuis <[email protected]> Co-authored-by: ot0tot <[email protected]>
1 parent 4d8b398 commit 8225241

File tree

1 file changed

+130
-0
lines changed

1 file changed

+130
-0
lines changed

configs/AEROH7DIGITAL/config.h

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
/*
2+
* This file is part of Betaflight.
3+
*
4+
* Betaflight is free software. You can redistribute this software
5+
* and/or modify this software under the terms of the GNU General
6+
* Public License as published by the Free Software Foundation,
7+
* either version 3 of the License, or (at your option) any later
8+
* version.
9+
*
10+
* Betaflight is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13+
*
14+
* See the GNU General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU General Public
17+
* License along with this software.
18+
*
19+
* If not, see <http://www.gnu.org/licenses/>.
20+
*/
21+
22+
#pragma once
23+
24+
#define FC_TARGET_MCU STM32H743
25+
26+
#define BOARD_NAME AEROH7DIGITAL
27+
#define MANUFACTURER_ID AERO
28+
29+
#define USE_ACC
30+
#define USE_ACC_SPI_ICM42688P
31+
#define USE_GYRO
32+
#define USE_GYRO_SPI_ICM42688P
33+
#define USE_GYRO_CLKIN
34+
#define USE_BARO
35+
#define USE_BARO_DPS310
36+
#define USE_SDCARD
37+
38+
#define MOTOR1_PIN PE9
39+
#define MOTOR2_PIN PE11
40+
#define MOTOR3_PIN PE13
41+
#define MOTOR4_PIN PE14
42+
#define MOTOR5_PIN PD12
43+
#define MOTOR6_PIN PD13
44+
#define MOTOR7_PIN PD14
45+
#define MOTOR8_PIN PD15
46+
#define SERVO1_PIN PC6
47+
#define SERVO2_PIN PC7
48+
49+
#define UART2_TX_PIN PA2
50+
#define UART4_TX_PIN PD1
51+
#define UART5_TX_PIN PB13
52+
#define UART8_TX_PIN PE1
53+
#define UART2_RX_PIN PA3
54+
#define UART3_RX_PIN PD9 // ESC TELEMETRY
55+
#define UART4_RX_PIN PD0
56+
#define UART5_RX_PIN PB12
57+
#define UART7_RX_PIN PE7 // SBUS DJI
58+
#define UART8_RX_PIN PE0
59+
60+
#define I2C1_SCL_PIN PB8
61+
#define I2C4_SCL_PIN PB6
62+
#define I2C1_SDA_PIN PB9
63+
#define I2C4_SDA_PIN PB7
64+
65+
#define LED0_PIN PD8
66+
#define LED1_PIN PB14
67+
#define LED2_PIN PB15
68+
69+
#define SPI1_SCK_PIN PA5
70+
#define SPI1_SDI_PIN PA6
71+
#define SPI1_SDO_PIN PA7
72+
73+
#define ADC_VBAT_PIN PA0
74+
#define ADC_CURR_PIN PA1
75+
76+
#define SDIO_CK_PIN PC12
77+
#define SDIO_CMD_PIN PD2
78+
#define SDIO_D0_PIN PC8
79+
#define SDIO_D1_PIN PC9
80+
#define SDIO_D2_PIN PC10
81+
#define SDIO_D3_PIN PC11
82+
83+
#define PINIO1_PIN PE2
84+
85+
#define GYRO_1_EXTI_PIN PB1
86+
#define GYRO_1_CS_PIN PB0
87+
#define GYRO_1_CLKIN_PIN PE5
88+
89+
#define TIMER_PIN_MAPPING \
90+
TIMER_PIN_MAP( 0, PE9 , 1, 0) /* TIM1_CH1 */ \
91+
TIMER_PIN_MAP( 1, PE11, 1, 1) /* TIM1_CH2 */ \
92+
TIMER_PIN_MAP( 2, PE13, 1, 2) /* TIM1_CH3 */ \
93+
TIMER_PIN_MAP( 3, PE14, 1, 3) /* TIM1_CH4 */ \
94+
TIMER_PIN_MAP( 4, PD12, 1, 4) /* TIM4_CH1 */ \
95+
TIMER_PIN_MAP( 5, PD13, 1, 5) /* TIM4_CH2 */ \
96+
TIMER_PIN_MAP( 6, PD14, 1, 6) /* TIM4_CH3 */ \
97+
TIMER_PIN_MAP( 7, PD15, 1, -1) /* TIM4_CH4 NO DMA */ \
98+
TIMER_PIN_MAP( 8, PC6 , 1, -1) /* TIM3_CH1 */ \
99+
TIMER_PIN_MAP( 9, PC7 , 1, -1) /* TIM3_CH2 */ \
100+
TIMER_PIN_MAP(10, PE5 , 1, -1) /* TIM15_CH1 */
101+
102+
#define ADC1_DMA_OPT 8
103+
#define ADC3_DMA_OPT 9
104+
105+
#define BARO_I2C_INSTANCE I2CDEV_1
106+
#define MAG_I2C_INSTANCE I2CDEV_4
107+
108+
#define SERIALRX_UART SERIAL_PORT_UART4
109+
#ifdef USE_GPS
110+
#define GPS_UART SERIAL_PORT_UART8
111+
#endif
112+
#define MSP_DISPLAYPORT_UART SERIAL_PORT_USART2
113+
#define ESC_SENSOR_UART SERIAL_PORT_USART3
114+
115+
#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD
116+
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
117+
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
118+
#define DEFAULT_DSHOT_BITBANG DSHOT_BITBANG_ON
119+
120+
#define SYSTEM_HSE_MHZ 16
121+
122+
#define SDIO_DEVICE SDIODEV_1
123+
#define SDIO_USE_4BIT 1
124+
125+
#define PINIO1_BOX 40
126+
#define PINIO1_CONFIG 129
127+
#define BOX_USER1_NAME "10V BEC"
128+
129+
#define GYRO_1_SPI_INSTANCE SPI1
130+
#define GYRO_1_ALIGN CW90_DEG

0 commit comments

Comments
 (0)