|
| 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 "PA42" |
| 22 | +#define USBD_PRODUCT_STRING "PauRcF405v2" |
| 23 | + |
| 24 | +#define LED0 PA14 //Blue |
| 25 | +#define LED1 PA13 //Green |
| 26 | + |
| 27 | +#define BEEPER PB9 |
| 28 | +#define BEEPER_INVERTED |
| 29 | +#define BEEPER_PWM_FREQUENCY 2500 |
| 30 | + |
| 31 | +// *************** SPI1 IMU & OSD ******************* |
| 32 | +#define USE_SPI |
| 33 | +#define USE_SPI_DEVICE_1 |
| 34 | + |
| 35 | +#define SPI1_SCK_PIN PA5 |
| 36 | +#define SPI1_MISO_PIN PB4 |
| 37 | +#define SPI1_MOSI_PIN PA7 |
| 38 | + |
| 39 | +// Board ships with either ICM42605/ICM42688P or BMI270 - same CS pin (PC14) |
| 40 | +#define USE_IMU_ICM42605 |
| 41 | +#define IMU_ICM42605_ALIGN CW0_DEG |
| 42 | +#define ICM42605_SPI_BUS BUS_SPI1 |
| 43 | +#define ICM42605_CS_PIN PC14 |
| 44 | + |
| 45 | +#define USE_IMU_BMI270 |
| 46 | +#define IMU_BMI270_ALIGN CW180_DEG |
| 47 | +#define BMI270_SPI_BUS BUS_SPI1 |
| 48 | +#define BMI270_CS_PIN PC14 |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | +#define USE_MAX7456 |
| 53 | +#define MAX7456_SPI_BUS BUS_SPI1 |
| 54 | +#define MAX7456_CS_PIN PB12 |
| 55 | + |
| 56 | +// *************** SPI2 Flash **************** |
| 57 | +#define USE_SPI_DEVICE_2 |
| 58 | +#define SPI2_SCK_PIN PB13 |
| 59 | +#define SPI2_MISO_PIN PC2 |
| 60 | +#define SPI2_MOSI_PIN PC3 |
| 61 | + |
| 62 | +#define USE_FLASHFS |
| 63 | +#define USE_FLASH_M25P16 |
| 64 | +#define M25P16_SPI_BUS BUS_SPI2 |
| 65 | +#define M25P16_CS_PIN PC13 |
| 66 | +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT |
| 67 | + |
| 68 | +// *************** I2C /Baro/Mag ********************* |
| 69 | +#define USE_I2C |
| 70 | +#define USE_I2C_DEVICE_1 |
| 71 | +#define I2C1_SCL PB8 |
| 72 | +#define I2C1_SDA PB7 |
| 73 | + |
| 74 | +#define USE_BARO |
| 75 | +#define BARO_I2C_BUS BUS_I2C1 |
| 76 | +#define USE_BARO_BMP280 |
| 77 | +#define USE_BARO_MS5611 |
| 78 | +#define USE_BARO_DPS310 |
| 79 | +#define USE_BARO_SPL06 |
| 80 | + |
| 81 | +#define USE_MAG |
| 82 | +#define MAG_I2C_BUS BUS_I2C1 |
| 83 | +#define USE_MAG_ALL |
| 84 | + |
| 85 | +#define USE_RANGEFINDER |
| 86 | +#define RANGEFINDER_I2C_BUS BUS_I2C1 |
| 87 | +#define PITOT_I2C_BUS BUS_I2C1 |
| 88 | +#define TEMPERATURE_I2C_BUS BUS_I2C1 |
| 89 | + |
| 90 | +// *************** UART ***************************** |
| 91 | +#define USE_VCP |
| 92 | + |
| 93 | +#define USE_UART1 |
| 94 | +#define UART1_TX_PIN PA9 |
| 95 | +#define UART1_RX_PIN PA10 |
| 96 | + |
| 97 | +#define USE_UART2 |
| 98 | +#define UART2_TX_PIN PA2 |
| 99 | +#define UART2_RX_PIN PA3 |
| 100 | + |
| 101 | +#define USE_UART3 |
| 102 | +#define UART3_TX_PIN PC10 |
| 103 | +#define UART3_RX_PIN PC11 |
| 104 | + |
| 105 | +#define USE_UART4 |
| 106 | +#define UART4_TX_PIN PA0 |
| 107 | +#define UART4_RX_PIN PA1 |
| 108 | + |
| 109 | +#define USE_UART5 |
| 110 | +#define UART5_TX_PIN PC12 |
| 111 | +#define UART5_RX_PIN PD2 |
| 112 | + |
| 113 | +#define USE_UART6 |
| 114 | +#define UART6_TX_PIN PC6 |
| 115 | +#define UART6_RX_PIN PC7 |
| 116 | + |
| 117 | +#define USE_SOFTSERIAL1 |
| 118 | +#define SOFTSERIAL_1_TX_PIN PA2 // Shared with UART2_TX - mutually exclusive with UART2 |
| 119 | +#define SOFTSERIAL_1_RX_PIN PA2 // Shared with UART2_TX - mutually exclusive with UART2 |
| 120 | + |
| 121 | +#define SERIAL_PORT_COUNT 8 |
| 122 | + |
| 123 | +#define DEFAULT_RX_TYPE RX_TYPE_SERIAL |
| 124 | +#define SERIALRX_PROVIDER SERIALRX_CRSF |
| 125 | +#define SERIALRX_UART SERIAL_PORT_USART2 |
| 126 | + |
| 127 | +// *************** ADC *************************** |
| 128 | +#define USE_ADC |
| 129 | +#define ADC_INSTANCE ADC1 |
| 130 | +#define ADC1_DMA_STREAM DMA2_Stream4 |
| 131 | +#define ADC_CHANNEL_1_PIN PC4 |
| 132 | +#define ADC_CHANNEL_2_PIN PC5 |
| 133 | +#define ADC_CHANNEL_3_PIN PB0 |
| 134 | +#define ADC_CHANNEL_4_PIN PC0 |
| 135 | +#define VBAT_ADC_CHANNEL ADC_CHN_1 |
| 136 | +#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2 |
| 137 | +#define RSSI_ADC_CHANNEL ADC_CHN_3 |
| 138 | +#define AIRSPEED_ADC_CHANNEL ADC_CHN_4 |
| 139 | + |
| 140 | +// *************** PINIO *************************** |
| 141 | +#define USE_PINIO |
| 142 | +#define USE_PINIOBOX |
| 143 | +#define PINIO1_PIN PA4 |
| 144 | +#define PINIO2_PIN PB5 |
| 145 | + |
| 146 | +// *************** LEDSTRIP ************************ |
| 147 | +#define USE_LED_STRIP |
| 148 | +#define WS2811_PIN PB1 |
| 149 | + |
| 150 | +// *************** others ************************ |
| 151 | +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX) |
| 152 | +#define VBAT_SCALE_DEFAULT 2100 |
| 153 | +#define CURRENT_METER_SCALE 150 |
| 154 | + |
| 155 | +#define TARGET_IO_PORTA 0xffff |
| 156 | +#define TARGET_IO_PORTB 0xffff |
| 157 | +#define TARGET_IO_PORTC 0xffff |
| 158 | +#define TARGET_IO_PORTD (BIT(2)) |
| 159 | + |
| 160 | +#define MAX_PWM_OUTPUT_PORTS 11 |
| 161 | + |
| 162 | +#define USE_SERIAL_4WAY_BLHELI_INTERFACE |
| 163 | +#define USE_DSHOT |
| 164 | +#define USE_DSHOT_DMAR |
| 165 | +#define USE_ESC_SENSOR |
| 166 | + |
0 commit comments