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/>.
19 #if defined(FF_PIKOF4OSD)
20 #define TARGET_BOARD_IDENTIFIER "PKOS"
21 #define USBD_PRODUCT_STRING "PikoF4OSD"
23 #define TARGET_BOARD_IDENTIFIER "PIK4"
24 #define USBD_PRODUCT_STRING "PikoF4"
26 /*--------------LED----------------*/
27 #if defined(FF_PIKOF4OSD)
34 /*---------------------------------*/
36 /*------------BEEPER---------------*/
38 #define BEEPER_INVERTED
39 /*---------------------------------*/
41 /*----------CAMERA CONTROL---------*/
42 // #define CAMERA_CONTROL_PIN PB7
43 /*---------------------------------*/
45 /*------------SENSORS--------------*/
48 #define GYRO_INT_EXTI PC4
49 //#define DEBUG_MPU_DATA_READY_INTERRUPT
50 #define USE_MPU_DATA_READY_SIGNAL
51 #define ENSURE_MPU_DATA_READY_IS_LOW
53 #if defined(FF_PIKOF4OSD)
54 #define MPU6000_CS_PIN PA15
55 #define MPU6000_SPI_BUS BUS_SPI3
57 #define MPU6500_CS_PIN PA15
58 #define MPU6500_SPI_BUS BUS_SPI3
60 #define MPU6000_CS_PIN PA4
61 #define MPU6000_SPI_BUS BUS_SPI1
63 #define MPU6500_CS_PIN PA4
64 #define MPU6500_SPI_BUS BUS_SPI1
67 #define USE_IMU_MPU6000
68 #define IMU_MPU6000_ALIGN CW180_DEG
70 #define USE_IMU_MPU6500
71 #define IMU_MPU6500_ALIGN CW180_DEG
72 /*---------------------------------*/
74 #if defined(FF_PIKOF4OSD)
75 /*-------------OSD-----------------*/
78 #define MAX7456_SPI_BUS BUS_SPI1
79 #define MAX7456_CS_PIN PA4
80 //#define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
81 //#define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
82 /*---------------------------------*/
84 /*------------FLASH----------------*/
85 #define M25P16_CS_PIN PB3
86 #define M25P16_SPI_BUS BUS_SPI3
89 #define USE_FLASH_M25P16
90 /*---------------------------------*/
93 /*-----------USB-UARTs-------------*/
96 //#define VBUS_SENSING_PIN PA8
97 //#define VBUS_SENSING_ENABLED
99 #define USE_UART_INVERTER
102 #define UART1_RX_PIN PA10
103 #define UART1_TX_PIN PA9
106 #define UART3_RX_PIN PB11
107 #define UART3_TX_PIN PB10
108 #if defined(FF_PIKOF4OSD)
109 #define INVERTER_PIN_UART3_RX PC3
111 #define INVERTER_PIN_UART3_RX PC8
115 #define UART4_TX_PIN PA0
116 #define UART4_RX_PIN PA1
119 #define UART6_RX_PIN PC7
120 #define UART6_TX_PIN PC6
122 #define SERIAL_PORT_COUNT 5
125 /*---------------------------------*/
127 /*-------------SPIs----------------*/
130 #define USE_SPI_DEVICE_1
131 #define SPI1_NSS_PIN PA4
132 #define SPI1_SCK_PIN PA5
133 #define SPI1_MISO_PIN PA6
134 #define SPI1_MOSI_PIN PA7
136 #define USE_SPI_DEVICE_3
137 #if defined(FF_PIKOF4OSD)
138 #define SPI3_NSS_PIN PA15
140 #define SPI3_NSS_PIN PB3
142 #define SPI3_SCK_PIN PC10
143 #define SPI3_MISO_PIN PC11
144 #define SPI3_MOSI_PIN PC12
145 /*---------------------------------*/
147 /*-------------ADCs----------------*/
149 #define ADC1_DMA_STREAM DMA2_Stream0
150 #define ADC_CHANNEL_1_PIN PC2
151 #define VBAT_ADC_CHANNEL ADC_CHN_1
152 #if defined(FF_PIKOF4OSD)
153 #define ADC_CHANNEL_2_PIN PC1
154 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
156 /*---------------------------------*/
158 /*-----------LED Strip-------------*/
159 #define USE_LED_STRIP
160 #define WS2811_PIN PB7
161 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_ST2_HANDLER
162 #define WS2811_DMA_STREAM DMA1_Stream2
163 #define WS2811_DMA_CHANNEL DMA_Channel_3
164 /*---------------------------------*/
166 /*-------------ESCs----------------*/
167 #define USE_ESC_SENSOR
168 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
169 #define USE_ESCSERIAL
170 #define ESCSERIAL_TIMER_TX_PIN PA3 // (HARDARE=0)
171 /*---------------------------------*/
173 /*--------DEFAULT VALUES-----------*/
174 #if defined(FF_PIKOF4OSD)
175 #define DEFAULT_FEATURES ( FEATURE_TELEMETRY | FEATURE_OSD )
177 #define SERIALRX_PROVIDER SERIALRX_SBUS
178 #define SERIALRX_UART SERIAL_PORT_USART3
180 #define TARGET_IO_PORTA 0xffff
181 #define TARGET_IO_PORTB 0xffff
182 #define TARGET_IO_PORTC 0xffff
183 #define TARGET_IO_PORTD (BIT(2))
184 /*---------------------------------*/
186 /*--------------TIMERS-------------*/
187 #if defined(FF_PIKOF4OSD)
188 #define MAX_PWM_OUTPUT_PORTS 7
190 #define MAX_PWM_OUTPUT_PORTS 5
192 /*---------------------------------*/