Merge pull request #10757 from KarateBrot/biquadCrossfeed
[betaflight.git] / src / main / target / REVONANO / target.h
blobe511948d61be08e43837f8e009127079f9391aa8
1 /*
2 * This file is part of Cleanflight and Betaflight.
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.
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.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #pragma once
22 #define TARGET_BOARD_IDENTIFIER "REVN"
24 #define USBD_PRODUCT_STRING "Revo Nano"
25 #ifdef OPBL
26 #define USBD_SERIALNUMBER_STRING "0x8010000"
27 #endif
29 #define LED0_PIN PC14
30 #define LED1_PIN PC13
32 #define USE_BEEPER
33 #define BEEPER_PIN PC13
35 #define GYRO_1_CS_PIN PB12
36 #define GYRO_1_SPI_INSTANCE SPI2
38 #define USE_ACC
39 #define USE_ACC_SPI_MPU6500
41 #define USE_GYRO
42 #define USE_GYRO_SPI_MPU6500
43 #define GYRO_1_ALIGN CW270_DEG
45 #define USE_BARO
46 #define USE_BARO_MS5611
48 // MPU6500 interrupts
49 #define USE_EXTI
50 #define USE_GYRO_EXTI
51 #define GYRO_1_EXTI_PIN PA15
52 #define USE_MPU_DATA_READY_SIGNAL
54 #define USE_VCP
55 #define USE_USB_DETECT
56 //#define USB_DETECT_PIN PA9
58 // The Flexi Port can be used for either UART1 or I2CDEV_1, see I2C section below
59 #define USE_UART1 // Flexi Port
60 #define UART1_RX_PIN PB7
61 #define UART1_TX_PIN PB6
62 #define PINIO1_PIN PB10 // DTR pin
64 #define USE_UART2 // Main Port
65 #define UART2_RX_PIN PA3
66 #define UART2_TX_PIN PA2
67 #define INVERTER_PIN_UART2 PC15 //Sbus on USART 2 of nano.
69 #define USE_SOFTSERIAL1
70 #define USE_SOFTSERIAL2
72 #define SERIAL_PORT_COUNT 5
74 #define USE_ESCSERIAL
75 #define ESCSERIAL_TIMER_TX_PIN PB10 // (HARDARE=0,PPM)
77 #define USE_SPI
78 #define USE_SPI_DEVICE_2
80 #define USE_I2C
81 /* The Flexi Port can be used for either UART1 or I2CDEV_1
82 * I2C resources undefined by default
83 * To use I2C use the following CLI commands:
84 * resource SERIAL_RX 1 NONE
85 * resource SERIAL_TX 1 NONE
86 * resource I2C1_SCL 1 PB6
87 * resource I2C1_SDA 1 PB7
89 #define USE_I2C_DEVICE_1 // UART1/FlexiPort (PB6,PB7)
90 #define I2C_DEVICE I2CDEV_1
91 #define I2C1_SCL NONE // Define as PB6 if required
92 #define I2C1_SDA NONE // Define as PB7 if required
93 #define USE_I2C_DEVICE_3
94 #define I2C3_SCL PA8
95 #define I2C3_SDA PB4
96 #define BARO_I2C_INSTANCE I2CDEV_3
98 #undef USE_LED_STRIP
100 #define USE_ADC
101 #define CURRENT_METER_ADC_PIN PA7
102 #define VBAT_ADC_PIN PA6
103 #define RSSI_ADC_PIN PA5
105 #define TARGET_IO_PORTA 0xffff
106 #define TARGET_IO_PORTB 0xffff
107 #define TARGET_IO_PORTC (BIT(13) | BIT(14) | BIT(15))
109 #define USABLE_TIMER_CHANNEL_COUNT 12
110 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) )