|
| 1 | +/* |
| 2 | + * This file is part of Cleanflight. |
| 3 | + * |
| 4 | + * Cleanflight is free software: you can redistribute it and/or modify |
| 5 | + * it under the terms of the GNU General Public License as published by |
| 6 | + * the Free Software Foundation, either version 3 of the License, or |
| 7 | + * (at your option) any later version. |
| 8 | + * |
| 9 | + * Cleanflight is distributed in the hope that it will be useful, |
| 10 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | + * GNU General Public License for more details. |
| 13 | + * |
| 14 | + * You should have received a copy of the GNU General Public License |
| 15 | + * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>. |
| 16 | + */ |
| 17 | + |
| 18 | +#pragma once |
| 19 | + |
| 20 | +#define TARGET_BOARD_IDENTIFIER "X743" |
| 21 | + |
| 22 | +#define USBD_PRODUCT_STRING "AP-H743v2" |
| 23 | + |
| 24 | +// *************** LED ********************** |
| 25 | +#define LED0 PD15 |
| 26 | +#define LED1 PD11 |
| 27 | +#define LED2 PB15 |
| 28 | + |
| 29 | +// *************** SPI: Gyro & ACC & OSD ********************** |
| 30 | +#define USE_SPI |
| 31 | +#define USE_SPI_DEVICE_1 |
| 32 | +#define USE_SPI_DEVICE_3 |
| 33 | +#define USE_SPI_DEVICE_4 |
| 34 | + |
| 35 | +#define SPI1_SCK_PIN PA5 |
| 36 | +#define SPI1_MISO_PIN PA6 |
| 37 | +#define SPI1_MOSI_PIN PA7 |
| 38 | + |
| 39 | +#define SPI3_SCK_PIN PB3 |
| 40 | +#define SPI3_MISO_PIN PB4 |
| 41 | +#define SPI3_MOSI_PIN PB2 |
| 42 | + |
| 43 | +#define SPI4_SCK_PIN PE2 |
| 44 | +#define SPI4_MISO_PIN PE5 |
| 45 | +#define SPI4_MOSI_PIN PE6 |
| 46 | + |
| 47 | +// #define USE_IMU_ICM42605 |
| 48 | +// #define IMU_ICM42605_ALIGN CW0_DEG |
| 49 | +// #define ICM42605_SPI_BUS BUS_SPI4 |
| 50 | +// #define ICM42605_CS_PIN PC13 |
| 51 | + |
| 52 | +#define USE_IMU_BMI088 |
| 53 | +#define IMU_BMI088_ALIGN CW90_DEG |
| 54 | +#define BMI088_SPI_BUS BUS_SPI1 |
| 55 | +#define BMI088_GYRO_CS_PIN PA3 |
| 56 | +#define BMI088_ACC_CS_PIN PA2 |
| 57 | + |
| 58 | +#define USE_MAX7456 |
| 59 | +#define MAX7456_SPI_BUS BUS_SPI3 |
| 60 | +#define MAX7456_CS_PIN PA15 |
| 61 | + |
| 62 | +// *************** UART ***************************** |
| 63 | +#define USE_VCP |
| 64 | + |
| 65 | +#define USE_UART1 |
| 66 | +#define UART1_RX_PIN PA10 |
| 67 | +#define UART1_TX_PIN PA9 |
| 68 | + |
| 69 | +#define USE_UART2 |
| 70 | +#define UART2_RX_PIN PD6 |
| 71 | +#define UART2_TX_PIN PD5 |
| 72 | + |
| 73 | +#define USE_UART3 |
| 74 | +#define UART3_RX_PIN PD9 |
| 75 | +#define UART3_TX_PIN PD8 |
| 76 | + |
| 77 | +#define USE_UART4 |
| 78 | +#define UART4_RX_PIN PB9 |
| 79 | +#define UART4_TX_PIN PB8 |
| 80 | + |
| 81 | +#define USE_UART5 |
| 82 | +#define UART5_RX_PIN PB12 |
| 83 | +#define UART5_TX_PIN PB13 |
| 84 | +#define INVERTER_PIN_UART5_RX PD14 |
| 85 | + |
| 86 | +#define USE_UART6 |
| 87 | +#define UART6_RX_PIN PC7 |
| 88 | +#define UART6_TX_PIN PC6 |
| 89 | + |
| 90 | +#define USE_UART7 |
| 91 | +#define UART7_TX_PIN PE8 |
| 92 | +#define UART7_RX_PIN PE7 |
| 93 | + |
| 94 | +#define USE_UART8 |
| 95 | +#define UART8_RX_PIN PE0 |
| 96 | +#define UART8_TX_PIN PE1 |
| 97 | + |
| 98 | +#define SERIAL_PORT_COUNT 9 //VCP, UART1, UART2, UART3, UART4, UART5, UART6, UART7, UART8 |
| 99 | + |
| 100 | +#define DEFAULT_RX_TYPE RX_TYPE_SERIAL |
| 101 | +#define SERIALRX_PROVIDER SERIALRX_SBUS |
| 102 | +#define SERIALRX_UART SERIAL_PORT_USART5 |
| 103 | + |
| 104 | +// *************** I2C: BARO & MAG **************************** |
| 105 | +#define USE_I2C |
| 106 | +#define USE_I2C_DEVICE_1 |
| 107 | +#define USE_I2C_DEVICE_4 |
| 108 | +#define I2C1_SCL PB6 |
| 109 | +#define I2C1_SDA PB7 |
| 110 | +#define I2C4_SCL PD12 |
| 111 | +#define I2C4_SDA PD13 |
| 112 | + |
| 113 | +#define USE_BARO |
| 114 | +#define USE_BARO_ALL |
| 115 | +#define BARO_I2C_BUS BUS_I2C1 |
| 116 | + |
| 117 | +#define USE_MAG |
| 118 | +#define MAG_I2C_BUS BUS_I2C1 |
| 119 | +#define USE_MAG_ALL |
| 120 | + |
| 121 | +#define TEMPERATURE_I2C_BUS BUS_I2C4 |
| 122 | +#define PITOT_I2C_BUS BUS_I2C4 |
| 123 | + |
| 124 | +// *************** ENABLE OPTICAL FLOW & RANGEFINDER ***************************** |
| 125 | +#define USE_RANGEFINDER |
| 126 | +#define USE_RANGEFINDER_MSP |
| 127 | +#define USE_OPFLOW |
| 128 | +#define USE_OPFLOW_MSP |
| 129 | + |
| 130 | +// *************** SDIO SD BLACKBOX******************* |
| 131 | +#define USE_SDCARD |
| 132 | +#define USE_SDCARD_SDIO |
| 133 | +#define SDCARD_SDIO_DEVICE SDIODEV_1 |
| 134 | +#define SDCARD_SDIO_4BIT |
| 135 | +#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT |
| 136 | + |
| 137 | +// *************** ADC ***************************** |
| 138 | +#define USE_ADC |
| 139 | +#define ADC_INSTANCE ADC1 |
| 140 | +#define ADC_CHANNEL_4_PIN PC4 |
| 141 | +#define ADC_CHANNEL_5_PIN PC5 |
| 142 | +#define VBAT_ADC_CHANNEL ADC_CHN_4 |
| 143 | +#define CURRENT_METER_ADC_CHANNEL ADC_CHN_5 |
| 144 | +#define VBAT_SCALE_DEFAULT 1010 |
| 145 | +#define CURRENT_METER_SCALE 402 |
| 146 | + |
| 147 | +#define DEFAULT_FEATURES (FEATURE_VBAT | FEATURE_CURRENT_METER | FEATURE_OSD | FEATURE_TELEMETRY) |
| 148 | + |
| 149 | +#define USE_DSHOT |
| 150 | +#define USE_ESC_SENSOR |
| 151 | +#define USE_SERIAL_4WAY_BLHELI_INTERFACE |
| 152 | + |
| 153 | +#define TARGET_IO_PORTA 0xffff |
| 154 | +#define TARGET_IO_PORTB 0xffff |
| 155 | +#define TARGET_IO_PORTC 0xffff |
| 156 | +#define TARGET_IO_PORTD 0xffff |
| 157 | +#define TARGET_IO_PORTE 0xffff |
| 158 | + |
| 159 | +#define MAX_PWM_OUTPUT_PORTS 8 |
0 commit comments