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/>.
20 #define TARGET_BOARD_IDENTIFIER "SPKY" // SParKY
22 #define LED0 PB4 // Blue (Rev 1 & 2) - PB4
23 #define LED1 PB5 // Green (Rev 1) / Red (Rev 2) - PB5
26 #define BEEPER_INVERTED
30 #define GYRO_INT_EXTI PA15
31 #define USE_MPU_DATA_READY_SIGNAL
33 // MPU 9150 INT connected to PA15, pulled up to VCC by 10K Resistor, contains MPU6050 and AK8975 in single component.
34 #define USE_IMU_MPU6050
35 #define IMU_MPU6050_ALIGN CW270_DEG
36 #define MPU6050_I2C_BUS BUS_I2C2
39 #define BARO_I2C_BUS BUS_I2C2
40 #define USE_BARO_MS5611
41 #define USE_BARO_BMP280
44 #define MAG_I2C_BUS BUS_I2C2
45 #define USE_MAG_AK8975
46 #define USE_MAG_HMC5883
47 #define USE_MAG_QMC5883
48 #define USE_MAG_IST8310
49 #define USE_MAG_IST8308
50 #define USE_MAG_MAG3110
51 #define USE_MAG_LIS3MDL
54 #define USE_UART1 // Conn 1 - TX (PB6) RX PB7 (AF7)
55 #define USE_UART2 // Input - RX (PA3)
56 #define USE_UART3 // Servo out - 10/RX (PB11) 11/TX (PB10)
57 #define SERIAL_PORT_COUNT 4
59 #define UART1_TX_PIN PB6
60 #define UART1_RX_PIN PB7
62 #define UART2_TX_PIN PA2 // PA2 - Clashes with PWM6 input.
63 #define UART2_RX_PIN PA3
65 #define UART3_TX_PIN PB10 // PB10 (AF7)
66 #define UART3_RX_PIN PB11 // PB11 (AF7)
68 // Note: PA5 and PA0 are N/C on the sparky - potentially use for ADC or LED STRIP?
71 #define USE_I2C_DEVICE_2
76 #define ADC_INSTANCE ADC2
77 #define ADC_CHANNEL_1_PIN PA4
78 #define ADC_CHANNEL_2_PIN PA7
79 #define VBAT_ADC_CHANNEL ADC_CHN_1
80 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
82 // LED strip configuration using PWM motor output pin 5.
84 #define USE_LED_STRIP_ON_DMA1_CHANNEL3
85 #define WS2811_PIN PA6 // TIM16_CH1
87 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
89 #define USE_SPEKTRUM_BIND
93 // #define USE_RANGEFINDER
96 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
98 // Number of available PWM outputs
99 #define MAX_PWM_OUTPUT_PORTS 10
101 // available IO pins (from schematics)
102 //#define TARGET_IO_PORTA (BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15))
103 //#define TARGET_IO_PORTB (BIT(0)|BIT(1)|BIT(10)|BIT(11)|BIT(14)|BIT(15)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9))
104 // !!TODO - check following lines are correct
105 #define TARGET_IO_PORTA (BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15))
106 #define TARGET_IO_PORTB (BIT(0)|BIT(1)|BIT(6)|BIT(10)|BIT(11)|BIT(14)|BIT(15)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(12)|BIT(13))
107 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))