Remove/disable some OSD debug code
[betaflight.git] / src / main / target / SPRACINGF1OSD / target.h
blobc3c0efe03210132a62be15f75276d4811a257583
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 "SOF1"
22 #define LED0_GPIO GPIOA
23 #define LED0_PIN Pin_15 // PBA15 (LED)
24 #define LED0_PERIPHERAL RCC_APB2Periph_GPIOA
26 // FIXME The board has a bus switch, not LED1
27 #define LED1_GPIO GPIOB
28 #define LED1_PIN Pin_3 // PB3
29 #define LED1_PERIPHERAL RCC_APB2Periph_GPIOA
31 #define USE_SPI
32 #define USE_SPI_DEVICE_1
33 #define USE_SPI_DEVICE_2
35 #define SPI1_CS_GPIO GPIOA
36 #define SPI1_CS_PIN GPIO_Pin_4
38 #define SPI2_CS_GPIO GPIOB
39 #define SPI2_CS_PIN GPIO_Pin_12
41 #define M25P16_CS_GPIO SPI1_CS_GPIO
42 #define M25P16_CS_PIN SPI1_CS_PIN
43 #define M25P16_SPI_INSTANCE SPI1
45 #define MAX7456_CS_GPIO SPI2_CS_GPIO
46 #define MAX7456_CS_PIN SPI2_CS_PIN
47 #define MAX7456_SPI_INSTANCE SPI2
49 #define MAX7456_NRST_GPIO_PERIPHERAL RCC_APB2Periph_GPIOB
50 #define MAX7456_NRST_GPIO GPIOB
51 #define MAX7456_NRST_PIN Pin_2
53 #define MAX7456_LOS_GPIO_PERIPHERAL RCC_APB2Periph_GPIOC
54 #define MAX7456_LOS_GPIO GPIOC
55 #define MAX7456_LOS_PIN Pin_13
56 #define MAX7456_LOS_IO PC13
58 #define MAX7456_VSYNC_GPIO_PERIPHERAL RCC_APB2Periph_GPIOC
59 #define MAX7456_VSYNC_GPIO GPIOC
60 #define MAX7456_VSYNC_PIN Pin_14
61 #define MAX7456_VSYNC_IO PC14
63 #define MAX7456_HSYNC_GPIO_PERIPHERAL RCC_APB2Periph_GPIOC
64 #define MAX7456_HSYNC_GPIO GPIOC
65 #define MAX7456_HSYNC_PIN Pin_15
66 #define MAX7456_HSYNC_IO PC15
68 #define EXTI_CALLBACK_HANDLER_COUNT 3 // LOS, HSYNC, VSYNC
70 #define USE_FLASHFS
71 #define USE_FLASHTOOLS
72 #define USE_FLASH_M25P16
74 #define LED0
75 #define LED1
77 #define USB_IO
79 #define USE_VCP
80 #define USE_UART1
81 #define USE_UART2
82 #define SERIAL_PORT_COUNT 3
84 #define USE_MSP_CLIENT
86 #define USE_EXTI
87 #define USE_ADC
89 #define ADC_INSTANCE ADC1
90 #define ADC_ABP2_PERIPHERAL RCC_APB2Periph_ADC1
91 #define ADC_AHB_PERIPHERAL RCC_AHBPeriph_DMA1
92 #define ADC_DMA_CHANNEL DMA1_Channel1
94 // 12v
95 #define ADC0_GPIO GPIOA
96 #define ADC0_GPIO_PIN GPIO_Pin_0
97 #define ADC0_CHANNEL ADC_Channel_0
99 // 5v
100 #define ADC1_GPIO GPIOA
101 #define ADC1_GPIO_PIN GPIO_Pin_1
102 #define ADC1_CHANNEL ADC_Channel_1
104 //vbat
105 #define ADC2_GPIO GPIOA
106 #define ADC2_GPIO_PIN GPIO_Pin_2
107 #define ADC2_CHANNEL ADC_Channel_2
109 // current
110 #define ADC3_GPIO GPIOA
111 #define ADC3_GPIO_PIN GPIO_Pin_3
112 #define ADC3_CHANNEL ADC_Channel_3
114 // adc channel mapping
115 #define ADC_CHANNEL_COUNT 4
117 #define ADC_POWER_12V ADC_CHANNEL0
118 #define ADC_POWER_5V ADC_CHANNEL1
119 #define ADC_BATTERY ADC_CHANNEL2
120 #define ADC_CURRENT ADC_CHANNEL3
122 // IO - assuming all IOs on 48pin package TODO
123 #define TARGET_IO_PORTA 0xffff
124 #define TARGET_IO_PORTB 0xffff
125 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))