|
| 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 STM32F7X2 |
| 25 | + |
| 26 | +#define BOARD_NAME BROTHERHOBBYF722 |
| 27 | +#define MANUFACTURER_ID BROT |
| 28 | + |
| 29 | +// LEDS |
| 30 | +#define BEEPER_PIN PC13 |
| 31 | +#define BEEPER_INVERTED |
| 32 | +#define LED_STRIP_PIN PC8 |
| 33 | +//#define LED0_PIN |
| 34 | +#define LED1_PIN PC9 |
| 35 | + |
| 36 | +// MOTORS & SERVOS |
| 37 | +#define MOTOR1_PIN PA15 |
| 38 | +#define MOTOR2_PIN PB3 |
| 39 | +#define MOTOR3_PIN PB4 |
| 40 | +#define MOTOR4_PIN PB5 |
| 41 | + |
| 42 | +#define SERVO1_PIN PB6 |
| 43 | +#define SERVO2_PIN PB7 |
| 44 | +#define SERVO3_PIN PB0 |
| 45 | +#define SERVO4_PIN PB1 |
| 46 | + |
| 47 | +// SPI |
| 48 | +#define SPI1_SCK_PIN PA5 |
| 49 | +#define SPI1_SDI_PIN PA6 |
| 50 | +#define SPI1_SDO_PIN PA7 |
| 51 | + |
| 52 | +#define SPI2_SCK_PIN PB13 |
| 53 | +#define SPI2_SDI_PIN PB14 |
| 54 | +#define SPI2_SDO_PIN PB15 |
| 55 | + |
| 56 | +#define SPI3_SCK_PIN PC10 |
| 57 | +#define SPI3_SDI_PIN PC11 |
| 58 | +#define SPI3_SDO_PIN PB2 |
| 59 | + |
| 60 | +// GYRO & ACC |
| 61 | +#define USE_ACC |
| 62 | +#define USE_GYRO |
| 63 | +#define USE_ACC_SPI_ICM42688P |
| 64 | +#define USE_GYRO_SPI_ICM42688P |
| 65 | +#define DEFAULT_GYRO_TO_USE GYRO_CONFIG_USE_GYRO_BOTH |
| 66 | +#define GYRO_1_EXTI_PIN PC4 |
| 67 | +#define GYRO_1_CS_PIN PA4 |
| 68 | +#define GYRO_1_SPI_INSTANCE SPI1 |
| 69 | +#define GYRO_1_ALIGN CW90_DEG |
| 70 | +#define GYRO_2_EXTI_PIN PC3 |
| 71 | +#define GYRO_2_CS_PIN PA8 |
| 72 | +#define GYRO_2_SPI_INSTANCE SPI1 |
| 73 | +#define GYRO_2_ALIGN CW0_DEG |
| 74 | + |
| 75 | +// OSD |
| 76 | +#define USE_MAX7456 |
| 77 | +#define MAX7456_SPI_CS_PIN PB12 |
| 78 | +#define MAX7456_SPI_INSTANCE SPI2 |
| 79 | + |
| 80 | +// FLASH |
| 81 | +#define USE_FLASH |
| 82 | +#define USE_FLASH_W25N02K |
| 83 | +#define FLASH_SPI_CS_PIN PC14 |
| 84 | +#define FLASH_SPI_INSTANCE SPI3 |
| 85 | +#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH |
| 86 | + |
| 87 | +// BARO & MAG |
| 88 | +// Goertek SPL06-001 uses DPS310 driver |
| 89 | +#define USE_BARO |
| 90 | +#define USE_BARO_DPS310 |
| 91 | +#define I2C1_SCL_PIN PB8 |
| 92 | +#define I2C1_SDA_PIN PB9 |
| 93 | +#define BARO_I2C_INSTANCE I2CDEV_1 |
| 94 | +#define MAG_I2C_INSTANCE I2CDEV_1 |
| 95 | + |
| 96 | +// UART & VCP |
| 97 | +#define UART1_TX_PIN PA9 |
| 98 | +#define UART1_RX_PIN PA10 |
| 99 | + |
| 100 | +#define UART2_TX_PIN PA2 |
| 101 | +#define UART2_RX_PIN PA3 |
| 102 | + |
| 103 | +#define UART3_TX_PIN PB10 |
| 104 | +#define UART3_RX_PIN PB11 |
| 105 | + |
| 106 | +#define UART4_TX_PIN PA0 |
| 107 | +#define UART4_RX_PIN PA1 |
| 108 | + |
| 109 | +#define UART5_TX_PIN PC12 |
| 110 | +#define UART5_RX_PIN PD2 |
| 111 | + |
| 112 | +#define UART6_TX_PIN PC6 |
| 113 | +#define UART6_RX_PIN PC7 |
| 114 | + |
| 115 | +#define USB_DETECT_PIN PA12 |
| 116 | + |
| 117 | +// ADC |
| 118 | +#define ADC_VBAT_PIN PC2 |
| 119 | +#define ADC_RSSI_PIN PC0 |
| 120 | +#define ADC_CURR_PIN PC1 |
| 121 | +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC |
| 122 | +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC |
| 123 | +#define DEFAULT_CURRENT_METER_SCALE 210 |
| 124 | +#define DEFAULT_VOLTAGE_METER_SCALE 110 |
| 125 | + |
| 126 | +// PINIO |
| 127 | +#define PINIO1_PIN PC15 |
| 128 | +#define PINIO1_CONFIG 129 |
| 129 | +#define PINIO1_BOX 40 |
| 130 | +#define BOX_USER1_NAME "VTX PWR" |
| 131 | + |
| 132 | +// TIMERS & DMA |
| 133 | +/* |
| 134 | +LED_STRIP_PIN PC8 1=TIM3_CH3 (C) 2=TIM8_CH3 |
| 135 | +MOTOR1_PIN PA15 1=TIM2_CH1 |
| 136 | +MOTOR2_PIN PB3 1=TIM2_CH2 |
| 137 | +MOTOR3_PIN PB4 1=TIM3_CH1 |
| 138 | +MOTOR4_PIN PB5 1=TIM3_CH2 |
| 139 | +SERVO1_PIN PB6 1=TIM4_CH1 |
| 140 | +SERVO2_PIN PB7 1=TIM4_CH2 |
| 141 | +SERVO3_PIN PB0 2=TIM3_CH3 (C) |
| 142 | +SERVO4_PIN PB1 2=TIM3_CH4 |
| 143 | +*/ |
| 144 | + |
| 145 | +#define TIMER_PIN_MAPPING \ |
| 146 | + TIMER_PIN_MAP( 0, MOTOR1_PIN, 1, 0 ) \ |
| 147 | + TIMER_PIN_MAP( 1, MOTOR2_PIN, 1, 0 ) \ |
| 148 | + TIMER_PIN_MAP( 2, MOTOR3_PIN, 1, 0 ) \ |
| 149 | + TIMER_PIN_MAP( 3, MOTOR4_PIN, 1, 0 ) \ |
| 150 | + TIMER_PIN_MAP( 4, SERVO1_PIN, 1, -1 ) \ |
| 151 | + TIMER_PIN_MAP( 5, SERVO2_PIN, 1, -1 ) \ |
| 152 | + TIMER_PIN_MAP( 6, SERVO3_PIN, 2, -1 ) \ |
| 153 | + TIMER_PIN_MAP( 7, SERVO4_PIN, 2, -1 ) \ |
| 154 | + TIMER_PIN_MAP( 8, LED_STRIP_PIN, 2, 0 ) |
| 155 | + |
| 156 | +#define ADC1_DMA_OPT 0 |
| 157 | + |
| 158 | +#ifdef USE_OSD_HD |
| 159 | +#define MSP_DISPLAYPORT_UART SERIAL_PORT_USART1 |
| 160 | +#endif |
| 161 | + |
| 162 | +#define SERIALRX_UART SERIAL_PORT_USART2 |
| 163 | + |
| 164 | +#ifdef USE_GPS |
| 165 | +#define GPS_UART SERIAL_PORT_USART6 |
| 166 | +#endif |
0 commit comments