|
| 1 | +/* |
| 2 | + * This file is part of INAV. |
| 3 | + * |
| 4 | + * INAV 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 | + * INAV 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 INAV. If not, see <http://www.gnu.org/licenses/>. |
| 16 | + */ |
| 17 | + |
| 18 | +#pragma once |
| 19 | +#define USE_TARGET_CONFIG |
| 20 | + |
| 21 | +#define TARGET_BOARD_IDENTIFIER "FRF4WM" |
| 22 | +#define USBD_PRODUCT_STRING "FLYINGRCF4WINGMINI" |
| 23 | + |
| 24 | +#define LED0 PA14 //Blue |
| 25 | +#define LED1 PA13 //Green |
| 26 | + |
| 27 | +// *************** SPI1 IMU & OSD ******************* |
| 28 | +#define USE_SPI |
| 29 | +#define USE_SPI_DEVICE_1 |
| 30 | + |
| 31 | +#define SPI1_SCK_PIN PA5 |
| 32 | +#define SPI1_MISO_PIN PB4 |
| 33 | +#define SPI1_MOSI_PIN PA7 |
| 34 | + |
| 35 | +#define USE_IMU_ICM42605 |
| 36 | +#define IMU_ICM42605_ALIGN CW90_DEG_FLIP |
| 37 | +#define ICM42605_SPI_BUS BUS_SPI1 |
| 38 | +#define ICM42605_CS_PIN PC14 |
| 39 | + |
| 40 | +// *************** I2C /Baro/Mag ********************* |
| 41 | +#define USE_I2C |
| 42 | +#define USE_I2C_DEVICE_1 |
| 43 | +#define I2C1_SCL PB8 |
| 44 | +#define I2C1_SDA PB7 |
| 45 | + |
| 46 | +#define USE_BARO |
| 47 | +#define BARO_I2C_BUS BUS_I2C1 |
| 48 | +#define USE_BARO_SPL06 |
| 49 | +#define USE_BARO_BMP280 |
| 50 | +#define USE_BARO_MS5611 |
| 51 | +#define USE_BARO_DPS310 |
| 52 | + |
| 53 | +#define USE_MAG |
| 54 | +#define MAG_I2C_BUS BUS_I2C1 |
| 55 | +#define USE_MAG_ALL |
| 56 | + |
| 57 | +#define USE_RANGEFINDER |
| 58 | +#define RANGEFINDER_I2C_BUS BUS_I2C1 |
| 59 | +#define PITOT_I2C_BUS BUS_I2C1 |
| 60 | +#define TEMPERATURE_I2C_BUS BUS_I2C1 |
| 61 | + |
| 62 | +// *************** UART ***************************** |
| 63 | +#define USE_VCP |
| 64 | + |
| 65 | +#define USE_UART1 |
| 66 | +#define UART1_TX_PIN PA9 |
| 67 | +#define UART1_RX_PIN PA10 |
| 68 | + |
| 69 | +#define USE_UART2 |
| 70 | +#define UART2_TX_PIN PA2 |
| 71 | +#define UART2_RX_PIN PA3 |
| 72 | + |
| 73 | +#define USE_UART4 |
| 74 | +#define UART4_TX_PIN PA0 |
| 75 | +#define UART4_RX_PIN PA1 |
| 76 | + |
| 77 | +#define USE_UART5 |
| 78 | +#define UART5_TX_PIN PC12 |
| 79 | +#define UART5_RX_PIN PD2 |
| 80 | + |
| 81 | +#define USE_SOFTSERIAL1 |
| 82 | +#define SOFTSERIAL_1_TX_PIN PA2 |
| 83 | +#define SOFTSERIAL_1_RX_PIN PA2 |
| 84 | + |
| 85 | +#define SERIAL_PORT_COUNT 6 |
| 86 | + |
| 87 | +#define DEFAULT_RX_TYPE RX_TYPE_SERIAL |
| 88 | +#define SERIALRX_PROVIDER SERIALRX_CRSF |
| 89 | +#define SERIALRX_UART SERIAL_PORT_USART1 |
| 90 | + |
| 91 | +// *************** ADC *************************** |
| 92 | +#define USE_ADC |
| 93 | +#define ADC_INSTANCE ADC1 |
| 94 | +#define ADC1_DMA_STREAM DMA2_Stream4 |
| 95 | +#define ADC_CHANNEL_1_PIN PC4 |
| 96 | +#define VBAT_ADC_CHANNEL ADC_CHN_1 |
| 97 | + |
| 98 | +// *************** others ************************ |
| 99 | +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX) |
| 100 | +#define VBAT_SCALE_DEFAULT 2100 |
| 101 | +#define CURRENT_METER_SCALE 150 |
| 102 | + |
| 103 | +#define TARGET_IO_PORTA 0xffff |
| 104 | +#define TARGET_IO_PORTB 0xffff |
| 105 | +#define TARGET_IO_PORTC 0xffff |
| 106 | +#define TARGET_IO_PORTD (BIT(2)) |
| 107 | + |
| 108 | +#define MAX_PWM_OUTPUT_PORTS 7 |
| 109 | + |
| 110 | +#define USE_SERIAL_4WAY_BLHELI_INTERFACE |
| 111 | +#define USE_DSHOT |
| 112 | +#define USE_ESC_SENSOR |
0 commit comments