First wave of feature cut conversions: CHEBUZZF3, MIDELICF3, and SPRACINGF3EVO.
[betaflight.git] / src / main / target / NOX / target.h
blob3684d163dc9633a6b0ee97e7f5f1a85a62268713
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
23 #define USE_TARGET_CONFIG
25 #define TARGET_BOARD_IDENTIFIER "NOX1"
26 #define USBD_PRODUCT_STRING "NoxF4V1"
28 #define LED0_PIN PA4
30 #define USE_BEEPER
31 #define BEEPER_PIN PC13
32 #define BEEPER_INVERTED
34 #define INVERTER_PIN_UART2 PC14
36 #define USE_ACC
37 #define USE_ACC_SPI_MPU6500
38 #define USE_ACC_SPI_MPU6000
40 #define USE_GYRO
41 #define USE_GYRO_SPI_MPU6500
42 #define USE_GYRO_SPI_MPU6000
44 #define GYRO_1_CS_PIN PB12
45 #define GYRO_1_SPI_INSTANCE SPI2
47 #define USE_EXTI
48 #define USE_GYRO_EXTI
49 #define GYRO_1_EXTI_PIN PA8
50 #define USE_MPU_DATA_READY_SIGNAL
52 #define USE_BARO
53 #define USE_BARO_BMP280
54 #define USE_BARO_SPI_BMP280
55 #define BARO_SPI_INSTANCE SPI2
56 #define BARO_CS_PIN PA9
58 #define USE_MAX7456
59 #define MAX7456_SPI_INSTANCE SPI2
60 #define MAX7456_SPI_CS_PIN PA10
61 #define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD*2)
62 #define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
64 #define USE_VCP
65 #define USE_USB_DETECT
66 //#define USB_DETECT_PIN PC5
68 #define USE_UART1
69 #define UART1_RX_PIN PB7
70 #define UART1_TX_PIN PB6
72 #define USE_UART2
73 #define UART2_RX_PIN PA3
74 #define UART2_TX_PIN PA2
76 #define USE_SOFTSERIAL1
77 #define SOFTSERIAL1_RX_PIN PA2 // Backdoor timer on UART2_TX, used for ESC telemetry
78 #define SOFTSERIAL1_TX_PIN PA2 // Workaround for softserial not initializing with only RX
80 #define USE_SOFTSERIAL2
81 #define SOFTSERIAL2_RX_PIN NONE
82 #define SOFTSERIAL2_TX_PIN NONE
84 #define SERIAL_PORT_COUNT 5 //VCP, USART1, USART2, SOFTSERIAL1, SOFTSERIAL2
86 #define USE_ESCSERIAL
87 #define ESCSERIAL_TIMER_TX_PIN PB10
89 #define USE_SPI
90 #define USE_SPI_DEVICE_1
91 #define SPI1_SCK_PIN PB3
92 #define SPI1_MISO_PIN PB4
93 #define SPI1_MOSI_PIN PB5
95 #define USE_SPI_DEVICE_2
96 #define SPI2_SCK_PIN PB13
97 #define SPI2_MISO_PIN PB14
98 #define SPI2_MOSI_PIN PB15
100 #define USE_FLASHFS
101 #define USE_FLASH_M25P16
102 #define FLASH_SPI_INSTANCE SPI1
103 #define FLASH_CS_PIN PA15
104 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
106 #define USE_ADC
107 #define CURRENT_METER_ADC_PIN NONE // PA6 Available from TP33
108 #define VBAT_ADC_PIN PA5 // 11:1 (10K + 1K) divider
110 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ESC
111 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ESC
113 #define SERIALRX_UART SERIAL_PORT_USART2
115 #define USE_TRANSPONDER
117 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
118 #define SERIALRX_PROVIDER SERIALRX_SBUS
120 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_SOFTSERIAL | FEATURE_ESC_SENSOR)
121 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
123 #define TARGET_IO_PORTA (0xffff & ~(BIT(14)|BIT(13)))
124 #define TARGET_IO_PORTB (0xffff & ~(BIT(2)|BIT(11)))
125 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
127 #define USABLE_TIMER_CHANNEL_COUNT 8
128 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(9) )