LED updates
[betaflight.git] / src / main / target / SINGULARITY / target.h
blob622a1a70ff432e15c95252fcef6422e1a0f820d0
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 "SING"
22 #define LED0 PB3
24 #define BEEPER PC15
26 #define USABLE_TIMER_CHANNEL_COUNT 10
28 #define USE_EXTI
29 #define MPU_INT_EXTI PC13
30 #define USE_MPU_DATA_READY_SIGNAL
32 #define GYRO
33 #define USE_GYRO_MPU6050
34 #define GYRO_MPU6050_ALIGN CW0_DEG_FLIP
36 #define ACC
37 #define USE_ACC_MPU6050
38 #define ACC_MPU6050_ALIGN CW0_DEG_FLIP
40 #define USE_FLASHFS
41 #define USE_FLASH_M25P16
43 #define USE_VCP
44 #define USE_USART1 // JST-SH Serial - TX (PA9) RX (PA10)
45 #define USE_USART2 // Input - TX (NC) RX (PA15)
46 #define USE_USART3 // Solder Pads - TX (PB10) RX (PB11)
47 #define USE_SOFTSERIAL1 // Telemetry
48 #define SERIAL_PORT_COUNT 5
50 #define UART1_TX_PIN GPIO_Pin_9
51 #define UART1_RX_PIN GPIO_Pin_10
52 #define UART1_GPIO GPIOA
53 #define UART1_GPIO_AF GPIO_AF_7
54 #define UART1_TX_PINSOURCE GPIO_PinSource9
55 #define UART1_RX_PINSOURCE GPIO_PinSource10
57 #define UART2_TX_PIN GPIO_Pin_14 //Not connected
58 #define UART2_RX_PIN GPIO_Pin_15
59 #define UART2_GPIO GPIOA
60 #define UART2_GPIO_AF GPIO_AF_7
61 #define UART2_TX_PINSOURCE GPIO_PinSource14
62 #define UART2_RX_PINSOURCE GPIO_PinSource15
64 #define UART3_TX_PIN GPIO_Pin_10
65 #define UART3_RX_PIN GPIO_Pin_11
66 #define UART3_GPIO_AF GPIO_AF_7
67 #define UART3_GPIO GPIOB
68 #define UART3_TX_PINSOURCE GPIO_PinSource10
69 #define UART3_RX_PINSOURCE GPIO_PinSource11
71 #define SOFTSERIAL_1_TIMER TIM15
72 #define SOFTSERIAL_1_TIMER_RX_HARDWARE 7 //Not connected
73 #define SOFTSERIAL_1_TIMER_TX_HARDWARE 8
75 #define USE_I2C
76 #define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA
78 #define USE_SPI
79 #define USE_SPI_DEVICE_1 // PA4, 5, 6, 7
80 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
82 #define VTX
83 #define RTC6705_CS_GPIO GPIOA
84 #define RTC6705_CS_PIN GPIO_Pin_4
85 #define RTC6705_SPI_INSTANCE SPI1
87 #define M25P16_CS_GPIO GPIOB
88 #define M25P16_CS_PIN GPIO_Pin_12
89 #define M25P16_SPI_INSTANCE SPI2
91 #define USE_ADC
92 #define BOARD_HAS_VOLTAGE_DIVIDER
94 #define ADC_INSTANCE ADC2
95 #define ADC_DMA_CHANNEL DMA2_Channel1
96 #define ADC_AHB_PERIPHERAL RCC_AHBPeriph_DMA2
98 #define VBAT_ADC_GPIO GPIOB
99 #define VBAT_ADC_GPIO_PIN GPIO_Pin_2
100 #define VBAT_ADC_CHANNEL ADC_Channel_12
102 #define LED_STRIP
103 #define LED_STRIP_TIMER TIM1
105 #define USE_LED_STRIP_ON_DMA1_CHANNEL2
106 #define WS2811_GPIO GPIOA
107 #define WS2811_GPIO_AHB_PERIPHERAL RCC_AHBPeriph_GPIOA
108 #define WS2811_GPIO_AF GPIO_AF_6
109 #define WS2811_PIN GPIO_Pin_8
110 #define WS2811_PIN_SOURCE GPIO_PinSource8
111 #define WS2811_TIMER TIM1
112 #define WS2811_TIMER_APB2_PERIPHERAL RCC_APB2Periph_TIM1
113 #define WS2811_DMA_CHANNEL DMA1_Channel2
114 #define WS2811_IRQ DMA1_Channel2_IRQn
115 #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC2
116 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER
118 #define AUTOTUNE
119 #define BLACKBOX
120 #define TELEMETRY
121 #define SERIAL_RX
122 #define GPS
123 #define USE_SERVOS
124 #define USE_CLI
126 #define SPEKTRUM_BIND
127 // USART2, PA15
128 #define BIND_PIN PA15
130 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
132 // IO - stm32f303cc in 48pin package
133 #define TARGET_IO_PORTA 0xffff
134 #define TARGET_IO_PORTB 0xffff
135 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
136 #define TARGET_IO_PORTF (BIT(0)|BIT(1))