|
| 1 | +/* |
| 2 | + * This file is part of Cleanflight and Betaflight. |
| 3 | + * |
| 4 | + * Cleanflight and Betaflight are free software. You can redistribute |
| 5 | + * this software and/or modify this software under the terms of the |
| 6 | + * GNU General Public License as published by the Free Software |
| 7 | + * Foundation, either version 3 of the License, or (at your option) |
| 8 | + * any later version. |
| 9 | + * |
| 10 | + * Cleanflight and Betaflight are distributed in the hope that they |
| 11 | + * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
| 12 | + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 | + * See the GNU General Public License for more details. |
| 14 | + * |
| 15 | + * You should have received a copy of the GNU General Public License |
| 16 | + * along with this software. |
| 17 | + * |
| 18 | + * If not, see <http://www.gnu.org/licenses/>. |
| 19 | + */ |
| 20 | + |
| 21 | +#pragma once |
| 22 | + |
| 23 | +#define TARGET_BOARD_IDENTIFIER "RALI" |
| 24 | +#define USBD_PRODUCT_STRING "RADIOLINKF722" |
| 25 | + |
| 26 | +#define LED0 PA14 |
| 27 | + |
| 28 | +#define USE_BEEPER |
| 29 | +#define BEEPER PC13 |
| 30 | +#define BEEPER_INVERTED |
| 31 | + |
| 32 | +// *************** UART ***************************** |
| 33 | +#define USB_IO |
| 34 | +#define USE_VCP |
| 35 | +// #define VBUS_SENSING_PIN PC15 |
| 36 | +// #define VBUS_SENSING_ENABLED |
| 37 | + |
| 38 | +#define USE_PINIO |
| 39 | +#define USE_PINIOBOX |
| 40 | +#define PINIO1_PIN PC9 |
| 41 | +#define PINIO1_FLAGS PINIO_FLAGS_INVERTED |
| 42 | + |
| 43 | +#define USE_UART1 |
| 44 | +#define UART1_RX_PIN PA10 |
| 45 | +#define UART1_TX_PIN PA9 |
| 46 | + |
| 47 | +#define USE_UART2 |
| 48 | +#define UART2_RX_PIN PA3 |
| 49 | +#define UART2_TX_PIN PA2 |
| 50 | + |
| 51 | +#define USE_UART3 |
| 52 | +#define UART3_RX_PIN PB11 |
| 53 | +#define UART3_TX_PIN PB10 |
| 54 | + |
| 55 | +#define USE_UART4 |
| 56 | +#define UART4_RX_PIN PA1 |
| 57 | +#define UART4_TX_PIN NONE |
| 58 | + |
| 59 | +#define USE_UART6 |
| 60 | +#define UART6_RX_PIN PC7 |
| 61 | +#define UART6_TX_PIN PC6 |
| 62 | + |
| 63 | +#define SERIAL_PORT_COUNT 6 |
| 64 | + |
| 65 | +// *************** Gyro & ACC ********************** |
| 66 | +#define USE_TARGET_IMU_HARDWARE_DESCRIPTORS |
| 67 | + |
| 68 | +#define USE_SPI |
| 69 | +#define USE_SPI_DEVICE_1 |
| 70 | +#define SPI1_SCK_PIN PA5 |
| 71 | +#define SPI1_MISO_PIN PA6 |
| 72 | +#define SPI1_MOSI_PIN PA7 |
| 73 | + |
| 74 | +// ICM42605/ICM42688P |
| 75 | +#define USE_IMU_ICM42605 |
| 76 | +#define IMU_ICM42605_ALIGN CW180_DEG |
| 77 | +#define ICM42688_SPI_BUS BUS_SPI1 |
| 78 | +#define ICM42688_CS_PIN PB2 |
| 79 | + |
| 80 | +//BMI270 |
| 81 | +#define USE_IMU_BMI270 |
| 82 | +#define IMU_BMI270_ALIGN CW180_DEG |
| 83 | +#define BMI270_SPI_BUS BUS_SPI1 |
| 84 | +#define BMI270_CS_PIN PB2 |
| 85 | + |
| 86 | +// *************** I2C(Baro & I2C) ************************** |
| 87 | +#define USE_I2C |
| 88 | + |
| 89 | +#define USE_I2C_DEVICE_1 |
| 90 | +#define I2C1_SCL PB8 |
| 91 | +#define I2C1_SDA PB9 |
| 92 | + |
| 93 | +// Baro |
| 94 | +#define USE_BARO |
| 95 | +#define USE_BARO_BMP280 |
| 96 | +#define USE_BARO_MS5611 |
| 97 | +#define USE_BARO_DPS310 |
| 98 | +#define USE_BARO_SPL06 |
| 99 | +#define BARO_I2C_BUS BUS_I2C1 |
| 100 | + |
| 101 | +// Mag |
| 102 | +#define USE_MAG |
| 103 | +#define MAG_I2C_BUS BUS_I2C1 |
| 104 | +#define USE_MAG_ALL |
| 105 | + |
| 106 | +// *************** FLASH ************************** |
| 107 | + |
| 108 | +#define USE_SPI_DEVICE_3 |
| 109 | +#define SPI3_SCK_PIN PC10 |
| 110 | +#define SPI3_MISO_PIN PC11 |
| 111 | +#define SPI3_MOSI_PIN PC12 |
| 112 | + |
| 113 | +#define W25N01G_SPI_BUS BUS_SPI3 |
| 114 | +#define W25N01G_CS_PIN PD2 |
| 115 | + |
| 116 | +#define USE_BLACKBOX |
| 117 | +#define USE_FLASHFS |
| 118 | +#define USE_FLASH_W25N01G |
| 119 | +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT |
| 120 | + |
| 121 | +// *************** OSD ***************************** |
| 122 | +#define USE_OSD |
| 123 | +#define USE_SPI_DEVICE_2 |
| 124 | +#define SPI2_SCK_PIN PB13 |
| 125 | +#define SPI2_MISO_PIN PB14 |
| 126 | +#define SPI2_MOSI_PIN PB15 |
| 127 | + |
| 128 | +#define USE_MAX7456 |
| 129 | +#define MAX7456_SPI_BUS BUS_SPI2 |
| 130 | +#define MAX7456_CS_PIN PB12 |
| 131 | + |
| 132 | +// *************** ADC ***************************** |
| 133 | +#define USE_ADC |
| 134 | +#define ADC_CHANNEL_1_PIN PC2 |
| 135 | +#define ADC_CHANNEL_2_PIN PC0 |
| 136 | +#define ADC_CHANNEL_3_PIN PC1 |
| 137 | + |
| 138 | +#define VBAT_ADC_CHANNEL ADC_CHN_1 |
| 139 | +#define CURRENT_METER_ADC_CHANNEL ADC_CHN_3 |
| 140 | +#define RSSI_ADC_CHANNEL ADC_CHN_2 |
| 141 | + |
| 142 | +// *************** LED ***************************** |
| 143 | +#define USE_LED_STRIP |
| 144 | +#define WS2811_PIN PC8 |
| 145 | + |
| 146 | +// ********** Optiical Flow adn Lidar ************** |
| 147 | +#define USE_RANGEFINDER |
| 148 | +#define USE_RANGEFINDER_MSP |
| 149 | +#define RANGEFINDER_I2C_BUS BUS_I2C1 |
| 150 | +#define USE_OPFLOW |
| 151 | +#define USE_OPFLOW_MSP |
| 152 | + |
| 153 | +#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX) |
| 154 | +#define USE_DSHOT |
| 155 | +#define USE_ESC_SENSOR |
| 156 | +#define USE_SERIAL_4WAY_BLHELI_INTERFACE |
| 157 | + |
| 158 | +#define SERIALRX_UART SERIAL_PORT_USART2 |
| 159 | +#define DEFAULT_RX_TYPE RX_TYPE_SERIAL |
| 160 | +#define SERIALRX_PROVIDER SERIALRX_SBUS |
| 161 | + |
| 162 | +#define MAX_PWM_OUTPUT_PORTS 8 |
| 163 | + |
| 164 | +#define CURRENT_METER_SCALE 490 |
| 165 | + |
| 166 | +#define TARGET_IO_PORTA 0xffff |
| 167 | +#define TARGET_IO_PORTB 0xffff |
| 168 | +#define TARGET_IO_PORTC 0xffff |
| 169 | +#define TARGET_IO_PORTD (BIT(2)) |
0 commit comments