Fix STM32H750 target support (#12091)
[betaflight.git] / src / main / target / STM32H750 / target.h
blob181ded4c0502749440cdff70bbaa854819371872
1 /*
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)
8 * any later version.
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/>.
22 * This target won't actually build a target that you can boot, it is meant as
23 * a base target ONLY.
25 * When defining a target that uses this as a base you currently:
27 * 1) *must* define ALL the SPI instances that the target has, including their pins.
28 * 2) *must* define the storage subsystem used to boot, e.g. see CONFIG_IN_xxx.
29 * 3) *must* define all the settings required for the config storage system to
30 * be able to load the config at boot time BEFORE it has actually loaded a config.
31 * e.g. for QSPI define the QSPI instance, pins, mode, etc,
32 * for SDCARD define the SD card bus (SPI/SDIO), pins, etc.
36 #pragma once
38 #ifndef TARGET_BOARD_IDENTIFIER
39 #define TARGET_BOARD_IDENTIFIER "S750"
40 #endif
42 #ifndef USBD_PRODUCT_STRING
43 #define USBD_PRODUCT_STRING "Betaflight STM32H750"
44 #endif
46 #if !defined(USE_I2C)
47 #define USE_I2C
48 #define USE_I2C_DEVICE_1
49 #define USE_I2C_DEVICE_2
50 #define USE_I2C_DEVICE_3
51 #define USE_I2C_DEVICE_4
52 #define I2C_FULL_RECONFIGURABILITY
53 #endif
55 // Provide a default so that this target builds on the build server.
56 #if !defined(USE_SPI)
57 #define USE_SPI
58 #define USE_SPI_DEVICE_1
59 #define USE_SPI_DEVICE_2
60 #define USE_SPI_DEVICE_3
61 #define USE_SPI_DEVICE_4
62 #define USE_SPI_DEVICE_5
63 #define USE_SPI_DEVICE_6
64 #define SPI_FULL_RECONFIGURABILITY
65 #endif
67 #define USE_UART1
68 #define USE_UART2
69 #define USE_UART3
70 #define USE_UART4
71 #define USE_UART5
72 #define USE_UART6
73 #define USE_UART7
74 #define USE_UART8
75 #define USE_LP_UART1
77 #define SERIAL_PORT_COUNT (UNIFIED_SERIAL_PORT_COUNT + 8)
79 #define TARGET_IO_PORTA 0xffff
80 #define TARGET_IO_PORTB 0xffff
81 #define TARGET_IO_PORTC 0xffff
82 #define TARGET_IO_PORTD 0xffff
83 #define TARGET_IO_PORTE 0xffff
84 #define TARGET_IO_PORTF 0xffff
86 #define USE_BEEPER
88 #define USE_VCP
90 #define USE_SOFTSERIAL1
91 #define USE_SOFTSERIAL2
93 #define UNIFIED_SERIAL_PORT_COUNT 3
95 #define USE_USB_DETECT
97 #define USE_ESCSERIAL
99 #define USE_ADC
101 // Provide a default so that this target builds on the build server.
102 #if !defined(CONFIG_IN_RAM) && !defined(CONFIG_IN_SDCARD) && !defined(CONFIG_IN_EXTERNAL_FLASH)
103 #define CONFIG_IN_RAM
104 #endif