|
| 1 | +/* |
| 2 | + * This file is part of INAV Project. |
| 3 | + * |
| 4 | + * This Source Code Form is subject to the terms of the Mozilla Public |
| 5 | + * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
| 6 | + * You can obtain one at http://mozilla.org/MPL/2.0/. |
| 7 | + * |
| 8 | + * Alternatively, the contents of this file may be used under the terms |
| 9 | + * of the GNU General Public License Version 3, as described below: |
| 10 | + * |
| 11 | + * This file is free software: you may copy, redistribute and/or modify |
| 12 | + * it under the terms of the GNU General Public License as published by the |
| 13 | + * Free Software Foundation, either version 3 of the License, or (at your |
| 14 | + * option) any later version. |
| 15 | + * |
| 16 | + * This file is distributed in the hope that it will be useful, but |
| 17 | + * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| 19 | + * Public License for more details. |
| 20 | + * |
| 21 | + * You should have received a copy of the GNU General Public License |
| 22 | + * along with this program. If not, see http://www.gnu.org/licenses/. |
| 23 | + */ |
| 24 | + |
| 25 | +#pragma once |
| 26 | + |
| 27 | +#define TARGET_BOARD_IDENTIFIER "DAK4" |
| 28 | +#define USBD_PRODUCT_STRING "DAKEFPV F435" |
| 29 | + |
| 30 | +#define LED0 PA15 |
| 31 | + |
| 32 | +#define BEEPER PC3 |
| 33 | +#define BEEPER_INVERTED |
| 34 | + |
| 35 | + |
| 36 | +// Buses |
| 37 | + |
| 38 | +#define USE_SPI |
| 39 | + |
| 40 | +#define USE_SPI_DEVICE_1 |
| 41 | +#define SPI1_SCK_PIN PA5 |
| 42 | +#define SPI1_MISO_PIN PA6 |
| 43 | +#define SPI1_MOSI_PIN PA7 |
| 44 | + |
| 45 | +#define USE_SPI_DEVICE_2 |
| 46 | +#define SPI2_SCK_PIN PB13 |
| 47 | +#define SPI2_MISO_PIN PB14 |
| 48 | +#define SPI2_MOSI_PIN PB15 |
| 49 | + |
| 50 | +#define USE_SPI_DEVICE_3 |
| 51 | +#define SPI3_SCK_PIN PB3 |
| 52 | +#define SPI3_MISO_PIN PB4 |
| 53 | +#define SPI3_MOSI_PIN PB5 |
| 54 | + |
| 55 | +#define USE_I2C |
| 56 | +#define USE_I2C_DEVICE_1 |
| 57 | +#define I2C1_SCL PB8 |
| 58 | +#define I2C1_SDA PB9 |
| 59 | +// #define USE_I2C_PULLUP |
| 60 | + |
| 61 | +#define DEFAULT_I2C_BUS BUS_I2C1 |
| 62 | + |
| 63 | +// Gyro |
| 64 | +#define USE_IMU_MPU6500 |
| 65 | +#define IMU_MPU6500_ALIGN CW90_DEG |
| 66 | +#define MPU6500_CS_PIN PA4 |
| 67 | +#define MPU6500_SPI_BUS BUS_SPI1 |
| 68 | + |
| 69 | +// ICM42605/ICM42688P |
| 70 | +#define USE_IMU_ICM42605 |
| 71 | +#define IMU_ICM42605_ALIGN CW90_DEG |
| 72 | +#define ICM42605_SPI_BUS BUS_SPI1 |
| 73 | +#define ICM42605_CS_PIN PA4 |
| 74 | + |
| 75 | +//Baro |
| 76 | +#define USE_BARO |
| 77 | +#define USE_BARO_BMP280 |
| 78 | +#define BMP280_I2C_BUS DEFAULT_I2C_BUS |
| 79 | + |
| 80 | +// Other sensors |
| 81 | + |
| 82 | +#define USE_BARO |
| 83 | +#define BARO_I2C_BUS DEFAULT_I2C_BUS |
| 84 | +#define USE_BARO_ALL |
| 85 | + |
| 86 | +#define USE_MAG |
| 87 | +#define MAG_I2C_BUS DEFAULT_I2C_BUS |
| 88 | +#define USE_MAG_ALL |
| 89 | + |
| 90 | +// OSD |
| 91 | +#define USE_MAX7456 |
| 92 | +#define MAX7456_SPI_BUS BUS_SPI2 |
| 93 | +#define MAX7456_CS_PIN PB12 |
| 94 | + |
| 95 | +// Flash |
| 96 | + |
| 97 | +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT |
| 98 | +#define USE_FLASHFS |
| 99 | +#define USE_FLASH_M25P16 |
| 100 | +#define M25P16_SPI_BUS BUS_SPI3 |
| 101 | +#define M25P16_CS_PIN PB1 |
| 102 | + |
| 103 | +#define USE_FLASH_W25N01G |
| 104 | +#define W25N01G_SPI_BUS BUS_SPI3 |
| 105 | +#define W25N01G_CS_PIN PB1 |
| 106 | + |
| 107 | +// UARTs |
| 108 | +#define USE_VCP |
| 109 | + |
| 110 | +#define USE_UART1 |
| 111 | +#define UART1_TX_PIN PB6 |
| 112 | +#define UART1_RX_PIN PB7 |
| 113 | + |
| 114 | +// USART3 RX only |
| 115 | +#define USE_UART3 |
| 116 | +#define UART3_RX_PIN PB11 |
| 117 | +#define UART3_TX_PIN PC13 // PC13 is just for compilation pass |
| 118 | + |
| 119 | +#define USE_UART4 |
| 120 | +#define UART4_TX_PIN PC10 |
| 121 | +#define UART4_RX_PIN PC11 |
| 122 | + |
| 123 | +#define USE_UART5 |
| 124 | +#define UART5_TX_PIN PC12 |
| 125 | +#define UART5_RX_PIN PD2 |
| 126 | + |
| 127 | +#define USE_UART6 |
| 128 | +#define UART6_TX_PIN PC6 |
| 129 | +#define UART6_RX_PIN PC7 |
| 130 | + |
| 131 | +#define SERIAL_PORT_COUNT 6 |
| 132 | + |
| 133 | +#define DEFAULT_RX_TYPE RX_TYPE_SERIAL |
| 134 | +#define SERIALRX_PROVIDER SERIALRX_CRSF |
| 135 | +#define SERIALRX_UART SERIAL_PORT_USART5 |
| 136 | +#define GPS_UART SERIAL_PORT_USART1 |
| 137 | + |
| 138 | +// *************** ADC ***************************** |
| 139 | +#define USE_ADC |
| 140 | +#define ADC_INSTANCE ADC1 |
| 141 | + |
| 142 | +#define ADC_CHANNEL_1_PIN PC1 |
| 143 | +#define ADC_CHANNEL_2_PIN PC2 |
| 144 | +#define ADC_CHANNEL_3_PIN PC0 |
| 145 | +#define VBAT_ADC_CHANNEL ADC_CHN_1 |
| 146 | +#define RSSI_ADC_CHANNEL ADC_CHN_2 |
| 147 | +#define CURRENT_METER_ADC_CHANNEL ADC_CHN_3 |
| 148 | + |
| 149 | +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY ) |
| 150 | + |
| 151 | +#define USE_LED_STRIP |
| 152 | +#define WS2811_PIN PC8 |
| 153 | + |
| 154 | +#define USE_SERIAL_4WAY_BLHELI_INTERFACE |
| 155 | + |
| 156 | +#define TARGET_IO_PORTA 0xffff |
| 157 | +#define TARGET_IO_PORTB 0xffff |
| 158 | +#define TARGET_IO_PORTC 0xffff |
| 159 | +#define TARGET_IO_PORTD 0xffff |
| 160 | +#define TARGET_IO_PORTE 0xffff |
| 161 | +#define TARGET_IO_PORTH 0xffff |
| 162 | + |
| 163 | +#define USE_DSHOT |
| 164 | +#define USE_ESC_SENSOR |
| 165 | +#define MAX_PWM_OUTPUT_PORTS 10 |
| 166 | + |
| 167 | +// PINIO |
| 168 | +#define USE_PINIO |
| 169 | +#define USE_PINIOBOX |
| 170 | +#define PINIO1_PIN PB0 |
| 171 | +#define PINIO2_PIN PB10 |
| 172 | + |
| 173 | +// VBAT 10K/160K |
| 174 | +#define VBAT_SCALE_DEFAULT 1600 |
0 commit comments