Move FLASH_PAGE_SIZE definition to CPU specific target.h files (#12394)
[betaflight.git] / src / main / target / STM32F411 / target.h
blob6d8e6f34d56afbc95b17e681b31d46cd19192902
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/>.
21 #pragma once
23 #include "drivers/stm32/platform_stm32.h"
25 #define TARGET_BOARD_IDENTIFIER "S411"
27 #define USBD_PRODUCT_STRING "Betaflight STM32F411"
29 #define USE_I2C_DEVICE_1
30 #define USE_I2C_DEVICE_2
31 #define USE_I2C_DEVICE_3
33 #define USE_UART1
34 #define USE_UART2
35 #define USE_UART6
37 #define SERIAL_PORT_COUNT (UNIFIED_SERIAL_PORT_COUNT + 3)
39 #define USE_INVERTER
41 #define USE_SPI_DEVICE_1
42 #define USE_SPI_DEVICE_2
43 #define USE_SPI_DEVICE_3
45 #define TARGET_IO_PORTA 0xffff
46 #define TARGET_IO_PORTB 0xffff
47 #define TARGET_IO_PORTC 0xffff
48 #define TARGET_IO_PORTD 0xffff
49 #define TARGET_IO_PORTE 0xffff
51 #define USE_I2C
52 #define I2C_FULL_RECONFIGURABILITY
54 #define USE_BEEPER
56 #ifdef USE_SDCARD
57 #define USE_SDCARD_SPI
58 #define USE_SDCARD_SDIO
59 #endif
61 #define USE_SPI
62 #define SPI_FULL_RECONFIGURABILITY
63 #define USE_SPI_DMA_ENABLE_EARLY
65 #define USE_VCP
67 #define USE_SOFTSERIAL1
68 #define USE_SOFTSERIAL2
70 #define UNIFIED_SERIAL_PORT_COUNT 3
72 #define USE_USB_DETECT
74 #define USE_ESCSERIAL
76 #define USE_ADC
78 #define USE_CUSTOM_DEFAULTS
79 #define USE_EXTI
81 #define FLASH_PAGE_SIZE ((uint32_t)0x4000) // 16K sectors