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)
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/>.
23 #define TARGET_BOARD_IDENTIFIER "SPKY" // SParKY
26 #define LED0_PIN PB4 // Blue (Rev 1 & 2) - PB4
27 #define LED1_PIN PB5 // Green (Rev 1) / Red (Rev 2) - PB5
30 #define BEEPER_PIN PA1
31 #define BEEPER_INVERTED
36 #define GYRO_1_EXTI_PIN PA15
37 #define USE_MPU_DATA_READY_SIGNAL
39 // MPU 9150 INT connected to PA15, pulled up to VCC by 10K Resistor, contains MPU6050 and AK8975 in single component.
41 #define USE_GYRO_MPU6050
42 #define GYRO_1_ALIGN CW270_DEG
45 #define USE_ACC_MPU6050
48 #define USE_BARO_MS5611
49 #define USE_BARO_BMP280
52 #define USE_MAG_AK8975
54 #define MAG_AK8975_ALIGN CW180_DEG_FLIP
57 #define USE_UART1 // Conn 1 - TX (PB6) RX PB7 (AF7)
58 #define USE_UART2 // Input - RX (PA3)
59 #define USE_UART3 // Servo out - 10/RX (PB11) 11/TX (PB10)
60 #define USE_SOFTSERIAL1
61 #define USE_SOFTSERIAL2
63 #define SERIAL_PORT_COUNT 6
65 #define AVOID_UART2_FOR_PWM_PPM
68 #define ESCSERIAL_TIMER_TX_PIN PB15 // (HARDARE=0)
70 #define UART1_TX_PIN PB6
71 #define UART1_RX_PIN PB7
73 #define UART2_TX_PIN PA2 // PA2 - Clashes with PWM6 input.
74 #define UART2_RX_PIN PA3
76 #define UART3_TX_PIN PB10 // PB10 (AF7)
77 #define UART3_RX_PIN PB11 // PB11 (AF7)
79 // Note: PA5 and PA0 are N/C on the sparky - potentially use for ADC or LED STRIP?
82 #define USE_I2C_DEVICE_2
83 #define I2C_DEVICE (I2CDEV_2)
88 #define ADC_INSTANCE ADC2
89 #define VBAT_ADC_PIN PA4
90 #define CURRENT_METER_ADC_PIN PA7
92 #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
94 //#define USE_RANGEFINDER
95 //#define USE_RANGEFINDER_HCSR04
96 //#define RANGEFINDER_HCSR04_ECHO_PIN PB1
97 //#define RANGEFINDER_HCSR04_TRIGGER_PIN PA2
99 // available IO pins (from schematics)
100 //#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))
101 //#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))
102 // !!TODO - check following lines are correct
103 #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))
104 #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))
105 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
107 #define USABLE_TIMER_CHANNEL_COUNT 11
108 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(15) | TIM_N(16) | TIM_N(17))