|
| 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 DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_BLACKBOX | FEATURE_SOFTSERIAL) |
| 24 | + |
| 25 | +#define TARGET_BOARD_IDENTIFIER "AIK4" |
| 26 | +#define USBD_PRODUCT_STRING "AIKONF4V2" |
| 27 | + |
| 28 | +// Beeper |
| 29 | +#define USE_BEEPER |
| 30 | +#define BEEPER PB5 |
| 31 | +#define BEEPER_INVERTED |
| 32 | +// Leds |
| 33 | +#define USE_LED_STRIP |
| 34 | +#define WS2811_PIN PB6 |
| 35 | +#define LED0 PB4 |
| 36 | +// UARTs |
| 37 | +#define USB_IO |
| 38 | +#define USE_VCP |
| 39 | +#define USE_UART1 |
| 40 | +#define UART1_RX_PIN PA10 |
| 41 | +#define UART1_TX_PIN PA9 |
| 42 | +#define USE_UART2 |
| 43 | +#define UART2_TX_PIN PA2 |
| 44 | +#define UART2_RX_PIN PA3 |
| 45 | +#define USE_UART3 |
| 46 | +#define UART3_RX_PIN PB11 |
| 47 | +#define UART3_TX_PIN PB10 |
| 48 | +#define USE_UART4 |
| 49 | +#define UART4_TX_PIN PA0 |
| 50 | +#define UART4_RX_PIN PA1 |
| 51 | +#define SERIAL_PORT_COUNT 5 //VCP, UART1, UART2, UART3, UART4 |
| 52 | +#define DEFAULT_RX_TYPE RX_TYPE_SERIAL |
| 53 | +#define SERIALRX_PROVIDER SERIALRX_SBUS |
| 54 | +#define SERIALRX_UART SERIAL_PORT_USART1 |
| 55 | +// SPI |
| 56 | +#define USE_SPI |
| 57 | +#define USE_SPI_DEVICE_1 |
| 58 | +#define SPI1_NSS_PIN PA4 |
| 59 | +#define SPI1_SCK_PIN PA5 |
| 60 | +#define SPI1_MISO_PIN PA6 |
| 61 | +#define SPI1_MOSI_PIN PA7 |
| 62 | +#define USE_SPI_DEVICE_2 |
| 63 | +#define SPI2_NSS_PIN PB12 |
| 64 | +#define SPI2_SCK_PIN PB13 |
| 65 | +#define SPI2_MISO_PIN PB14 |
| 66 | +#define SPI2_MOSI_PIN PB15 |
| 67 | +#define USE_SPI_DEVICE_3 |
| 68 | +#define SPI3_NSS_PIN PA15 |
| 69 | +#define SPI3_SCK_PIN PC10 |
| 70 | +#define SPI3_MISO_PIN PC11 |
| 71 | +#define SPI3_MOSI_PIN PC12 |
| 72 | +// I2C |
| 73 | +#define USE_I2C |
| 74 | +#define USE_I2C_DEVICE_1 |
| 75 | +#define I2C1_SCL PB8 |
| 76 | +#define I2C1_SDA PB9 |
| 77 | +#define DEFAULT_I2C_BUS BUS_I2C1 |
| 78 | +#define EXTERNAL_I2C_BUS DEFAULT_I2C_BUS |
| 79 | +// MAG |
| 80 | +#define USE_MAG |
| 81 | +#define MAG_I2C_BUS DEFAULT_I2C_BUS |
| 82 | +#define USE_MAG_ALL |
| 83 | +// ADC |
| 84 | +#define USE_ADC |
| 85 | +#define ADC_CHANNEL_1_PIN PC1 |
| 86 | +#define ADC_CHANNEL_2_PIN PC2 |
| 87 | +#define ADC_CHANNEL_3_PIN PC3 |
| 88 | +#define CURRENT_METER_ADC_CHANNEL ADC_CHN_1 |
| 89 | +#define VBAT_ADC_CHANNEL ADC_CHN_2 |
| 90 | +#define RSSI_ADC_CHANNEL ADC_CHN_3 |
| 91 | +#define ADC_INSTANCE ADC1 |
| 92 | +// Gyro & ACC |
| 93 | +#define USE_IMU_MPU6000 |
| 94 | +#define MPU6000_CS_PIN SPI1_NSS_PIN |
| 95 | +#define MPU6000_SPI_BUS BUS_SPI1 |
| 96 | +#define IMU_MPU6000_ALIGN CW0_DEG |
| 97 | +#define USE_IMU_ICM42605 |
| 98 | +#define ICM42605_CS_PIN SPI1_NSS_PIN |
| 99 | +#define ICM42605_SPI_BUS BUS_SPI1 |
| 100 | +#define IMU_ICM42605_ALIGN CW90_DEG |
| 101 | +// OSD |
| 102 | +#define USE_MAX7456 |
| 103 | +#define MAX7456_CS_PIN SPI3_NSS_PIN |
| 104 | +#define MAX7456_SPI_BUS BUS_SPI3 |
| 105 | +// Baro |
| 106 | +#define USE_BARO |
| 107 | +#define BARO_I2C_BUS DEFAULT_I2C_BUS |
| 108 | +#define USE_BARO_ALL |
| 109 | +// Blackbox |
| 110 | +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT |
| 111 | +#define M25P16_CS_PIN SPI2_NSS_PIN |
| 112 | +#define M25P16_SPI_BUS BUS_SPI2 |
| 113 | +#define USE_FLASHFS |
| 114 | +#define USE_FLASH_M25P16 |
| 115 | +// Others |
| 116 | +#define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS |
| 117 | +#define PITOT_I2C_BUS DEFAULT_I2C_BUS |
| 118 | +#define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS |
| 119 | + |
| 120 | +#define MAX_PWM_OUTPUT_PORTS 4 |
| 121 | +#define USE_SERIAL_4WAY_BLHELI_INTERFACE |
| 122 | +#define USE_SERIALSHOT |
| 123 | +#define USE_DSHOT |
| 124 | +#define USE_ESC_SENSOR |
| 125 | +#define VOLTAGE_METER_SCALE 110 |
| 126 | +#define CURRENT_METER_SCALE 400 |
| 127 | + |
| 128 | +#define TARGET_IO_PORTA 0xffff |
| 129 | +#define TARGET_IO_PORTB 0xffff |
| 130 | +#define TARGET_IO_PORTC 0xffff |
| 131 | +#define TARGET_IO_PORTD 0xffff |
| 132 | +#define TARGET_IO_PORTE 0xffff |
| 133 | +#define TARGET_IO_PORTF 0xffff |
| 134 | + |
0 commit comments