add SPL06 in Matek targets
[inav/snaewe.git] / src / main / target / PIKOBLX / target.h
blob9a68d246b196205663577d188e619470e932f149
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight 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.
9 * Cleanflight 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.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #define TARGET_BOARD_IDENTIFIER "PIKO" // Furious FPV Piko BLX
22 #define CONFIG_FASTLOOP_PREFERRED_ACC IMU_DEFAULT
24 #define LED0 PB9
25 #define LED1 PB5
27 #define BEEPER PA0
28 #define BEEPER_INVERTED
30 // MPU6000 interrupts
31 #define USE_EXTI
32 #define GYRO_INT_EXTI PA15
33 #define USE_MPU_DATA_READY_SIGNAL
35 #define USE_IMU_MPU6000
36 #define IMU_MPU6000_ALIGN CW180_DEG
37 #define MPU6000_CS_PIN PB12
38 #define MPU6000_SPI_BUS BUS_SPI2
40 #define USE_VCP
41 #define USE_UART1
42 #define USE_UART2
43 #define USE_UART3
44 #define SERIAL_PORT_COUNT 4
46 #define UART1_TX_PIN PB6
47 #define UART1_RX_PIN PB7
49 #define UART2_TX_PIN PB3
50 #define UART2_RX_PIN PB4
52 #define UART3_TX_PIN PB10 // PB10 (AF7)
53 #define UART3_RX_PIN PB11 // PB11 (AF7)
55 #define USE_SPI
56 #define USE_SPI_DEVICE_2
58 #define SENSORS_SET (SENSOR_ACC)
60 #define USE_TELEMETRY
61 #define USE_BLACKBOX
62 #define USE_SERIAL_RX
64 #define BOARD_HAS_VOLTAGE_DIVIDER
65 #define USE_ADC
66 #define ADC_INSTANCE ADC2
67 //#define ADC_CHANNEL_1_PIN PA2 <-- conflict with pwm output 6, and the board does not have current sensor
68 #define ADC_CHANNEL_2_PIN PA5
69 //#define ADC_CHANNEL_3_PIN PB2 <-- the board does not have a rssi pad
71 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
72 #define VBAT_ADC_CHANNEL ADC_CHN_2
73 #define RSSI_ADC_CHANNEL ADC_CHN_3
75 //#define USE_LED_STRIP
76 //#define WS2811_PIN PB8 // TIM16_CH1
78 // #define USE_TRANSPONDER
79 // #define TRANSPONDER_PIN PA8
81 #define USE_SPEKTRUM_BIND
82 // USART3, PB11
83 #define BIND_PIN PB11
85 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
87 // IO - stm32f303cc in 48pin package
88 #define TARGET_IO_PORTA 0xffff
89 #define TARGET_IO_PORTB 0xffff
90 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
91 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
93 // sn dec06.16 added MAX_PWM_OUTPUT_PORTS: number of available PWM outputs
94 // porting inav to PIKO BLX by using betaflight target files from before inav changes to timer.h/timer_def.h
95 // review of target.c shows definitions for PWB1-PWM9. PWM9 is for PPM input
96 #define MAX_PWM_OUTPUT_PORTS 6