From 85b2cbaca616551acd4fb2e915a2cdd932d893d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=81yszczek?= Date: Tue, 27 Feb 2024 20:17:02 +0100 Subject: [PATCH] boards/stm32f411-minimum: add support for /dev/gpio* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch allows user to simply select which GPIOs he wants to use and access them via /dev/gpio_a0 or similar device with standard gpio driver. By default gpio names match pin names printed on the board. So when enabling A3 pin, it will show as /dev/gpio_a3 in runtime. This name can be changed in kconfig. User can also select pin function (input, output, interrupt) as well as standard pin settings like, pull up/down, output type pushpull/open drain etc. All pins that are exposed via boards goldpins are listed in Kconfig. Extra pins that are supported by chiip but are not exposed for easy usage are not listed. To have this nice Kconfig configuration and for things to be easily debugable/understandable it requires code to have big Kconfig and header file with all possible definitions Because of file sizes I decided to split gpio related kconfig and header into separate files. Otherwise it would really make original files hard to read and find anything. Signed-off-by: Michał Łyszczek --- boards/arm/stm32/stm32f411-minimum/Kconfig | 8 + .../arm/stm32/stm32f411-minimum/Kconfig.gpio | 2623 +++++++++++++++++ .../stm32f411-minimum/src/CMakeLists.txt | 4 + .../arm/stm32/stm32f411-minimum/src/Make.defs | 4 + .../stm32f411-minimum/src/stm32_bringup.c | 8 + .../stm32/stm32f411-minimum/src/stm32_gpio.c | 739 +++++ .../src/stm32f411-minimum-gpio.h | 1922 ++++++++++++ .../stm32f411-minimum/src/stm32f411-minimum.h | 17 + 8 files changed, 5325 insertions(+) create mode 100644 boards/arm/stm32/stm32f411-minimum/Kconfig.gpio create mode 100644 boards/arm/stm32/stm32f411-minimum/src/stm32_gpio.c create mode 100644 boards/arm/stm32/stm32f411-minimum/src/stm32f411-minimum-gpio.h diff --git a/boards/arm/stm32/stm32f411-minimum/Kconfig b/boards/arm/stm32/stm32f411-minimum/Kconfig index 06ca3fbe71..43f2f0018b 100644 --- a/boards/arm/stm32/stm32f411-minimum/Kconfig +++ b/boards/arm/stm32/stm32f411-minimum/Kconfig @@ -75,4 +75,12 @@ config STM32F411MINIMUM_HX711_DATA_PIN endif # STM32F411MINIMUM_HX711 +menuconfig STM32F411MINIMUM_GPIO + select DEV_GPIO + bool "enable gpio subsystem" + +if STM32F411MINIMUM_GPIO +source "boards/arm/stm32/stm32f411-minimum/Kconfig.gpio" +endif + endif diff --git a/boards/arm/stm32/stm32f411-minimum/Kconfig.gpio b/boards/arm/stm32/stm32f411-minimum/Kconfig.gpio new file mode 100644 index 0000000000..75da4aaf24 --- /dev/null +++ b/boards/arm/stm32/stm32f411-minimum/Kconfig.gpio @@ -0,0 +1,2623 @@ +config STM32F411MINIMUM_GPIO_A0 + bool "enable pin A0" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A0 device node. + +if STM32F411MINIMUM_GPIO_A0 + +config STM32F411MINIMUM_GPIO_A0_NAME + string "Pin name" + default "gpio_a0" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A0_OUT + +config STM32F411MINIMUM_GPIO_A0_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A0_IN + bool "input" +config STM32F411MINIMUM_GPIO_A0_INT + bool "interrupt" + +endchoice # A0 Pin type + +if STM32F411MINIMUM_GPIO_A0_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A0_OUT_OD + +config STM32F411MINIMUM_GPIO_A0_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A0_OUT_PP + bool "push pull" + +endchoice # A0 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A0_OUT_SET + +config STM32F411MINIMUM_GPIO_A0_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A0_OUT_CLEAR + bool "clear" + +endchoice # A0 output default state + +endif # STM32F411MINIMUM_GPIO_A0_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A0_PULL_UP + +config STM32F411MINIMUM_GPIO_A0_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A0_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A0_PULL_FLOAT + bool "float" + +endchoice # A0 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A0_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A0_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A0_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A0_SPEED_50MHz + bool "50MHz" + +endchoice # A0 speed + +endif # STM32F411MINIMUM_GPIO_A0 + +config STM32F411MINIMUM_GPIO_A1 + bool "enable pin A1" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A1 device node. + +if STM32F411MINIMUM_GPIO_A1 + +config STM32F411MINIMUM_GPIO_A1_NAME + string "Pin name" + default "gpio_a1" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A1_OUT + +config STM32F411MINIMUM_GPIO_A1_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A1_IN + bool "input" +config STM32F411MINIMUM_GPIO_A1_INT + bool "interrupt" + +endchoice # A1 Pin type + +if STM32F411MINIMUM_GPIO_A1_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A1_OUT_OD + +config STM32F411MINIMUM_GPIO_A1_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A1_OUT_PP + bool "push pull" + +endchoice # A1 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A1_OUT_SET + +config STM32F411MINIMUM_GPIO_A1_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A1_OUT_CLEAR + bool "clear" + +endchoice # A1 output default state + +endif # STM32F411MINIMUM_GPIO_A1_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A1_PULL_UP + +config STM32F411MINIMUM_GPIO_A1_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A1_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A1_PULL_FLOAT + bool "float" + +endchoice # A1 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A1_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A1_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A1_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A1_SPEED_50MHz + bool "50MHz" + +endchoice # A1 speed + +endif # STM32F411MINIMUM_GPIO_A1 + +config STM32F411MINIMUM_GPIO_A2 + bool "enable pin A2" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A2 device node. + +if STM32F411MINIMUM_GPIO_A2 + +config STM32F411MINIMUM_GPIO_A2_NAME + string "Pin name" + default "gpio_a2" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A2_OUT + +config STM32F411MINIMUM_GPIO_A2_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A2_IN + bool "input" +config STM32F411MINIMUM_GPIO_A2_INT + bool "interrupt" + +endchoice # A2 Pin type + +if STM32F411MINIMUM_GPIO_A2_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A2_OUT_OD + +config STM32F411MINIMUM_GPIO_A2_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A2_OUT_PP + bool "push pull" + +endchoice # A2 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A2_OUT_SET + +config STM32F411MINIMUM_GPIO_A2_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A2_OUT_CLEAR + bool "clear" + +endchoice # A2 output default state + +endif # STM32F411MINIMUM_GPIO_A2_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A2_PULL_UP + +config STM32F411MINIMUM_GPIO_A2_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A2_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A2_PULL_FLOAT + bool "float" + +endchoice # A2 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A2_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A2_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A2_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A2_SPEED_50MHz + bool "50MHz" + +endchoice # A2 speed + +endif # STM32F411MINIMUM_GPIO_A2 + +config STM32F411MINIMUM_GPIO_A3 + bool "enable pin A3" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A3 device node. + +if STM32F411MINIMUM_GPIO_A3 + +config STM32F411MINIMUM_GPIO_A3_NAME + string "Pin name" + default "gpio_a3" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A3_OUT + +config STM32F411MINIMUM_GPIO_A3_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A3_IN + bool "input" +config STM32F411MINIMUM_GPIO_A3_INT + bool "interrupt" + +endchoice # A3 Pin type + +if STM32F411MINIMUM_GPIO_A3_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A3_OUT_OD + +config STM32F411MINIMUM_GPIO_A3_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A3_OUT_PP + bool "push pull" + +endchoice # A3 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A3_OUT_SET + +config STM32F411MINIMUM_GPIO_A3_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A3_OUT_CLEAR + bool "clear" + +endchoice # A3 output default state + +endif # STM32F411MINIMUM_GPIO_A3_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A3_PULL_UP + +config STM32F411MINIMUM_GPIO_A3_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A3_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A3_PULL_FLOAT + bool "float" + +endchoice # A3 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A3_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A3_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A3_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A3_SPEED_50MHz + bool "50MHz" + +endchoice # A3 speed + +endif # STM32F411MINIMUM_GPIO_A3 + +config STM32F411MINIMUM_GPIO_A4 + bool "enable pin A4" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A4 device node. + +if STM32F411MINIMUM_GPIO_A4 + +config STM32F411MINIMUM_GPIO_A4_NAME + string "Pin name" + default "gpio_a4" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A4_OUT + +config STM32F411MINIMUM_GPIO_A4_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A4_IN + bool "input" +config STM32F411MINIMUM_GPIO_A4_INT + bool "interrupt" + +endchoice # A4 Pin type + +if STM32F411MINIMUM_GPIO_A4_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A4_OUT_OD + +config STM32F411MINIMUM_GPIO_A4_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A4_OUT_PP + bool "push pull" + +endchoice # A4 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A4_OUT_SET + +config STM32F411MINIMUM_GPIO_A4_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A4_OUT_CLEAR + bool "clear" + +endchoice # A4 output default state + +endif # STM32F411MINIMUM_GPIO_A4_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A4_PULL_UP + +config STM32F411MINIMUM_GPIO_A4_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A4_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A4_PULL_FLOAT + bool "float" + +endchoice # A4 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A4_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A4_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A4_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A4_SPEED_50MHz + bool "50MHz" + +endchoice # A4 speed + +endif # STM32F411MINIMUM_GPIO_A4 + +config STM32F411MINIMUM_GPIO_A5 + bool "enable pin A5" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A5 device node. + +if STM32F411MINIMUM_GPIO_A5 + +config STM32F411MINIMUM_GPIO_A5_NAME + string "Pin name" + default "gpio_a5" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A5_OUT + +config STM32F411MINIMUM_GPIO_A5_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A5_IN + bool "input" +config STM32F411MINIMUM_GPIO_A5_INT + bool "interrupt" + +endchoice # A5 Pin type + +if STM32F411MINIMUM_GPIO_A5_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A5_OUT_OD + +config STM32F411MINIMUM_GPIO_A5_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A5_OUT_PP + bool "push pull" + +endchoice # A5 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A5_OUT_SET + +config STM32F411MINIMUM_GPIO_A5_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A5_OUT_CLEAR + bool "clear" + +endchoice # A5 output default state + +endif # STM32F411MINIMUM_GPIO_A5_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A5_PULL_UP + +config STM32F411MINIMUM_GPIO_A5_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A5_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A5_PULL_FLOAT + bool "float" + +endchoice # A5 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A5_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A5_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A5_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A5_SPEED_50MHz + bool "50MHz" + +endchoice # A5 speed + +endif # STM32F411MINIMUM_GPIO_A5 + +config STM32F411MINIMUM_GPIO_A6 + bool "enable pin A6" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A6 device node. + +if STM32F411MINIMUM_GPIO_A6 + +config STM32F411MINIMUM_GPIO_A6_NAME + string "Pin name" + default "gpio_a6" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A6_OUT + +config STM32F411MINIMUM_GPIO_A6_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A6_IN + bool "input" +config STM32F411MINIMUM_GPIO_A6_INT + bool "interrupt" + +endchoice # A6 Pin type + +if STM32F411MINIMUM_GPIO_A6_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A6_OUT_OD + +config STM32F411MINIMUM_GPIO_A6_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A6_OUT_PP + bool "push pull" + +endchoice # A6 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A6_OUT_SET + +config STM32F411MINIMUM_GPIO_A6_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A6_OUT_CLEAR + bool "clear" + +endchoice # A6 output default state + +endif # STM32F411MINIMUM_GPIO_A6_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A6_PULL_UP + +config STM32F411MINIMUM_GPIO_A6_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A6_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A6_PULL_FLOAT + bool "float" + +endchoice # A6 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A6_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A6_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A6_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A6_SPEED_50MHz + bool "50MHz" + +endchoice # A6 speed + +endif # STM32F411MINIMUM_GPIO_A6 + +config STM32F411MINIMUM_GPIO_A7 + bool "enable pin A7" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A7 device node. + +if STM32F411MINIMUM_GPIO_A7 + +config STM32F411MINIMUM_GPIO_A7_NAME + string "Pin name" + default "gpio_a7" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A7_OUT + +config STM32F411MINIMUM_GPIO_A7_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A7_IN + bool "input" +config STM32F411MINIMUM_GPIO_A7_INT + bool "interrupt" + +endchoice # A7 Pin type + +if STM32F411MINIMUM_GPIO_A7_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A7_OUT_OD + +config STM32F411MINIMUM_GPIO_A7_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A7_OUT_PP + bool "push pull" + +endchoice # A7 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A7_OUT_SET + +config STM32F411MINIMUM_GPIO_A7_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A7_OUT_CLEAR + bool "clear" + +endchoice # A7 output default state + +endif # STM32F411MINIMUM_GPIO_A7_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A7_PULL_UP + +config STM32F411MINIMUM_GPIO_A7_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A7_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A7_PULL_FLOAT + bool "float" + +endchoice # A7 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A7_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A7_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A7_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A7_SPEED_50MHz + bool "50MHz" + +endchoice # A7 speed + +endif # STM32F411MINIMUM_GPIO_A7 + +config STM32F411MINIMUM_GPIO_A8 + bool "enable pin A8" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A8 device node. + +if STM32F411MINIMUM_GPIO_A8 + +config STM32F411MINIMUM_GPIO_A8_NAME + string "Pin name" + default "gpio_a8" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A8_OUT + +config STM32F411MINIMUM_GPIO_A8_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A8_IN + bool "input" +config STM32F411MINIMUM_GPIO_A8_INT + bool "interrupt" + +endchoice # A8 Pin type + +if STM32F411MINIMUM_GPIO_A8_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A8_OUT_OD + +config STM32F411MINIMUM_GPIO_A8_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A8_OUT_PP + bool "push pull" + +endchoice # A8 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A8_OUT_SET + +config STM32F411MINIMUM_GPIO_A8_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A8_OUT_CLEAR + bool "clear" + +endchoice # A8 output default state + +endif # STM32F411MINIMUM_GPIO_A8_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A8_PULL_UP + +config STM32F411MINIMUM_GPIO_A8_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A8_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A8_PULL_FLOAT + bool "float" + +endchoice # A8 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A8_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A8_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A8_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A8_SPEED_50MHz + bool "50MHz" + +endchoice # A8 speed + +endif # STM32F411MINIMUM_GPIO_A8 + +config STM32F411MINIMUM_GPIO_A9 + bool "enable pin A9" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A9 device node. + +if STM32F411MINIMUM_GPIO_A9 + +config STM32F411MINIMUM_GPIO_A9_NAME + string "Pin name" + default "gpio_a9" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A9_OUT + +config STM32F411MINIMUM_GPIO_A9_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A9_IN + bool "input" +config STM32F411MINIMUM_GPIO_A9_INT + bool "interrupt" + +endchoice # A9 Pin type + +if STM32F411MINIMUM_GPIO_A9_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A9_OUT_OD + +config STM32F411MINIMUM_GPIO_A9_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A9_OUT_PP + bool "push pull" + +endchoice # A9 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A9_OUT_SET + +config STM32F411MINIMUM_GPIO_A9_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A9_OUT_CLEAR + bool "clear" + +endchoice # A9 output default state + +endif # STM32F411MINIMUM_GPIO_A9_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A9_PULL_UP + +config STM32F411MINIMUM_GPIO_A9_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A9_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A9_PULL_FLOAT + bool "float" + +endchoice # A9 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A9_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A9_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A9_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A9_SPEED_50MHz + bool "50MHz" + +endchoice # A9 speed + +endif # STM32F411MINIMUM_GPIO_A9 + +config STM32F411MINIMUM_GPIO_A10 + bool "enable pin A10" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A10 device node. + +if STM32F411MINIMUM_GPIO_A10 + +config STM32F411MINIMUM_GPIO_A10_NAME + string "Pin name" + default "gpio_a10" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A10_OUT + +config STM32F411MINIMUM_GPIO_A10_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A10_IN + bool "input" +config STM32F411MINIMUM_GPIO_A10_INT + bool "interrupt" + +endchoice # A10 Pin type + +if STM32F411MINIMUM_GPIO_A10_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A10_OUT_OD + +config STM32F411MINIMUM_GPIO_A10_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A10_OUT_PP + bool "push pull" + +endchoice # A10 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A10_OUT_SET + +config STM32F411MINIMUM_GPIO_A10_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A10_OUT_CLEAR + bool "clear" + +endchoice # A10 output default state + +endif # STM32F411MINIMUM_GPIO_A10_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A10_PULL_UP + +config STM32F411MINIMUM_GPIO_A10_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A10_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A10_PULL_FLOAT + bool "float" + +endchoice # A10 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A10_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A10_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A10_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A10_SPEED_50MHz + bool "50MHz" + +endchoice # A10 speed + +endif # STM32F411MINIMUM_GPIO_A10 + +config STM32F411MINIMUM_GPIO_A11 + bool "enable pin A11" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A11 device node. + +if STM32F411MINIMUM_GPIO_A11 + +config STM32F411MINIMUM_GPIO_A11_NAME + string "Pin name" + default "gpio_a11" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A11_OUT + +config STM32F411MINIMUM_GPIO_A11_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A11_IN + bool "input" +config STM32F411MINIMUM_GPIO_A11_INT + bool "interrupt" + +endchoice # A11 Pin type + +if STM32F411MINIMUM_GPIO_A11_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A11_OUT_OD + +config STM32F411MINIMUM_GPIO_A11_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A11_OUT_PP + bool "push pull" + +endchoice # A11 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A11_OUT_SET + +config STM32F411MINIMUM_GPIO_A11_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A11_OUT_CLEAR + bool "clear" + +endchoice # A11 output default state + +endif # STM32F411MINIMUM_GPIO_A11_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A11_PULL_UP + +config STM32F411MINIMUM_GPIO_A11_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A11_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A11_PULL_FLOAT + bool "float" + +endchoice # A11 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A11_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A11_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A11_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A11_SPEED_50MHz + bool "50MHz" + +endchoice # A11 speed + +endif # STM32F411MINIMUM_GPIO_A11 + +config STM32F411MINIMUM_GPIO_A12 + bool "enable pin A12" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A12 device node. + +if STM32F411MINIMUM_GPIO_A12 + +config STM32F411MINIMUM_GPIO_A12_NAME + string "Pin name" + default "gpio_a12" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A12_OUT + +config STM32F411MINIMUM_GPIO_A12_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A12_IN + bool "input" +config STM32F411MINIMUM_GPIO_A12_INT + bool "interrupt" + +endchoice # A12 Pin type + +if STM32F411MINIMUM_GPIO_A12_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A12_OUT_OD + +config STM32F411MINIMUM_GPIO_A12_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A12_OUT_PP + bool "push pull" + +endchoice # A12 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A12_OUT_SET + +config STM32F411MINIMUM_GPIO_A12_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A12_OUT_CLEAR + bool "clear" + +endchoice # A12 output default state + +endif # STM32F411MINIMUM_GPIO_A12_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A12_PULL_UP + +config STM32F411MINIMUM_GPIO_A12_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A12_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A12_PULL_FLOAT + bool "float" + +endchoice # A12 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A12_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A12_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A12_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A12_SPEED_50MHz + bool "50MHz" + +endchoice # A12 speed + +endif # STM32F411MINIMUM_GPIO_A12 + +config STM32F411MINIMUM_GPIO_A15 + bool "enable pin A15" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_A15 device node. + +if STM32F411MINIMUM_GPIO_A15 + +config STM32F411MINIMUM_GPIO_A15_NAME + string "Pin name" + default "gpio_a15" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_A15_OUT + +config STM32F411MINIMUM_GPIO_A15_OUT + bool "output" +config STM32F411MINIMUM_GPIO_A15_IN + bool "input" +config STM32F411MINIMUM_GPIO_A15_INT + bool "interrupt" + +endchoice # A15 Pin type + +if STM32F411MINIMUM_GPIO_A15_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_A15_OUT_OD + +config STM32F411MINIMUM_GPIO_A15_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_A15_OUT_PP + bool "push pull" + +endchoice # A15 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_A15_OUT_SET + +config STM32F411MINIMUM_GPIO_A15_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_A15_OUT_CLEAR + bool "clear" + +endchoice # A15 output default state + +endif # STM32F411MINIMUM_GPIO_A15_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_A15_PULL_UP + +config STM32F411MINIMUM_GPIO_A15_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_A15_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_A15_PULL_FLOAT + bool "float" + +endchoice # A15 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_A15_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_A15_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_A15_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_A15_SPEED_50MHz + bool "50MHz" + +endchoice # A15 speed + +endif # STM32F411MINIMUM_GPIO_A15 + +config STM32F411MINIMUM_GPIO_B0 + bool "enable pin B0" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B0 device node. + +if STM32F411MINIMUM_GPIO_B0 + +config STM32F411MINIMUM_GPIO_B0_NAME + string "Pin name" + default "gpio_b0" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B0_OUT + +config STM32F411MINIMUM_GPIO_B0_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B0_IN + bool "input" +config STM32F411MINIMUM_GPIO_B0_INT + bool "interrupt" + +endchoice # B0 Pin type + +if STM32F411MINIMUM_GPIO_B0_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B0_OUT_OD + +config STM32F411MINIMUM_GPIO_B0_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B0_OUT_PP + bool "push pull" + +endchoice # B0 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B0_OUT_SET + +config STM32F411MINIMUM_GPIO_B0_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B0_OUT_CLEAR + bool "clear" + +endchoice # B0 output default state + +endif # STM32F411MINIMUM_GPIO_B0_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B0_PULL_UP + +config STM32F411MINIMUM_GPIO_B0_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B0_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B0_PULL_FLOAT + bool "float" + +endchoice # B0 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B0_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B0_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B0_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B0_SPEED_50MHz + bool "50MHz" + +endchoice # B0 speed + +endif # STM32F411MINIMUM_GPIO_B0 + +config STM32F411MINIMUM_GPIO_B1 + bool "enable pin B1" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B1 device node. + +if STM32F411MINIMUM_GPIO_B1 + +config STM32F411MINIMUM_GPIO_B1_NAME + string "Pin name" + default "gpio_b1" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B1_OUT + +config STM32F411MINIMUM_GPIO_B1_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B1_IN + bool "input" +config STM32F411MINIMUM_GPIO_B1_INT + bool "interrupt" + +endchoice # B1 Pin type + +if STM32F411MINIMUM_GPIO_B1_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B1_OUT_OD + +config STM32F411MINIMUM_GPIO_B1_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B1_OUT_PP + bool "push pull" + +endchoice # B1 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B1_OUT_SET + +config STM32F411MINIMUM_GPIO_B1_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B1_OUT_CLEAR + bool "clear" + +endchoice # B1 output default state + +endif # STM32F411MINIMUM_GPIO_B1_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B1_PULL_UP + +config STM32F411MINIMUM_GPIO_B1_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B1_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B1_PULL_FLOAT + bool "float" + +endchoice # B1 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B1_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B1_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B1_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B1_SPEED_50MHz + bool "50MHz" + +endchoice # B1 speed + +endif # STM32F411MINIMUM_GPIO_B1 + +config STM32F411MINIMUM_GPIO_B2 + bool "enable pin B2" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B2 device node. + +if STM32F411MINIMUM_GPIO_B2 + +config STM32F411MINIMUM_GPIO_B2_NAME + string "Pin name" + default "gpio_b2" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B2_OUT + +config STM32F411MINIMUM_GPIO_B2_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B2_IN + bool "input" +config STM32F411MINIMUM_GPIO_B2_INT + bool "interrupt" + +endchoice # B2 Pin type + +if STM32F411MINIMUM_GPIO_B2_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B2_OUT_OD + +config STM32F411MINIMUM_GPIO_B2_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B2_OUT_PP + bool "push pull" + +endchoice # B2 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B2_OUT_SET + +config STM32F411MINIMUM_GPIO_B2_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B2_OUT_CLEAR + bool "clear" + +endchoice # B2 output default state + +endif # STM32F411MINIMUM_GPIO_B2_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B2_PULL_UP + +config STM32F411MINIMUM_GPIO_B2_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B2_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B2_PULL_FLOAT + bool "float" + +endchoice # B2 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B2_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B2_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B2_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B2_SPEED_50MHz + bool "50MHz" + +endchoice # B2 speed + +endif # STM32F411MINIMUM_GPIO_B2 + +config STM32F411MINIMUM_GPIO_B3 + bool "enable pin B3" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B3 device node. + +if STM32F411MINIMUM_GPIO_B3 + +config STM32F411MINIMUM_GPIO_B3_NAME + string "Pin name" + default "gpio_b3" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B3_OUT + +config STM32F411MINIMUM_GPIO_B3_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B3_IN + bool "input" +config STM32F411MINIMUM_GPIO_B3_INT + bool "interrupt" + +endchoice # B3 Pin type + +if STM32F411MINIMUM_GPIO_B3_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B3_OUT_OD + +config STM32F411MINIMUM_GPIO_B3_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B3_OUT_PP + bool "push pull" + +endchoice # B3 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B3_OUT_SET + +config STM32F411MINIMUM_GPIO_B3_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B3_OUT_CLEAR + bool "clear" + +endchoice # B3 output default state + +endif # STM32F411MINIMUM_GPIO_B3_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B3_PULL_UP + +config STM32F411MINIMUM_GPIO_B3_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B3_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B3_PULL_FLOAT + bool "float" + +endchoice # B3 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B3_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B3_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B3_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B3_SPEED_50MHz + bool "50MHz" + +endchoice # B3 speed + +endif # STM32F411MINIMUM_GPIO_B3 + +config STM32F411MINIMUM_GPIO_B4 + bool "enable pin B4" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B4 device node. + +if STM32F411MINIMUM_GPIO_B4 + +config STM32F411MINIMUM_GPIO_B4_NAME + string "Pin name" + default "gpio_b4" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B4_OUT + +config STM32F411MINIMUM_GPIO_B4_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B4_IN + bool "input" +config STM32F411MINIMUM_GPIO_B4_INT + bool "interrupt" + +endchoice # B4 Pin type + +if STM32F411MINIMUM_GPIO_B4_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B4_OUT_OD + +config STM32F411MINIMUM_GPIO_B4_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B4_OUT_PP + bool "push pull" + +endchoice # B4 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B4_OUT_SET + +config STM32F411MINIMUM_GPIO_B4_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B4_OUT_CLEAR + bool "clear" + +endchoice # B4 output default state + +endif # STM32F411MINIMUM_GPIO_B4_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B4_PULL_UP + +config STM32F411MINIMUM_GPIO_B4_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B4_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B4_PULL_FLOAT + bool "float" + +endchoice # B4 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B4_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B4_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B4_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B4_SPEED_50MHz + bool "50MHz" + +endchoice # B4 speed + +endif # STM32F411MINIMUM_GPIO_B4 + +config STM32F411MINIMUM_GPIO_B5 + bool "enable pin B5" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B5 device node. + +if STM32F411MINIMUM_GPIO_B5 + +config STM32F411MINIMUM_GPIO_B5_NAME + string "Pin name" + default "gpio_b5" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B5_OUT + +config STM32F411MINIMUM_GPIO_B5_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B5_IN + bool "input" +config STM32F411MINIMUM_GPIO_B5_INT + bool "interrupt" + +endchoice # B5 Pin type + +if STM32F411MINIMUM_GPIO_B5_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B5_OUT_OD + +config STM32F411MINIMUM_GPIO_B5_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B5_OUT_PP + bool "push pull" + +endchoice # B5 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B5_OUT_SET + +config STM32F411MINIMUM_GPIO_B5_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B5_OUT_CLEAR + bool "clear" + +endchoice # B5 output default state + +endif # STM32F411MINIMUM_GPIO_B5_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B5_PULL_UP + +config STM32F411MINIMUM_GPIO_B5_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B5_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B5_PULL_FLOAT + bool "float" + +endchoice # B5 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B5_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B5_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B5_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B5_SPEED_50MHz + bool "50MHz" + +endchoice # B5 speed + +endif # STM32F411MINIMUM_GPIO_B5 + +config STM32F411MINIMUM_GPIO_B6 + bool "enable pin B6" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B6 device node. + +if STM32F411MINIMUM_GPIO_B6 + +config STM32F411MINIMUM_GPIO_B6_NAME + string "Pin name" + default "gpio_b6" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B6_OUT + +config STM32F411MINIMUM_GPIO_B6_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B6_IN + bool "input" +config STM32F411MINIMUM_GPIO_B6_INT + bool "interrupt" + +endchoice # B6 Pin type + +if STM32F411MINIMUM_GPIO_B6_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B6_OUT_OD + +config STM32F411MINIMUM_GPIO_B6_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B6_OUT_PP + bool "push pull" + +endchoice # B6 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B6_OUT_SET + +config STM32F411MINIMUM_GPIO_B6_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B6_OUT_CLEAR + bool "clear" + +endchoice # B6 output default state + +endif # STM32F411MINIMUM_GPIO_B6_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B6_PULL_UP + +config STM32F411MINIMUM_GPIO_B6_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B6_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B6_PULL_FLOAT + bool "float" + +endchoice # B6 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B6_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B6_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B6_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B6_SPEED_50MHz + bool "50MHz" + +endchoice # B6 speed + +endif # STM32F411MINIMUM_GPIO_B6 + +config STM32F411MINIMUM_GPIO_B7 + bool "enable pin B7" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B7 device node. + +if STM32F411MINIMUM_GPIO_B7 + +config STM32F411MINIMUM_GPIO_B7_NAME + string "Pin name" + default "gpio_b7" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B7_OUT + +config STM32F411MINIMUM_GPIO_B7_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B7_IN + bool "input" +config STM32F411MINIMUM_GPIO_B7_INT + bool "interrupt" + +endchoice # B7 Pin type + +if STM32F411MINIMUM_GPIO_B7_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B7_OUT_OD + +config STM32F411MINIMUM_GPIO_B7_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B7_OUT_PP + bool "push pull" + +endchoice # B7 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B7_OUT_SET + +config STM32F411MINIMUM_GPIO_B7_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B7_OUT_CLEAR + bool "clear" + +endchoice # B7 output default state + +endif # STM32F411MINIMUM_GPIO_B7_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B7_PULL_UP + +config STM32F411MINIMUM_GPIO_B7_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B7_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B7_PULL_FLOAT + bool "float" + +endchoice # B7 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B7_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B7_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B7_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B7_SPEED_50MHz + bool "50MHz" + +endchoice # B7 speed + +endif # STM32F411MINIMUM_GPIO_B7 + +config STM32F411MINIMUM_GPIO_B8 + bool "enable pin B8" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B8 device node. + +if STM32F411MINIMUM_GPIO_B8 + +config STM32F411MINIMUM_GPIO_B8_NAME + string "Pin name" + default "gpio_b8" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B8_OUT + +config STM32F411MINIMUM_GPIO_B8_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B8_IN + bool "input" +config STM32F411MINIMUM_GPIO_B8_INT + bool "interrupt" + +endchoice # B8 Pin type + +if STM32F411MINIMUM_GPIO_B8_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B8_OUT_OD + +config STM32F411MINIMUM_GPIO_B8_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B8_OUT_PP + bool "push pull" + +endchoice # B8 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B8_OUT_SET + +config STM32F411MINIMUM_GPIO_B8_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B8_OUT_CLEAR + bool "clear" + +endchoice # B8 output default state + +endif # STM32F411MINIMUM_GPIO_B8_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B8_PULL_UP + +config STM32F411MINIMUM_GPIO_B8_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B8_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B8_PULL_FLOAT + bool "float" + +endchoice # B8 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B8_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B8_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B8_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B8_SPEED_50MHz + bool "50MHz" + +endchoice # B8 speed + +endif # STM32F411MINIMUM_GPIO_B8 + +config STM32F411MINIMUM_GPIO_B9 + bool "enable pin B9" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B9 device node. + +if STM32F411MINIMUM_GPIO_B9 + +config STM32F411MINIMUM_GPIO_B9_NAME + string "Pin name" + default "gpio_b9" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B9_OUT + +config STM32F411MINIMUM_GPIO_B9_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B9_IN + bool "input" +config STM32F411MINIMUM_GPIO_B9_INT + bool "interrupt" + +endchoice # B9 Pin type + +if STM32F411MINIMUM_GPIO_B9_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B9_OUT_OD + +config STM32F411MINIMUM_GPIO_B9_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B9_OUT_PP + bool "push pull" + +endchoice # B9 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B9_OUT_SET + +config STM32F411MINIMUM_GPIO_B9_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B9_OUT_CLEAR + bool "clear" + +endchoice # B9 output default state + +endif # STM32F411MINIMUM_GPIO_B9_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B9_PULL_UP + +config STM32F411MINIMUM_GPIO_B9_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B9_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B9_PULL_FLOAT + bool "float" + +endchoice # B9 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B9_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B9_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B9_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B9_SPEED_50MHz + bool "50MHz" + +endchoice # B9 speed + +endif # STM32F411MINIMUM_GPIO_B9 + +config STM32F411MINIMUM_GPIO_B10 + bool "enable pin B10" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B10 device node. + +if STM32F411MINIMUM_GPIO_B10 + +config STM32F411MINIMUM_GPIO_B10_NAME + string "Pin name" + default "gpio_b10" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B10_OUT + +config STM32F411MINIMUM_GPIO_B10_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B10_IN + bool "input" +config STM32F411MINIMUM_GPIO_B10_INT + bool "interrupt" + +endchoice # B10 Pin type + +if STM32F411MINIMUM_GPIO_B10_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B10_OUT_OD + +config STM32F411MINIMUM_GPIO_B10_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B10_OUT_PP + bool "push pull" + +endchoice # B10 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B10_OUT_SET + +config STM32F411MINIMUM_GPIO_B10_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B10_OUT_CLEAR + bool "clear" + +endchoice # B10 output default state + +endif # STM32F411MINIMUM_GPIO_B10_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B10_PULL_UP + +config STM32F411MINIMUM_GPIO_B10_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B10_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B10_PULL_FLOAT + bool "float" + +endchoice # B10 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B10_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B10_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B10_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B10_SPEED_50MHz + bool "50MHz" + +endchoice # B10 speed + +endif # STM32F411MINIMUM_GPIO_B10 + +config STM32F411MINIMUM_GPIO_B12 + bool "enable pin B12" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B12 device node. + +if STM32F411MINIMUM_GPIO_B12 + +config STM32F411MINIMUM_GPIO_B12_NAME + string "Pin name" + default "gpio_b12" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B12_OUT + +config STM32F411MINIMUM_GPIO_B12_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B12_IN + bool "input" +config STM32F411MINIMUM_GPIO_B12_INT + bool "interrupt" + +endchoice # B12 Pin type + +if STM32F411MINIMUM_GPIO_B12_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B12_OUT_OD + +config STM32F411MINIMUM_GPIO_B12_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B12_OUT_PP + bool "push pull" + +endchoice # B12 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B12_OUT_SET + +config STM32F411MINIMUM_GPIO_B12_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B12_OUT_CLEAR + bool "clear" + +endchoice # B12 output default state + +endif # STM32F411MINIMUM_GPIO_B12_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B12_PULL_UP + +config STM32F411MINIMUM_GPIO_B12_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B12_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B12_PULL_FLOAT + bool "float" + +endchoice # B12 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B12_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B12_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B12_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B12_SPEED_50MHz + bool "50MHz" + +endchoice # B12 speed + +endif # STM32F411MINIMUM_GPIO_B12 + +config STM32F411MINIMUM_GPIO_B13 + bool "enable pin B13" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B13 device node. + +if STM32F411MINIMUM_GPIO_B13 + +config STM32F411MINIMUM_GPIO_B13_NAME + string "Pin name" + default "gpio_b13" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B13_OUT + +config STM32F411MINIMUM_GPIO_B13_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B13_IN + bool "input" +config STM32F411MINIMUM_GPIO_B13_INT + bool "interrupt" + +endchoice # B13 Pin type + +if STM32F411MINIMUM_GPIO_B13_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B13_OUT_OD + +config STM32F411MINIMUM_GPIO_B13_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B13_OUT_PP + bool "push pull" + +endchoice # B13 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B13_OUT_SET + +config STM32F411MINIMUM_GPIO_B13_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B13_OUT_CLEAR + bool "clear" + +endchoice # B13 output default state + +endif # STM32F411MINIMUM_GPIO_B13_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B13_PULL_UP + +config STM32F411MINIMUM_GPIO_B13_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B13_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B13_PULL_FLOAT + bool "float" + +endchoice # B13 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B13_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B13_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B13_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B13_SPEED_50MHz + bool "50MHz" + +endchoice # B13 speed + +endif # STM32F411MINIMUM_GPIO_B13 + +config STM32F411MINIMUM_GPIO_B14 + bool "enable pin B14" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B14 device node. + +if STM32F411MINIMUM_GPIO_B14 + +config STM32F411MINIMUM_GPIO_B14_NAME + string "Pin name" + default "gpio_b14" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B14_OUT + +config STM32F411MINIMUM_GPIO_B14_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B14_IN + bool "input" +config STM32F411MINIMUM_GPIO_B14_INT + bool "interrupt" + +endchoice # B14 Pin type + +if STM32F411MINIMUM_GPIO_B14_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B14_OUT_OD + +config STM32F411MINIMUM_GPIO_B14_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B14_OUT_PP + bool "push pull" + +endchoice # B14 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B14_OUT_SET + +config STM32F411MINIMUM_GPIO_B14_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B14_OUT_CLEAR + bool "clear" + +endchoice # B14 output default state + +endif # STM32F411MINIMUM_GPIO_B14_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B14_PULL_UP + +config STM32F411MINIMUM_GPIO_B14_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B14_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B14_PULL_FLOAT + bool "float" + +endchoice # B14 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B14_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B14_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B14_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B14_SPEED_50MHz + bool "50MHz" + +endchoice # B14 speed + +endif # STM32F411MINIMUM_GPIO_B14 + +config STM32F411MINIMUM_GPIO_B15 + bool "enable pin B15" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_B15 device node. + +if STM32F411MINIMUM_GPIO_B15 + +config STM32F411MINIMUM_GPIO_B15_NAME + string "Pin name" + default "gpio_b15" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_B15_OUT + +config STM32F411MINIMUM_GPIO_B15_OUT + bool "output" +config STM32F411MINIMUM_GPIO_B15_IN + bool "input" +config STM32F411MINIMUM_GPIO_B15_INT + bool "interrupt" + +endchoice # B15 Pin type + +if STM32F411MINIMUM_GPIO_B15_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_B15_OUT_OD + +config STM32F411MINIMUM_GPIO_B15_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_B15_OUT_PP + bool "push pull" + +endchoice # B15 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_B15_OUT_SET + +config STM32F411MINIMUM_GPIO_B15_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_B15_OUT_CLEAR + bool "clear" + +endchoice # B15 output default state + +endif # STM32F411MINIMUM_GPIO_B15_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_B15_PULL_UP + +config STM32F411MINIMUM_GPIO_B15_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_B15_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_B15_PULL_FLOAT + bool "float" + +endchoice # B15 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_B15_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_B15_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_B15_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_B15_SPEED_50MHz + bool "50MHz" + +endchoice # B15 speed + +endif # STM32F411MINIMUM_GPIO_B15 + +config STM32F411MINIMUM_GPIO_C13 + bool "enable pin C13" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_C13 device node. + +if STM32F411MINIMUM_GPIO_C13 + +config STM32F411MINIMUM_GPIO_C13_NAME + string "Pin name" + default "gpio_c13" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_C13_OUT + +config STM32F411MINIMUM_GPIO_C13_OUT + bool "output" +config STM32F411MINIMUM_GPIO_C13_IN + bool "input" +config STM32F411MINIMUM_GPIO_C13_INT + bool "interrupt" + +endchoice # C13 Pin type + +if STM32F411MINIMUM_GPIO_C13_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_C13_OUT_OD + +config STM32F411MINIMUM_GPIO_C13_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_C13_OUT_PP + bool "push pull" + +endchoice # C13 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_C13_OUT_SET + +config STM32F411MINIMUM_GPIO_C13_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_C13_OUT_CLEAR + bool "clear" + +endchoice # C13 output default state + +endif # STM32F411MINIMUM_GPIO_C13_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_C13_PULL_UP + +config STM32F411MINIMUM_GPIO_C13_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_C13_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_C13_PULL_FLOAT + bool "float" + +endchoice # C13 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_C13_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_C13_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_C13_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_C13_SPEED_50MHz + bool "50MHz" + +endchoice # C13 speed + +endif # STM32F411MINIMUM_GPIO_C13 + +config STM32F411MINIMUM_GPIO_C14 + bool "enable pin C14" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_C14 device node. + +if STM32F411MINIMUM_GPIO_C14 + +config STM32F411MINIMUM_GPIO_C14_NAME + string "Pin name" + default "gpio_c14" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_C14_OUT + +config STM32F411MINIMUM_GPIO_C14_OUT + bool "output" +config STM32F411MINIMUM_GPIO_C14_IN + bool "input" +config STM32F411MINIMUM_GPIO_C14_INT + bool "interrupt" + +endchoice # C14 Pin type + +if STM32F411MINIMUM_GPIO_C14_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_C14_OUT_OD + +config STM32F411MINIMUM_GPIO_C14_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_C14_OUT_PP + bool "push pull" + +endchoice # C14 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_C14_OUT_SET + +config STM32F411MINIMUM_GPIO_C14_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_C14_OUT_CLEAR + bool "clear" + +endchoice # C14 output default state + +endif # STM32F411MINIMUM_GPIO_C14_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_C14_PULL_UP + +config STM32F411MINIMUM_GPIO_C14_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_C14_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_C14_PULL_FLOAT + bool "float" + +endchoice # C14 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_C14_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_C14_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_C14_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_C14_SPEED_50MHz + bool "50MHz" + +endchoice # C14 speed + +endif # STM32F411MINIMUM_GPIO_C14 + +config STM32F411MINIMUM_GPIO_C15 + bool "enable pin C15" + ---help--- + Assume direct control over this pin. You will not be able to use this + pin for anything else other than general input/output access via + /dev/gpio_C15 device node. + +if STM32F411MINIMUM_GPIO_C15 + +config STM32F411MINIMUM_GPIO_C15_NAME + string "Pin name" + default "gpio_c15" + ---help--- + Pin name, it will accessible via /dev/%s file + +choice + prompt "Pin type" + default STM32F411MINIMUM_GPIO_C15_OUT + +config STM32F411MINIMUM_GPIO_C15_OUT + bool "output" +config STM32F411MINIMUM_GPIO_C15_IN + bool "input" +config STM32F411MINIMUM_GPIO_C15_INT + bool "interrupt" + +endchoice # C15 Pin type + +if STM32F411MINIMUM_GPIO_C15_OUT + +choice + prompt "output type" + default STM32F411MINIMUM_GPIO_C15_OUT_OD + +config STM32F411MINIMUM_GPIO_C15_OUT_OD + bool "open drain" +config STM32F411MINIMUM_GPIO_C15_OUT_PP + bool "push pull" + +endchoice # C15 output type + +choice + prompt "default state" + default STM32F411MINIMUM_GPIO_C15_OUT_SET + +config STM32F411MINIMUM_GPIO_C15_OUT_SET + bool "set" +config STM32F411MINIMUM_GPIO_C15_OUT_CLEAR + bool "clear" + +endchoice # C15 output default state + +endif # STM32F411MINIMUM_GPIO_C15_OUT + +choice + prompt "pull" + default STM32F411MINIMUM_GPIO_C15_PULL_UP + +config STM32F411MINIMUM_GPIO_C15_PULL_UP + bool "pull up" +config STM32F411MINIMUM_GPIO_C15_PULL_DOWN + bool "pull down" +config STM32F411MINIMUM_GPIO_C15_PULL_FLOAT + bool "float" + +endchoice # C15 pull + +choice + prompt "speed" + default STM32F411MINIMUM_GPIO_C15_SPEED_2MHz + +config STM32F411MINIMUM_GPIO_C15_SPEED_2MHz + bool "2MHz" +config STM32F411MINIMUM_GPIO_C15_SPEED_25MHz + bool "25MHz" +config STM32F411MINIMUM_GPIO_C15_SPEED_50MHz + bool "50MHz" + +endchoice # C15 speed + +endif # STM32F411MINIMUM_GPIO_C15 diff --git a/boards/arm/stm32/stm32f411-minimum/src/CMakeLists.txt b/boards/arm/stm32/stm32f411-minimum/src/CMakeLists.txt index d117ba809d..6dd6b45ddd 100644 --- a/boards/arm/stm32/stm32f411-minimum/src/CMakeLists.txt +++ b/boards/arm/stm32/stm32f411-minimum/src/CMakeLists.txt @@ -44,6 +44,10 @@ if(CONFIG_USBDEV_COMPOSITE) list(APPEND SRCS stm32_composite.c) endif() +if(CONFIG_STM32F411MINIMUM_GPIO) + list(APPEND SRCS stm32_gpio.c) +endif() + if(CONFIG_USBMSC) list(APPEND SRCS stm32_usbmsc.c) endif() diff --git a/boards/arm/stm32/stm32f411-minimum/src/Make.defs b/boards/arm/stm32/stm32f411-minimum/src/Make.defs index 25d82b2765..c95bd96278 100644 --- a/boards/arm/stm32/stm32f411-minimum/src/Make.defs +++ b/boards/arm/stm32/stm32f411-minimum/src/Make.defs @@ -38,6 +38,10 @@ ifeq ($(CONFIG_SPI),y) CSRCS += stm32_spi.c endif +ifeq ($(CONFIG_STM32F411MINIMUM_GPIO),y) + CSRCS += stm32_gpio.c +endif + ifeq ($(CONFIG_MTD_W25),y) CSRCS += stm32_w25.c endif diff --git a/boards/arm/stm32/stm32f411-minimum/src/stm32_bringup.c b/boards/arm/stm32/stm32f411-minimum/src/stm32_bringup.c index 7a41bffee0..3acbb2187c 100644 --- a/boards/arm/stm32/stm32f411-minimum/src/stm32_bringup.c +++ b/boards/arm/stm32/stm32f411-minimum/src/stm32_bringup.c @@ -84,6 +84,14 @@ int stm32_bringup(void) { int ret = OK; +#ifdef CONFIG_STM32F411MINIMUM_GPIO + ret = stm32_gpio_initialize(); + if (ret != OK) + { + gerr("ERROR: Failed to initialize gpio: %d\n", ret); + } +#endif + #ifdef CONFIG_ADC_HX711 ret = stm32_hx711_initialize(); if (ret != OK) diff --git a/boards/arm/stm32/stm32f411-minimum/src/stm32_gpio.c b/boards/arm/stm32/stm32f411-minimum/src/stm32_gpio.c new file mode 100644 index 0000000000..b62eff079b --- /dev/null +++ b/boards/arm/stm32/stm32f411-minimum/src/stm32_gpio.c @@ -0,0 +1,739 @@ +/**************************************************************************** + * boards/arm/stm32/stm32f411-minimum/src/stm32_gpio.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include +#include + +#include + +#include "chip.h" +#include "stm32.h" +#include "stm32f411-minimum.h" + +#if defined(CONFIG_DEV_GPIO) && !defined(CONFIG_GPIO_LOWER_HALF) + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +struct stm32gpio_dev_s +{ + struct gpio_dev_s gpio; + uint8_t id; +}; + +struct stm32gpint_dev_s +{ + struct stm32gpio_dev_s stm32gpio; + pin_interrupt_t callback; +}; + +struct stm32gpio_info_s +{ + uint32_t pin; + const char *pinname; /* Holds pin name like gpio_a0, gpio_custom_name */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +#if BOARD_NGPIO_IN > 0 +static int gpin_read(struct gpio_dev_s *dev, bool *value); +#endif + +#if BOARD_NGPIO_OUT > 0 +static int gpout_read(struct gpio_dev_s *dev, bool *value); +static int gpout_write(struct gpio_dev_s *dev, bool value); +#endif + +#if BOARD_NGPIO_INT > 0 +static int gpint_read(struct gpio_dev_s *dev, bool *value); +static int gpint_enable(struct gpio_dev_s *dev, bool enable); +static int gpint_attach(struct gpio_dev_s *dev, pin_interrupt_t callback); +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +#if BOARD_NGPIO_IN > 0 +static const struct gpio_operations_s gpin_ops = +{ + .go_read = gpin_read, + .go_write = NULL, + .go_attach = NULL, + .go_enable = NULL, +}; + +static struct stm32gpio_dev_s g_gpin[BOARD_NGPIO_IN]; +static const struct stm32gpio_info_s g_gpio_inputs[BOARD_NGPIO_IN] = +{ +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A0_IN + { .pin = GPIO_A0_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A0_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A1_IN + { .pin = GPIO_A1_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A1_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A2_IN + { .pin = GPIO_A2_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A2_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A3_IN + { .pin = GPIO_A3_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A3_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A4_IN + { .pin = GPIO_A4_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A4_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A5_IN + { .pin = GPIO_A5_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A5_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A6_IN + { .pin = GPIO_A6_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A6_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A7_IN + { .pin = GPIO_A7_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A7_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A8_IN + { .pin = GPIO_A8_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A8_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A9_IN + { .pin = GPIO_A9_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A9_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A10_IN + { .pin = GPIO_A10_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A10_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A11_IN + { .pin = GPIO_A11_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A11_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A12_IN + { .pin = GPIO_A12_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A12_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A15_IN + { .pin = GPIO_A15_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A15_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B0_IN + { .pin = GPIO_B0_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B0_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B1_IN + { .pin = GPIO_B1_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B1_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B2_IN + { .pin = GPIO_B2_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B2_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B3_IN + { .pin = GPIO_B3_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B3_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B4_IN + { .pin = GPIO_B4_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B4_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B5_IN + { .pin = GPIO_B5_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B5_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B6_IN + { .pin = GPIO_B6_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B6_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B7_IN + { .pin = GPIO_B7_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B7_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B8_IN + { .pin = GPIO_B8_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B8_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B9_IN + { .pin = GPIO_B9_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B9_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B10_IN + { .pin = GPIO_B10_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B10_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B12_IN + { .pin = GPIO_B12_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B12_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B13_IN + { .pin = GPIO_B13_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B13_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B14_IN + { .pin = GPIO_B14_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B14_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B15_IN + { .pin = GPIO_B15_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B15_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_C13_IN + { .pin = GPIO_C13_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_C13_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_C14_IN + { .pin = GPIO_C14_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_C14_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_C15_IN + { .pin = GPIO_C15_IN, .pinname = CONFIG_STM32F411MINIMUM_GPIO_C15_NAME }, +#endif +}; +#endif /* BOARD_NGPIO_IN > 0 */ + +#if BOARD_NGPIO_OUT > 0 +static const struct gpio_operations_s gpout_ops = +{ + .go_read = gpout_read, + .go_write = gpout_write, + .go_attach = NULL, + .go_enable = NULL, +}; + +static struct stm32gpio_dev_s g_gpout[BOARD_NGPIO_OUT]; +static const struct stm32gpio_info_s g_gpio_outputs[BOARD_NGPIO_OUT] = +{ +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A0_OUT + { .pin = GPIO_A0_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A0_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A1_OUT + { .pin = GPIO_A1_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A1_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A2_OUT + { .pin = GPIO_A2_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A2_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A3_OUT + { .pin = GPIO_A3_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A3_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A4_OUT + { .pin = GPIO_A4_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A4_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A5_OUT + { .pin = GPIO_A5_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A5_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A6_OUT + { .pin = GPIO_A6_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A6_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A7_OUT + { .pin = GPIO_A7_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A7_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A8_OUT + { .pin = GPIO_A8_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A8_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A9_OUT + { .pin = GPIO_A9_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A9_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A10_OUT + { .pin = GPIO_A10_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A10_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A11_OUT + { .pin = GPIO_A11_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A11_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A12_OUT + { .pin = GPIO_A12_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A12_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A15_OUT + { .pin = GPIO_A15_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A15_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B0_OUT + { .pin = GPIO_B0_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B0_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B1_OUT + { .pin = GPIO_B1_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B1_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B2_OUT + { .pin = GPIO_B2_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B2_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B3_OUT + { .pin = GPIO_B3_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B3_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B4_OUT + { .pin = GPIO_B4_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B4_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B5_OUT + { .pin = GPIO_B5_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B5_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B6_OUT + { .pin = GPIO_B6_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B6_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B7_OUT + { .pin = GPIO_B7_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B7_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B8_OUT + { .pin = GPIO_B8_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B8_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B9_OUT + { .pin = GPIO_B9_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B9_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B10_OUT + { .pin = GPIO_B10_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B10_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B12_OUT + { .pin = GPIO_B12_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B12_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B13_OUT + { .pin = GPIO_B13_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B13_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B14_OUT + { .pin = GPIO_B14_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B14_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B15_OUT + { .pin = GPIO_B15_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B15_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_C13_OUT + { .pin = GPIO_C13_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_C13_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_C14_OUT + { .pin = GPIO_C14_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_C14_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_C15_OUT + { .pin = GPIO_C15_OUT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_C15_NAME }, +#endif +}; +#endif /* BOARD_NGPIO_OUT > 0 */ + +#if BOARD_NGPIO_INT > 0 +static const struct gpio_operations_s gpint_ops = +{ + .go_read = gpint_read, + .go_write = NULL, + .go_attach = gpint_attach, + .go_enable = gpint_enable, +}; + +static struct stm32gpint_dev_s g_gpint[BOARD_NGPIO_INT]; +static const struct stm32gpio_info_s g_gpio_int_inputs[BOARD_NGPIO_INT] = +{ +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A0_INT + { .pin = GPIO_A0_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A0_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A1_INT + { .pin = GPIO_A1_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A1_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A2_INT + { .pin = GPIO_A2_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A2_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A3_INT + { .pin = GPIO_A3_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A3_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A4_INT + { .pin = GPIO_A4_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A4_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A5_INT + { .pin = GPIO_A5_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A5_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A6_INT + { .pin = GPIO_A6_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A6_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A7_INT + { .pin = GPIO_A7_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A7_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A8_INT + { .pin = GPIO_A8_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A8_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A9_INT + { .pin = GPIO_A9_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A9_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A10_INT + { .pin = GPIO_A10_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A10_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A11_INT + { .pin = GPIO_A11_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A11_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A12_INT + { .pin = GPIO_A12_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A12_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_A15_INT + { .pin = GPIO_A15_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_A15_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B0_INT + { .pin = GPIO_B0_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B0_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B1_INT + { .pin = GPIO_B1_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B1_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B2_INT + { .pin = GPIO_B2_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B2_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B3_INT + { .pin = GPIO_B3_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B3_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B4_INT + { .pin = GPIO_B4_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B4_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B5_INT + { .pin = GPIO_B5_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B5_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B6_INT + { .pin = GPIO_B6_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B6_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B7_INT + { .pin = GPIO_B7_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B7_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B8_INT + { .pin = GPIO_B8_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B8_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B9_INT + { .pin = GPIO_B9_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B9_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B10_INT + { .pin = GPIO_B10_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B10_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B12_INT + { .pin = GPIO_B12_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B12_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B13_INT + { .pin = GPIO_B13_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B13_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B14_INT + { .pin = GPIO_B14_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B14_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_B15_INT + { .pin = GPIO_B15_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_B15_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_C13_INT + { .pin = GPIO_C13_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_C13_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_C14_INT + { .pin = GPIO_C14_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_C14_NAME }, +#endif + +#ifdef CONFIG_STM32F411MINIMUM_GPIO_C15_INT + { .pin = GPIO_C15_INT, .pinname = CONFIG_STM32F411MINIMUM_GPIO_C15_NAME }, +#endif +}; +#endif /* BOARD_NGPIO_INT > 0 */ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: gpin_read + ****************************************************************************/ + +#if BOARD_NGPIO_IN > 0 +static int gpin_read(struct gpio_dev_s *dev, bool *value) +{ + struct stm32gpio_dev_s *stm32gpio = + (struct stm32gpio_dev_s *)dev; + + DEBUGASSERT(stm32gpio != NULL && value != NULL); + DEBUGASSERT(stm32gpio->id < BOARD_NGPIO_IN); + gpioinfo("Reading...\n"); + + *value = stm32_gpioread(g_gpio_inputs[stm32gpio->id].pin); + return OK; +} +#endif + +/**************************************************************************** + * Name: gpout_read + ****************************************************************************/ + +#if BOARD_NGPIO_OUT > 0 +static int gpout_read(struct gpio_dev_s *dev, bool *value) +{ + struct stm32gpio_dev_s *stm32gpio = + (struct stm32gpio_dev_s *)dev; + + DEBUGASSERT(stm32gpio != NULL && value != NULL); + DEBUGASSERT(stm32gpio->id < BOARD_NGPIO_OUT); + gpioinfo("Reading...\n"); + + *value = stm32_gpioread(g_gpio_outputs[stm32gpio->id].pin); + return OK; +} +#endif + +/**************************************************************************** + * Name: gpout_write + ****************************************************************************/ + +#if BOARD_NGPIO_OUT > 0 +static int gpout_write(struct gpio_dev_s *dev, bool value) +{ + struct stm32gpio_dev_s *stm32gpio = + (struct stm32gpio_dev_s *)dev; + + DEBUGASSERT(stm32gpio != NULL); + DEBUGASSERT(stm32gpio->id < BOARD_NGPIO_OUT); + gpioinfo("Writing %d\n", (int)value); + + stm32_gpiowrite(g_gpio_outputs[stm32gpio->id].pin, value); + return OK; +} +#endif + +/**************************************************************************** + * Name: gpint_read + ****************************************************************************/ + +#if BOARD_NGPIO_INT > 0 +static int gpint_read(struct gpio_dev_s *dev, bool *value) +{ + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)dev; + + DEBUGASSERT(stm32gpint != NULL && value != NULL); + DEBUGASSERT(stm32gpint->stm32gpio.id < BOARD_NGPIO_INT); + gpioinfo("Reading int pin...\n"); + + *value = stm32_gpioread(g_gpio_int_inputs[stm32gpint->stm32gpio.id].pin); + return OK; +} +#endif + +/**************************************************************************** + * Name: stm32gpio_interrupt + ****************************************************************************/ + +#if BOARD_NGPIO_INT > 0 +static int stm32gpio_interrupt(int irq, void *context, void *arg) +{ + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)arg; + + DEBUGASSERT(stm32gpint != NULL && stm32gpint->callback != NULL); + gpioinfo("Interrupt! callback=%p\n", stm32gpint->callback); + + stm32gpint->callback(&stm32gpint->stm32gpio.gpio, + stm32gpint->stm32gpio.id); + return OK; +} +#endif + +/**************************************************************************** + * Name: gpint_attach + ****************************************************************************/ + +#if BOARD_NGPIO_INT > 0 +static int gpint_attach(struct gpio_dev_s *dev, + pin_interrupt_t callback) +{ + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)dev; + + gpioinfo("Attaching the callback\n"); + + /* Make sure the interrupt is disabled */ + + stm32_gpiosetevent(g_gpio_int_inputs[stm32gpint->stm32gpio.id].pin, false, + false, false, NULL, NULL); + + gpioinfo("Attach %p\n", callback); + stm32gpint->callback = callback; + return OK; +} +#endif + +/**************************************************************************** + * Name: gpint_enable + ****************************************************************************/ + +#if BOARD_NGPIO_INT > 0 +static int gpint_enable(struct gpio_dev_s *dev, bool enable) +{ + struct stm32gpint_dev_s *stm32gpint = + (struct stm32gpint_dev_s *)dev; + + if (enable) + { + if (stm32gpint->callback != NULL) + { + gpioinfo("Enabling the interrupt\n"); + + /* Configure the interrupt for rising edge */ + + stm32_gpiosetevent(g_gpio_int_inputs[stm32gpint->stm32gpio.id].pin, + true, false, false, stm32gpio_interrupt, + &g_gpint[stm32gpint->stm32gpio.id]); + } + } + else + { + gpioinfo("Disable the interrupt\n"); + stm32_gpiosetevent(g_gpio_int_inputs[stm32gpint->stm32gpio.id].pin, + false, false, false, NULL, NULL); + } + + return OK; +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_gpio_initialize + * + * Description: + * Initialize GPIO drivers + * + ****************************************************************************/ + +int stm32_gpio_initialize(void) +{ + int i; + +#if BOARD_NGPIO_IN > 0 + for (i = 0; i < BOARD_NGPIO_IN; i++) + { + /* Setup and register the GPIO pin */ + + g_gpin[i].gpio.gp_pintype = GPIO_INPUT_PIN; + g_gpin[i].gpio.gp_ops = &gpin_ops; + g_gpin[i].id = i; + gpio_pin_register_byname(&g_gpin[i].gpio, g_gpio_inputs[i].pinname); + + /* Configure the pin that will be used as input */ + + stm32_configgpio(g_gpio_inputs[i].pin); + } +#endif + +#if BOARD_NGPIO_OUT > 0 + for (i = 0; i < BOARD_NGPIO_OUT; i++) + { + /* Setup and register the GPIO pin */ + + g_gpout[i].gpio.gp_pintype = GPIO_OUTPUT_PIN; + g_gpout[i].gpio.gp_ops = &gpout_ops; + g_gpout[i].id = i; + gpio_pin_register_byname(&g_gpout[i].gpio, g_gpio_outputs[i].pinname); + + /* Configure the pin that will be used as output */ + + stm32_gpiowrite(g_gpio_outputs[i].pin, 0); + stm32_configgpio(g_gpio_outputs[i].pin); + } +#endif + +#if BOARD_NGPIO_INT > 0 + for (i = 0; i < BOARD_NGPIO_INT; i++) + { + /* Setup and register the GPIO pin */ + + g_gpint[i].stm32gpio.gpio.gp_pintype = GPIO_INTERRUPT_PIN; + g_gpint[i].stm32gpio.gpio.gp_ops = &gpint_ops; + g_gpint[i].stm32gpio.id = i; + gpio_pin_register_byname(&g_gpint[i].stm32gpio.gpio, + g_gpio_int_inputs[i].pinname); + + /* Configure the pin that will be used as interrupt input */ + + stm32_configgpio(g_gpio_int_inputs[i].pin); + } +#endif + + return 0; +} +#endif /* CONFIG_DEV_GPIO && !CONFIG_GPIO_LOWER_HALF */ diff --git a/boards/arm/stm32/stm32f411-minimum/src/stm32f411-minimum-gpio.h b/boards/arm/stm32/stm32f411-minimum/src/stm32f411-minimum-gpio.h new file mode 100644 index 0000000000..6b1d5689f4 --- /dev/null +++ b/boards/arm/stm32/stm32f411-minimum/src/stm32f411-minimum-gpio.h @@ -0,0 +1,1922 @@ +/**************************************************************************** + * boards/arm/stm32/stm32f411-minimum/src/stm32f411-minimum-gpio.h + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +#ifndef __BOARDS_ARM_STM32_STM32F411_MINIMUM_SRC_STM32F411_MINIMUM_GPIO_H +#define __BOARDS_ARM_STM32_STM32F411_MINIMUM_SRC_STM32F411_MINIMUM_GPIO_H + +/* GPIO A0 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A0_OUT) +# define GPIO_A0_USED_OUT 1 +# define GPIO_A0_USED_INT 0 +# define GPIO_A0_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A0_INT) +# define GPIO_A0_USED_OUT 0 +# define GPIO_A0_USED_INT 1 +# define GPIO_A0_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A0_IN) +# define GPIO_A0_USED_OUT 0 +# define GPIO_A0_USED_INT 0 +# define GPIO_A0_USED_IN 1 +#else +# define GPIO_A0_USED_OUT 0 +# define GPIO_A0_USED_INT 0 +# define GPIO_A0_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A0_OUT_PP) +# define GPIO_A0_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A0_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A0_OUT_CLEAR) +# define GPIO_A0_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A0_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A0_PULL_DOWN) +# define GPIO_A0_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A0_PULL_FLOAT) +# define GPIO_A0_PULL GPIO_FLOAT +#else +# define GPIO_A0_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A0_SPEED_2MHz) +# define GPIO_A0_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A0_SPEED_25MHz) +# define GPIO_A0_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A0_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO A1 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A1_OUT) +# define GPIO_A1_USED_OUT 1 +# define GPIO_A1_USED_INT 0 +# define GPIO_A1_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A1_INT) +# define GPIO_A1_USED_OUT 0 +# define GPIO_A1_USED_INT 1 +# define GPIO_A1_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A1_IN) +# define GPIO_A1_USED_OUT 0 +# define GPIO_A1_USED_INT 0 +# define GPIO_A1_USED_IN 1 +#else +# define GPIO_A1_USED_OUT 0 +# define GPIO_A1_USED_INT 0 +# define GPIO_A1_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A1_OUT_PP) +# define GPIO_A1_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A1_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A1_OUT_CLEAR) +# define GPIO_A1_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A1_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A1_PULL_DOWN) +# define GPIO_A1_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A1_PULL_FLOAT) +# define GPIO_A1_PULL GPIO_FLOAT +#else +# define GPIO_A1_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A1_SPEED_2MHz) +# define GPIO_A1_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A1_SPEED_25MHz) +# define GPIO_A1_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A1_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO A2 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A2_OUT) +# define GPIO_A2_USED_OUT 1 +# define GPIO_A2_USED_INT 0 +# define GPIO_A2_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A2_INT) +# define GPIO_A2_USED_OUT 0 +# define GPIO_A2_USED_INT 1 +# define GPIO_A2_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A2_IN) +# define GPIO_A2_USED_OUT 0 +# define GPIO_A2_USED_INT 0 +# define GPIO_A2_USED_IN 1 +#else +# define GPIO_A2_USED_OUT 0 +# define GPIO_A2_USED_INT 0 +# define GPIO_A2_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A2_OUT_PP) +# define GPIO_A2_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A2_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A2_OUT_CLEAR) +# define GPIO_A2_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A2_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A2_PULL_DOWN) +# define GPIO_A2_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A2_PULL_FLOAT) +# define GPIO_A2_PULL GPIO_FLOAT +#else +# define GPIO_A2_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A2_SPEED_2MHz) +# define GPIO_A2_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A2_SPEED_25MHz) +# define GPIO_A2_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A2_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO A3 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A3_OUT) +# define GPIO_A3_USED_OUT 1 +# define GPIO_A3_USED_INT 0 +# define GPIO_A3_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A3_INT) +# define GPIO_A3_USED_OUT 0 +# define GPIO_A3_USED_INT 1 +# define GPIO_A3_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A3_IN) +# define GPIO_A3_USED_OUT 0 +# define GPIO_A3_USED_INT 0 +# define GPIO_A3_USED_IN 1 +#else +# define GPIO_A3_USED_OUT 0 +# define GPIO_A3_USED_INT 0 +# define GPIO_A3_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A3_OUT_PP) +# define GPIO_A3_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A3_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A3_OUT_CLEAR) +# define GPIO_A3_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A3_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A3_PULL_DOWN) +# define GPIO_A3_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A3_PULL_FLOAT) +# define GPIO_A3_PULL GPIO_FLOAT +#else +# define GPIO_A3_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A3_SPEED_2MHz) +# define GPIO_A3_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A3_SPEED_25MHz) +# define GPIO_A3_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A3_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO A4 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A4_OUT) +# define GPIO_A4_USED_OUT 1 +# define GPIO_A4_USED_INT 0 +# define GPIO_A4_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A4_INT) +# define GPIO_A4_USED_OUT 0 +# define GPIO_A4_USED_INT 1 +# define GPIO_A4_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A4_IN) +# define GPIO_A4_USED_OUT 0 +# define GPIO_A4_USED_INT 0 +# define GPIO_A4_USED_IN 1 +#else +# define GPIO_A4_USED_OUT 0 +# define GPIO_A4_USED_INT 0 +# define GPIO_A4_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A4_OUT_PP) +# define GPIO_A4_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A4_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A4_OUT_CLEAR) +# define GPIO_A4_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A4_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A4_PULL_DOWN) +# define GPIO_A4_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A4_PULL_FLOAT) +# define GPIO_A4_PULL GPIO_FLOAT +#else +# define GPIO_A4_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A4_SPEED_2MHz) +# define GPIO_A4_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A4_SPEED_25MHz) +# define GPIO_A4_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A4_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO A5 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A5_OUT) +# define GPIO_A5_USED_OUT 1 +# define GPIO_A5_USED_INT 0 +# define GPIO_A5_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A5_INT) +# define GPIO_A5_USED_OUT 0 +# define GPIO_A5_USED_INT 1 +# define GPIO_A5_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A5_IN) +# define GPIO_A5_USED_OUT 0 +# define GPIO_A5_USED_INT 0 +# define GPIO_A5_USED_IN 1 +#else +# define GPIO_A5_USED_OUT 0 +# define GPIO_A5_USED_INT 0 +# define GPIO_A5_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A5_OUT_PP) +# define GPIO_A5_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A5_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A5_OUT_CLEAR) +# define GPIO_A5_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A5_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A5_PULL_DOWN) +# define GPIO_A5_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A5_PULL_FLOAT) +# define GPIO_A5_PULL GPIO_FLOAT +#else +# define GPIO_A5_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A5_SPEED_2MHz) +# define GPIO_A5_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A5_SPEED_25MHz) +# define GPIO_A5_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A5_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO A6 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A6_OUT) +# define GPIO_A6_USED_OUT 1 +# define GPIO_A6_USED_INT 0 +# define GPIO_A6_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A6_INT) +# define GPIO_A6_USED_OUT 0 +# define GPIO_A6_USED_INT 1 +# define GPIO_A6_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A6_IN) +# define GPIO_A6_USED_OUT 0 +# define GPIO_A6_USED_INT 0 +# define GPIO_A6_USED_IN 1 +#else +# define GPIO_A6_USED_OUT 0 +# define GPIO_A6_USED_INT 0 +# define GPIO_A6_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A6_OUT_PP) +# define GPIO_A6_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A6_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A6_OUT_CLEAR) +# define GPIO_A6_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A6_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A6_PULL_DOWN) +# define GPIO_A6_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A6_PULL_FLOAT) +# define GPIO_A6_PULL GPIO_FLOAT +#else +# define GPIO_A6_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A6_SPEED_2MHz) +# define GPIO_A6_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A6_SPEED_25MHz) +# define GPIO_A6_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A6_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO A7 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A7_OUT) +# define GPIO_A7_USED_OUT 1 +# define GPIO_A7_USED_INT 0 +# define GPIO_A7_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A7_INT) +# define GPIO_A7_USED_OUT 0 +# define GPIO_A7_USED_INT 1 +# define GPIO_A7_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A7_IN) +# define GPIO_A7_USED_OUT 0 +# define GPIO_A7_USED_INT 0 +# define GPIO_A7_USED_IN 1 +#else +# define GPIO_A7_USED_OUT 0 +# define GPIO_A7_USED_INT 0 +# define GPIO_A7_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A7_OUT_PP) +# define GPIO_A7_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A7_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A7_OUT_CLEAR) +# define GPIO_A7_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A7_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A7_PULL_DOWN) +# define GPIO_A7_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A7_PULL_FLOAT) +# define GPIO_A7_PULL GPIO_FLOAT +#else +# define GPIO_A7_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A7_SPEED_2MHz) +# define GPIO_A7_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A7_SPEED_25MHz) +# define GPIO_A7_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A7_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO A8 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A8_OUT) +# define GPIO_A8_USED_OUT 1 +# define GPIO_A8_USED_INT 0 +# define GPIO_A8_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A8_INT) +# define GPIO_A8_USED_OUT 0 +# define GPIO_A8_USED_INT 1 +# define GPIO_A8_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A8_IN) +# define GPIO_A8_USED_OUT 0 +# define GPIO_A8_USED_INT 0 +# define GPIO_A8_USED_IN 1 +#else +# define GPIO_A8_USED_OUT 0 +# define GPIO_A8_USED_INT 0 +# define GPIO_A8_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A8_OUT_PP) +# define GPIO_A8_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A8_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A8_OUT_CLEAR) +# define GPIO_A8_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A8_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A8_PULL_DOWN) +# define GPIO_A8_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A8_PULL_FLOAT) +# define GPIO_A8_PULL GPIO_FLOAT +#else +# define GPIO_A8_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A8_SPEED_2MHz) +# define GPIO_A8_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A8_SPEED_25MHz) +# define GPIO_A8_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A8_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO A9 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A9_OUT) +# define GPIO_A9_USED_OUT 1 +# define GPIO_A9_USED_INT 0 +# define GPIO_A9_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A9_INT) +# define GPIO_A9_USED_OUT 0 +# define GPIO_A9_USED_INT 1 +# define GPIO_A9_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A9_IN) +# define GPIO_A9_USED_OUT 0 +# define GPIO_A9_USED_INT 0 +# define GPIO_A9_USED_IN 1 +#else +# define GPIO_A9_USED_OUT 0 +# define GPIO_A9_USED_INT 0 +# define GPIO_A9_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A9_OUT_PP) +# define GPIO_A9_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A9_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A9_OUT_CLEAR) +# define GPIO_A9_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A9_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A9_PULL_DOWN) +# define GPIO_A9_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A9_PULL_FLOAT) +# define GPIO_A9_PULL GPIO_FLOAT +#else +# define GPIO_A9_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A9_SPEED_2MHz) +# define GPIO_A9_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A9_SPEED_25MHz) +# define GPIO_A9_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A9_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO A10 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A10_OUT) +# define GPIO_A10_USED_OUT 1 +# define GPIO_A10_USED_INT 0 +# define GPIO_A10_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A10_INT) +# define GPIO_A10_USED_OUT 0 +# define GPIO_A10_USED_INT 1 +# define GPIO_A10_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A10_IN) +# define GPIO_A10_USED_OUT 0 +# define GPIO_A10_USED_INT 0 +# define GPIO_A10_USED_IN 1 +#else +# define GPIO_A10_USED_OUT 0 +# define GPIO_A10_USED_INT 0 +# define GPIO_A10_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A10_OUT_PP) +# define GPIO_A10_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A10_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A10_OUT_CLEAR) +# define GPIO_A10_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A10_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A10_PULL_DOWN) +# define GPIO_A10_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A10_PULL_FLOAT) +# define GPIO_A10_PULL GPIO_FLOAT +#else +# define GPIO_A10_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A10_SPEED_2MHz) +# define GPIO_A10_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A10_SPEED_25MHz) +# define GPIO_A10_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A10_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO A11 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A11_OUT) +# define GPIO_A11_USED_OUT 1 +# define GPIO_A11_USED_INT 0 +# define GPIO_A11_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A11_INT) +# define GPIO_A11_USED_OUT 0 +# define GPIO_A11_USED_INT 1 +# define GPIO_A11_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A11_IN) +# define GPIO_A11_USED_OUT 0 +# define GPIO_A11_USED_INT 0 +# define GPIO_A11_USED_IN 1 +#else +# define GPIO_A11_USED_OUT 0 +# define GPIO_A11_USED_INT 0 +# define GPIO_A11_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A11_OUT_PP) +# define GPIO_A11_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A11_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A11_OUT_CLEAR) +# define GPIO_A11_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A11_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A11_PULL_DOWN) +# define GPIO_A11_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A11_PULL_FLOAT) +# define GPIO_A11_PULL GPIO_FLOAT +#else +# define GPIO_A11_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A11_SPEED_2MHz) +# define GPIO_A11_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A11_SPEED_25MHz) +# define GPIO_A11_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A11_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO A12 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A12_OUT) +# define GPIO_A12_USED_OUT 1 +# define GPIO_A12_USED_INT 0 +# define GPIO_A12_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A12_INT) +# define GPIO_A12_USED_OUT 0 +# define GPIO_A12_USED_INT 1 +# define GPIO_A12_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A12_IN) +# define GPIO_A12_USED_OUT 0 +# define GPIO_A12_USED_INT 0 +# define GPIO_A12_USED_IN 1 +#else +# define GPIO_A12_USED_OUT 0 +# define GPIO_A12_USED_INT 0 +# define GPIO_A12_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A12_OUT_PP) +# define GPIO_A12_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A12_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A12_OUT_CLEAR) +# define GPIO_A12_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A12_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A12_PULL_DOWN) +# define GPIO_A12_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A12_PULL_FLOAT) +# define GPIO_A12_PULL GPIO_FLOAT +#else +# define GPIO_A12_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A12_SPEED_2MHz) +# define GPIO_A12_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A12_SPEED_25MHz) +# define GPIO_A12_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A12_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO A15 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A15_OUT) +# define GPIO_A15_USED_OUT 1 +# define GPIO_A15_USED_INT 0 +# define GPIO_A15_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A15_INT) +# define GPIO_A15_USED_OUT 0 +# define GPIO_A15_USED_INT 1 +# define GPIO_A15_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A15_IN) +# define GPIO_A15_USED_OUT 0 +# define GPIO_A15_USED_INT 0 +# define GPIO_A15_USED_IN 1 +#else +# define GPIO_A15_USED_OUT 0 +# define GPIO_A15_USED_INT 0 +# define GPIO_A15_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A15_OUT_PP) +# define GPIO_A15_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_A15_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A15_OUT_CLEAR) +# define GPIO_A15_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_A15_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A15_PULL_DOWN) +# define GPIO_A15_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A15_PULL_FLOAT) +# define GPIO_A15_PULL GPIO_FLOAT +#else +# define GPIO_A15_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_A15_SPEED_2MHz) +# define GPIO_A15_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_A15_SPEED_25MHz) +# define GPIO_A15_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_A15_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B0 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B0_OUT) +# define GPIO_B0_USED_OUT 1 +# define GPIO_B0_USED_INT 0 +# define GPIO_B0_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B0_INT) +# define GPIO_B0_USED_OUT 0 +# define GPIO_B0_USED_INT 1 +# define GPIO_B0_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B0_IN) +# define GPIO_B0_USED_OUT 0 +# define GPIO_B0_USED_INT 0 +# define GPIO_B0_USED_IN 1 +#else +# define GPIO_B0_USED_OUT 0 +# define GPIO_B0_USED_INT 0 +# define GPIO_B0_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B0_OUT_PP) +# define GPIO_B0_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B0_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B0_OUT_CLEAR) +# define GPIO_B0_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B0_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B0_PULL_DOWN) +# define GPIO_B0_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B0_PULL_FLOAT) +# define GPIO_B0_PULL GPIO_FLOAT +#else +# define GPIO_B0_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B0_SPEED_2MHz) +# define GPIO_B0_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B0_SPEED_25MHz) +# define GPIO_B0_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B0_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B1 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B1_OUT) +# define GPIO_B1_USED_OUT 1 +# define GPIO_B1_USED_INT 0 +# define GPIO_B1_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B1_INT) +# define GPIO_B1_USED_OUT 0 +# define GPIO_B1_USED_INT 1 +# define GPIO_B1_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B1_IN) +# define GPIO_B1_USED_OUT 0 +# define GPIO_B1_USED_INT 0 +# define GPIO_B1_USED_IN 1 +#else +# define GPIO_B1_USED_OUT 0 +# define GPIO_B1_USED_INT 0 +# define GPIO_B1_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B1_OUT_PP) +# define GPIO_B1_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B1_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B1_OUT_CLEAR) +# define GPIO_B1_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B1_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B1_PULL_DOWN) +# define GPIO_B1_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B1_PULL_FLOAT) +# define GPIO_B1_PULL GPIO_FLOAT +#else +# define GPIO_B1_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B1_SPEED_2MHz) +# define GPIO_B1_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B1_SPEED_25MHz) +# define GPIO_B1_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B1_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B2 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B2_OUT) +# define GPIO_B2_USED_OUT 1 +# define GPIO_B2_USED_INT 0 +# define GPIO_B2_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B2_INT) +# define GPIO_B2_USED_OUT 0 +# define GPIO_B2_USED_INT 1 +# define GPIO_B2_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B2_IN) +# define GPIO_B2_USED_OUT 0 +# define GPIO_B2_USED_INT 0 +# define GPIO_B2_USED_IN 1 +#else +# define GPIO_B2_USED_OUT 0 +# define GPIO_B2_USED_INT 0 +# define GPIO_B2_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B2_OUT_PP) +# define GPIO_B2_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B2_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B2_OUT_CLEAR) +# define GPIO_B2_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B2_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B2_PULL_DOWN) +# define GPIO_B2_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B2_PULL_FLOAT) +# define GPIO_B2_PULL GPIO_FLOAT +#else +# define GPIO_B2_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B2_SPEED_2MHz) +# define GPIO_B2_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B2_SPEED_25MHz) +# define GPIO_B2_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B2_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B3 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B3_OUT) +# define GPIO_B3_USED_OUT 1 +# define GPIO_B3_USED_INT 0 +# define GPIO_B3_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B3_INT) +# define GPIO_B3_USED_OUT 0 +# define GPIO_B3_USED_INT 1 +# define GPIO_B3_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B3_IN) +# define GPIO_B3_USED_OUT 0 +# define GPIO_B3_USED_INT 0 +# define GPIO_B3_USED_IN 1 +#else +# define GPIO_B3_USED_OUT 0 +# define GPIO_B3_USED_INT 0 +# define GPIO_B3_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B3_OUT_PP) +# define GPIO_B3_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B3_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B3_OUT_CLEAR) +# define GPIO_B3_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B3_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B3_PULL_DOWN) +# define GPIO_B3_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B3_PULL_FLOAT) +# define GPIO_B3_PULL GPIO_FLOAT +#else +# define GPIO_B3_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B3_SPEED_2MHz) +# define GPIO_B3_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B3_SPEED_25MHz) +# define GPIO_B3_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B3_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B4 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B4_OUT) +# define GPIO_B4_USED_OUT 1 +# define GPIO_B4_USED_INT 0 +# define GPIO_B4_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B4_INT) +# define GPIO_B4_USED_OUT 0 +# define GPIO_B4_USED_INT 1 +# define GPIO_B4_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B4_IN) +# define GPIO_B4_USED_OUT 0 +# define GPIO_B4_USED_INT 0 +# define GPIO_B4_USED_IN 1 +#else +# define GPIO_B4_USED_OUT 0 +# define GPIO_B4_USED_INT 0 +# define GPIO_B4_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B4_OUT_PP) +# define GPIO_B4_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B4_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B4_OUT_CLEAR) +# define GPIO_B4_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B4_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B4_PULL_DOWN) +# define GPIO_B4_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B4_PULL_FLOAT) +# define GPIO_B4_PULL GPIO_FLOAT +#else +# define GPIO_B4_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B4_SPEED_2MHz) +# define GPIO_B4_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B4_SPEED_25MHz) +# define GPIO_B4_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B4_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B5 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B5_OUT) +# define GPIO_B5_USED_OUT 1 +# define GPIO_B5_USED_INT 0 +# define GPIO_B5_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B5_INT) +# define GPIO_B5_USED_OUT 0 +# define GPIO_B5_USED_INT 1 +# define GPIO_B5_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B5_IN) +# define GPIO_B5_USED_OUT 0 +# define GPIO_B5_USED_INT 0 +# define GPIO_B5_USED_IN 1 +#else +# define GPIO_B5_USED_OUT 0 +# define GPIO_B5_USED_INT 0 +# define GPIO_B5_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B5_OUT_PP) +# define GPIO_B5_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B5_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B5_OUT_CLEAR) +# define GPIO_B5_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B5_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B5_PULL_DOWN) +# define GPIO_B5_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B5_PULL_FLOAT) +# define GPIO_B5_PULL GPIO_FLOAT +#else +# define GPIO_B5_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B5_SPEED_2MHz) +# define GPIO_B5_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B5_SPEED_25MHz) +# define GPIO_B5_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B5_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B6 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B6_OUT) +# define GPIO_B6_USED_OUT 1 +# define GPIO_B6_USED_INT 0 +# define GPIO_B6_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B6_INT) +# define GPIO_B6_USED_OUT 0 +# define GPIO_B6_USED_INT 1 +# define GPIO_B6_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B6_IN) +# define GPIO_B6_USED_OUT 0 +# define GPIO_B6_USED_INT 0 +# define GPIO_B6_USED_IN 1 +#else +# define GPIO_B6_USED_OUT 0 +# define GPIO_B6_USED_INT 0 +# define GPIO_B6_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B6_OUT_PP) +# define GPIO_B6_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B6_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B6_OUT_CLEAR) +# define GPIO_B6_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B6_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B6_PULL_DOWN) +# define GPIO_B6_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B6_PULL_FLOAT) +# define GPIO_B6_PULL GPIO_FLOAT +#else +# define GPIO_B6_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B6_SPEED_2MHz) +# define GPIO_B6_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B6_SPEED_25MHz) +# define GPIO_B6_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B6_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B7 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B7_OUT) +# define GPIO_B7_USED_OUT 1 +# define GPIO_B7_USED_INT 0 +# define GPIO_B7_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B7_INT) +# define GPIO_B7_USED_OUT 0 +# define GPIO_B7_USED_INT 1 +# define GPIO_B7_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B7_IN) +# define GPIO_B7_USED_OUT 0 +# define GPIO_B7_USED_INT 0 +# define GPIO_B7_USED_IN 1 +#else +# define GPIO_B7_USED_OUT 0 +# define GPIO_B7_USED_INT 0 +# define GPIO_B7_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B7_OUT_PP) +# define GPIO_B7_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B7_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B7_OUT_CLEAR) +# define GPIO_B7_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B7_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B7_PULL_DOWN) +# define GPIO_B7_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B7_PULL_FLOAT) +# define GPIO_B7_PULL GPIO_FLOAT +#else +# define GPIO_B7_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B7_SPEED_2MHz) +# define GPIO_B7_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B7_SPEED_25MHz) +# define GPIO_B7_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B7_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B8 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B8_OUT) +# define GPIO_B8_USED_OUT 1 +# define GPIO_B8_USED_INT 0 +# define GPIO_B8_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B8_INT) +# define GPIO_B8_USED_OUT 0 +# define GPIO_B8_USED_INT 1 +# define GPIO_B8_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B8_IN) +# define GPIO_B8_USED_OUT 0 +# define GPIO_B8_USED_INT 0 +# define GPIO_B8_USED_IN 1 +#else +# define GPIO_B8_USED_OUT 0 +# define GPIO_B8_USED_INT 0 +# define GPIO_B8_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B8_OUT_PP) +# define GPIO_B8_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B8_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B8_OUT_CLEAR) +# define GPIO_B8_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B8_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B8_PULL_DOWN) +# define GPIO_B8_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B8_PULL_FLOAT) +# define GPIO_B8_PULL GPIO_FLOAT +#else +# define GPIO_B8_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B8_SPEED_2MHz) +# define GPIO_B8_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B8_SPEED_25MHz) +# define GPIO_B8_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B8_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B9 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B9_OUT) +# define GPIO_B9_USED_OUT 1 +# define GPIO_B9_USED_INT 0 +# define GPIO_B9_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B9_INT) +# define GPIO_B9_USED_OUT 0 +# define GPIO_B9_USED_INT 1 +# define GPIO_B9_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B9_IN) +# define GPIO_B9_USED_OUT 0 +# define GPIO_B9_USED_INT 0 +# define GPIO_B9_USED_IN 1 +#else +# define GPIO_B9_USED_OUT 0 +# define GPIO_B9_USED_INT 0 +# define GPIO_B9_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B9_OUT_PP) +# define GPIO_B9_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B9_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B9_OUT_CLEAR) +# define GPIO_B9_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B9_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B9_PULL_DOWN) +# define GPIO_B9_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B9_PULL_FLOAT) +# define GPIO_B9_PULL GPIO_FLOAT +#else +# define GPIO_B9_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B9_SPEED_2MHz) +# define GPIO_B9_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B9_SPEED_25MHz) +# define GPIO_B9_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B9_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B10 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B10_OUT) +# define GPIO_B10_USED_OUT 1 +# define GPIO_B10_USED_INT 0 +# define GPIO_B10_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B10_INT) +# define GPIO_B10_USED_OUT 0 +# define GPIO_B10_USED_INT 1 +# define GPIO_B10_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B10_IN) +# define GPIO_B10_USED_OUT 0 +# define GPIO_B10_USED_INT 0 +# define GPIO_B10_USED_IN 1 +#else +# define GPIO_B10_USED_OUT 0 +# define GPIO_B10_USED_INT 0 +# define GPIO_B10_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B10_OUT_PP) +# define GPIO_B10_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B10_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B10_OUT_CLEAR) +# define GPIO_B10_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B10_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B10_PULL_DOWN) +# define GPIO_B10_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B10_PULL_FLOAT) +# define GPIO_B10_PULL GPIO_FLOAT +#else +# define GPIO_B10_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B10_SPEED_2MHz) +# define GPIO_B10_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B10_SPEED_25MHz) +# define GPIO_B10_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B10_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B12 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B12_OUT) +# define GPIO_B12_USED_OUT 1 +# define GPIO_B12_USED_INT 0 +# define GPIO_B12_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B12_INT) +# define GPIO_B12_USED_OUT 0 +# define GPIO_B12_USED_INT 1 +# define GPIO_B12_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B12_IN) +# define GPIO_B12_USED_OUT 0 +# define GPIO_B12_USED_INT 0 +# define GPIO_B12_USED_IN 1 +#else +# define GPIO_B12_USED_OUT 0 +# define GPIO_B12_USED_INT 0 +# define GPIO_B12_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B12_OUT_PP) +# define GPIO_B12_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B12_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B12_OUT_CLEAR) +# define GPIO_B12_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B12_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B12_PULL_DOWN) +# define GPIO_B12_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B12_PULL_FLOAT) +# define GPIO_B12_PULL GPIO_FLOAT +#else +# define GPIO_B12_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B12_SPEED_2MHz) +# define GPIO_B12_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B12_SPEED_25MHz) +# define GPIO_B12_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B12_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B13 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B13_OUT) +# define GPIO_B13_USED_OUT 1 +# define GPIO_B13_USED_INT 0 +# define GPIO_B13_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B13_INT) +# define GPIO_B13_USED_OUT 0 +# define GPIO_B13_USED_INT 1 +# define GPIO_B13_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B13_IN) +# define GPIO_B13_USED_OUT 0 +# define GPIO_B13_USED_INT 0 +# define GPIO_B13_USED_IN 1 +#else +# define GPIO_B13_USED_OUT 0 +# define GPIO_B13_USED_INT 0 +# define GPIO_B13_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B13_OUT_PP) +# define GPIO_B13_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B13_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B13_OUT_CLEAR) +# define GPIO_B13_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B13_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B13_PULL_DOWN) +# define GPIO_B13_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B13_PULL_FLOAT) +# define GPIO_B13_PULL GPIO_FLOAT +#else +# define GPIO_B13_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B13_SPEED_2MHz) +# define GPIO_B13_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B13_SPEED_25MHz) +# define GPIO_B13_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B13_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B14 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B14_OUT) +# define GPIO_B14_USED_OUT 1 +# define GPIO_B14_USED_INT 0 +# define GPIO_B14_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B14_INT) +# define GPIO_B14_USED_OUT 0 +# define GPIO_B14_USED_INT 1 +# define GPIO_B14_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B14_IN) +# define GPIO_B14_USED_OUT 0 +# define GPIO_B14_USED_INT 0 +# define GPIO_B14_USED_IN 1 +#else +# define GPIO_B14_USED_OUT 0 +# define GPIO_B14_USED_INT 0 +# define GPIO_B14_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B14_OUT_PP) +# define GPIO_B14_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B14_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B14_OUT_CLEAR) +# define GPIO_B14_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B14_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B14_PULL_DOWN) +# define GPIO_B14_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B14_PULL_FLOAT) +# define GPIO_B14_PULL GPIO_FLOAT +#else +# define GPIO_B14_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B14_SPEED_2MHz) +# define GPIO_B14_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B14_SPEED_25MHz) +# define GPIO_B14_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B14_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO B15 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B15_OUT) +# define GPIO_B15_USED_OUT 1 +# define GPIO_B15_USED_INT 0 +# define GPIO_B15_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B15_INT) +# define GPIO_B15_USED_OUT 0 +# define GPIO_B15_USED_INT 1 +# define GPIO_B15_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B15_IN) +# define GPIO_B15_USED_OUT 0 +# define GPIO_B15_USED_INT 0 +# define GPIO_B15_USED_IN 1 +#else +# define GPIO_B15_USED_OUT 0 +# define GPIO_B15_USED_INT 0 +# define GPIO_B15_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B15_OUT_PP) +# define GPIO_B15_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_B15_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B15_OUT_CLEAR) +# define GPIO_B15_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_B15_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B15_PULL_DOWN) +# define GPIO_B15_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B15_PULL_FLOAT) +# define GPIO_B15_PULL GPIO_FLOAT +#else +# define GPIO_B15_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_B15_SPEED_2MHz) +# define GPIO_B15_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_B15_SPEED_25MHz) +# define GPIO_B15_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_B15_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO C13 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C13_OUT) +# define GPIO_C13_USED_OUT 1 +# define GPIO_C13_USED_INT 0 +# define GPIO_C13_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_C13_INT) +# define GPIO_C13_USED_OUT 0 +# define GPIO_C13_USED_INT 1 +# define GPIO_C13_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_C13_IN) +# define GPIO_C13_USED_OUT 0 +# define GPIO_C13_USED_INT 0 +# define GPIO_C13_USED_IN 1 +#else +# define GPIO_C13_USED_OUT 0 +# define GPIO_C13_USED_INT 0 +# define GPIO_C13_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C13_OUT_PP) +# define GPIO_C13_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_C13_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C13_OUT_CLEAR) +# define GPIO_C13_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_C13_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C13_PULL_DOWN) +# define GPIO_C13_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_C13_PULL_FLOAT) +# define GPIO_C13_PULL GPIO_FLOAT +#else +# define GPIO_C13_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C13_SPEED_2MHz) +# define GPIO_C13_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_C13_SPEED_25MHz) +# define GPIO_C13_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_C13_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO C14 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C14_OUT) +# define GPIO_C14_USED_OUT 1 +# define GPIO_C14_USED_INT 0 +# define GPIO_C14_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_C14_INT) +# define GPIO_C14_USED_OUT 0 +# define GPIO_C14_USED_INT 1 +# define GPIO_C14_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_C14_IN) +# define GPIO_C14_USED_OUT 0 +# define GPIO_C14_USED_INT 0 +# define GPIO_C14_USED_IN 1 +#else +# define GPIO_C14_USED_OUT 0 +# define GPIO_C14_USED_INT 0 +# define GPIO_C14_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C14_OUT_PP) +# define GPIO_C14_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_C14_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C14_OUT_CLEAR) +# define GPIO_C14_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_C14_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C14_PULL_DOWN) +# define GPIO_C14_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_C14_PULL_FLOAT) +# define GPIO_C14_PULL GPIO_FLOAT +#else +# define GPIO_C14_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C14_SPEED_2MHz) +# define GPIO_C14_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_C14_SPEED_25MHz) +# define GPIO_C14_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_C14_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO C15 Kconfig Mapping */ + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C15_OUT) +# define GPIO_C15_USED_OUT 1 +# define GPIO_C15_USED_INT 0 +# define GPIO_C15_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_C15_INT) +# define GPIO_C15_USED_OUT 0 +# define GPIO_C15_USED_INT 1 +# define GPIO_C15_USED_IN 0 +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_C15_IN) +# define GPIO_C15_USED_OUT 0 +# define GPIO_C15_USED_INT 0 +# define GPIO_C15_USED_IN 1 +#else +# define GPIO_C15_USED_OUT 0 +# define GPIO_C15_USED_INT 0 +# define GPIO_C15_USED_IN 0 +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C15_OUT_PP) +# define GPIO_C15_OUTTYPE GPIO_PUSHPULL +#else +# define GPIO_C15_OUTTYPE GPIO_OPENDRAIN +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C15_OUT_CLEAR) +# define GPIO_C15_OUT_DEFAULT GPIO_OUTPUT_CLEAR +#else +# define GPIO_C15_OUT_DEFAULT GPIO_OUTPUT_SET +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C15_PULL_DOWN) +# define GPIO_C15_PULL GPIO_PULLDOWN +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_C15_PULL_FLOAT) +# define GPIO_C15_PULL GPIO_FLOAT +#else +# define GPIO_C15_PULL GPIO_PULLUP +#endif + +#if defined(CONFIG_STM32F411MINIMUM_GPIO_C15_SPEED_2MHz) +# define GPIO_C15_SPEED GPIO_SPEED_2MHz +#elif defined(CONFIG_STM32F411MINIMUM_GPIO_C15_SPEED_25MHz) +# define GPIO_C15_SPEED GPIO_SPEED_25MHz +#else +# define GPIO_C15_SPEED GPIO_SPEED_50MHz +#endif + +/* GPIO_A0 definition */ + +#define GPIO_A0_OUT (GPIO_OUTPUT|GPIO_A0_OUTTYPE|GPIO_A0_OUT_DEFAULT|\ + GPIO_A0_PULL|GPIO_A0_SPEED|GPIO_PORTA|GPIO_PIN0) +#define GPIO_A0_IN (GPIO_INPUT|GPIO_A0_PULL|GPIO_A0_SPEED|\ + GPIO_PORTA|GPIO_PIN0) +#define GPIO_A0_INT (GPIO_A0_IN|GPIO_EXTI) + +/* GPIO_A1 definition */ + +#define GPIO_A1_OUT (GPIO_OUTPUT|GPIO_A1_OUTTYPE|GPIO_A1_OUT_DEFAULT|\ + GPIO_A1_PULL|GPIO_A1_SPEED|GPIO_PORTA|GPIO_PIN1) +#define GPIO_A1_IN (GPIO_INPUT|GPIO_A1_PULL|GPIO_A1_SPEED|\ + GPIO_PORTA|GPIO_PIN1) +#define GPIO_A1_INT (GPIO_A1_IN|GPIO_EXTI) + +/* GPIO_A2 definition */ + +#define GPIO_A2_OUT (GPIO_OUTPUT|GPIO_A2_OUTTYPE|GPIO_A2_OUT_DEFAULT|\ + GPIO_A2_PULL|GPIO_A2_SPEED|GPIO_PORTA|GPIO_PIN2) +#define GPIO_A2_IN (GPIO_INPUT|GPIO_A2_PULL|GPIO_A2_SPEED|\ + GPIO_PORTA|GPIO_PIN2) +#define GPIO_A2_INT (GPIO_A2_IN|GPIO_EXTI) + +/* GPIO_A3 definition */ + +#define GPIO_A3_OUT (GPIO_OUTPUT|GPIO_A3_OUTTYPE|GPIO_A3_OUT_DEFAULT|\ + GPIO_A3_PULL|GPIO_A3_SPEED|GPIO_PORTA|GPIO_PIN3) +#define GPIO_A3_IN (GPIO_INPUT|GPIO_A3_PULL|GPIO_A3_SPEED|\ + GPIO_PORTA|GPIO_PIN3) +#define GPIO_A3_INT (GPIO_A3_IN|GPIO_EXTI) + +/* GPIO_A4 definition */ + +#define GPIO_A4_OUT (GPIO_OUTPUT|GPIO_A4_OUTTYPE|GPIO_A4_OUT_DEFAULT|\ + GPIO_A4_PULL|GPIO_A4_SPEED|GPIO_PORTA|GPIO_PIN4) +#define GPIO_A4_IN (GPIO_INPUT|GPIO_A4_PULL|GPIO_A4_SPEED|\ + GPIO_PORTA|GPIO_PIN4) +#define GPIO_A4_INT (GPIO_A4_IN|GPIO_EXTI) + +/* GPIO_A5 definition */ + +#define GPIO_A5_OUT (GPIO_OUTPUT|GPIO_A5_OUTTYPE|GPIO_A5_OUT_DEFAULT|\ + GPIO_A5_PULL|GPIO_A5_SPEED|GPIO_PORTA|GPIO_PIN5) +#define GPIO_A5_IN (GPIO_INPUT|GPIO_A5_PULL|GPIO_A5_SPEED|\ + GPIO_PORTA|GPIO_PIN5) +#define GPIO_A5_INT (GPIO_A5_IN|GPIO_EXTI) + +/* GPIO_A6 definition */ + +#define GPIO_A6_OUT (GPIO_OUTPUT|GPIO_A6_OUTTYPE|GPIO_A6_OUT_DEFAULT|\ + GPIO_A6_PULL|GPIO_A6_SPEED|GPIO_PORTA|GPIO_PIN6) +#define GPIO_A6_IN (GPIO_INPUT|GPIO_A6_PULL|GPIO_A6_SPEED|\ + GPIO_PORTA|GPIO_PIN6) +#define GPIO_A6_INT (GPIO_A6_IN|GPIO_EXTI) + +/* GPIO_A7 definition */ + +#define GPIO_A7_OUT (GPIO_OUTPUT|GPIO_A7_OUTTYPE|GPIO_A7_OUT_DEFAULT|\ + GPIO_A7_PULL|GPIO_A7_SPEED|GPIO_PORTA|GPIO_PIN7) +#define GPIO_A7_IN (GPIO_INPUT|GPIO_A7_PULL|GPIO_A7_SPEED|\ + GPIO_PORTA|GPIO_PIN7) +#define GPIO_A7_INT (GPIO_A7_IN|GPIO_EXTI) + +/* GPIO_A8 definition */ + +#define GPIO_A8_OUT (GPIO_OUTPUT|GPIO_A8_OUTTYPE|GPIO_A8_OUT_DEFAULT|\ + GPIO_A8_PULL|GPIO_A8_SPEED|GPIO_PORTA|GPIO_PIN8) +#define GPIO_A8_IN (GPIO_INPUT|GPIO_A8_PULL|GPIO_A8_SPEED|\ + GPIO_PORTA|GPIO_PIN8) +#define GPIO_A8_INT (GPIO_A8_IN|GPIO_EXTI) + +/* GPIO_A9 definition */ + +#define GPIO_A9_OUT (GPIO_OUTPUT|GPIO_A9_OUTTYPE|GPIO_A9_OUT_DEFAULT|\ + GPIO_A9_PULL|GPIO_A9_SPEED|GPIO_PORTA|GPIO_PIN9) +#define GPIO_A9_IN (GPIO_INPUT|GPIO_A9_PULL|GPIO_A9_SPEED|\ + GPIO_PORTA|GPIO_PIN9) +#define GPIO_A9_INT (GPIO_A9_IN|GPIO_EXTI) + +/* GPIO_A10 definition */ + +#define GPIO_A10_OUT (GPIO_OUTPUT|GPIO_A10_OUTTYPE|GPIO_A10_OUT_DEFAULT|\ + GPIO_A10_PULL|GPIO_A10_SPEED|GPIO_PORTA|GPIO_PIN10) +#define GPIO_A10_IN (GPIO_INPUT|GPIO_A10_PULL|GPIO_A10_SPEED|\ + GPIO_PORTA|GPIO_PIN10) +#define GPIO_A10_INT (GPIO_A10_IN|GPIO_EXTI) + +/* GPIO_A11 definition */ + +#define GPIO_A11_OUT (GPIO_OUTPUT|GPIO_A11_OUTTYPE|GPIO_A11_OUT_DEFAULT|\ + GPIO_A11_PULL|GPIO_A11_SPEED|GPIO_PORTA|GPIO_PIN11) +#define GPIO_A11_IN (GPIO_INPUT|GPIO_A11_PULL|GPIO_A11_SPEED|\ + GPIO_PORTA|GPIO_PIN11) +#define GPIO_A11_INT (GPIO_A11_IN|GPIO_EXTI) + +/* GPIO_A12 definition */ + +#define GPIO_A12_OUT (GPIO_OUTPUT|GPIO_A12_OUTTYPE|GPIO_A12_OUT_DEFAULT|\ + GPIO_A12_PULL|GPIO_A12_SPEED|GPIO_PORTA|GPIO_PIN12) +#define GPIO_A12_IN (GPIO_INPUT|GPIO_A12_PULL|GPIO_A12_SPEED|\ + GPIO_PORTA|GPIO_PIN12) +#define GPIO_A12_INT (GPIO_A12_IN|GPIO_EXTI) + +/* GPIO_A15 definition */ + +#define GPIO_A15_OUT (GPIO_OUTPUT|GPIO_A15_OUTTYPE|GPIO_A15_OUT_DEFAULT|\ + GPIO_A15_PULL|GPIO_A15_SPEED|GPIO_PORTA|GPIO_PIN15) +#define GPIO_A15_IN (GPIO_INPUT|GPIO_A15_PULL|GPIO_A15_SPEED|\ + GPIO_PORTA|GPIO_PIN15) +#define GPIO_A15_INT (GPIO_A15_IN|GPIO_EXTI) + +/* GPIO_B0 definition */ + +#define GPIO_B0_OUT (GPIO_OUTPUT|GPIO_B0_OUTTYPE|GPIO_B0_OUT_DEFAULT|\ + GPIO_B0_PULL|GPIO_B0_SPEED|GPIO_PORTB|GPIO_PIN0) +#define GPIO_B0_IN (GPIO_INPUT|GPIO_B0_PULL|GPIO_B0_SPEED|\ + GPIO_PORTB|GPIO_PIN0) +#define GPIO_B0_INT (GPIO_B0_IN|GPIO_EXTI) + +/* GPIO_B1 definition */ + +#define GPIO_B1_OUT (GPIO_OUTPUT|GPIO_B1_OUTTYPE|GPIO_B1_OUT_DEFAULT|\ + GPIO_B1_PULL|GPIO_B1_SPEED|GPIO_PORTB|GPIO_PIN1) +#define GPIO_B1_IN (GPIO_INPUT|GPIO_B1_PULL|GPIO_B1_SPEED|\ + GPIO_PORTB|GPIO_PIN1) +#define GPIO_B1_INT (GPIO_B1_IN|GPIO_EXTI) + +/* GPIO_B2 definition */ + +#define GPIO_B2_OUT (GPIO_OUTPUT|GPIO_B2_OUTTYPE|GPIO_B2_OUT_DEFAULT|\ + GPIO_B2_PULL|GPIO_B2_SPEED|GPIO_PORTB|GPIO_PIN2) +#define GPIO_B2_IN (GPIO_INPUT|GPIO_B2_PULL|GPIO_B2_SPEED|\ + GPIO_PORTB|GPIO_PIN2) +#define GPIO_B2_INT (GPIO_B2_IN|GPIO_EXTI) + +/* GPIO_B3 definition */ + +#define GPIO_B3_OUT (GPIO_OUTPUT|GPIO_B3_OUTTYPE|GPIO_B3_OUT_DEFAULT|\ + GPIO_B3_PULL|GPIO_B3_SPEED|GPIO_PORTB|GPIO_PIN3) +#define GPIO_B3_IN (GPIO_INPUT|GPIO_B3_PULL|GPIO_B3_SPEED|\ + GPIO_PORTB|GPIO_PIN3) +#define GPIO_B3_INT (GPIO_B3_IN|GPIO_EXTI) + +/* GPIO_B4 definition */ + +#define GPIO_B4_OUT (GPIO_OUTPUT|GPIO_B4_OUTTYPE|GPIO_B4_OUT_DEFAULT|\ + GPIO_B4_PULL|GPIO_B4_SPEED|GPIO_PORTB|GPIO_PIN4) +#define GPIO_B4_IN (GPIO_INPUT|GPIO_B4_PULL|GPIO_B4_SPEED|\ + GPIO_PORTB|GPIO_PIN4) +#define GPIO_B4_INT (GPIO_B4_IN|GPIO_EXTI) + +/* GPIO_B5 definition */ + +#define GPIO_B5_OUT (GPIO_OUTPUT|GPIO_B5_OUTTYPE|GPIO_B5_OUT_DEFAULT|\ + GPIO_B5_PULL|GPIO_B5_SPEED|GPIO_PORTB|GPIO_PIN5) +#define GPIO_B5_IN (GPIO_INPUT|GPIO_B5_PULL|GPIO_B5_SPEED|\ + GPIO_PORTB|GPIO_PIN5) +#define GPIO_B5_INT (GPIO_B5_IN|GPIO_EXTI) + +/* GPIO_B6 definition */ + +#define GPIO_B6_OUT (GPIO_OUTPUT|GPIO_B6_OUTTYPE|GPIO_B6_OUT_DEFAULT|\ + GPIO_B6_PULL|GPIO_B6_SPEED|GPIO_PORTB|GPIO_PIN6) +#define GPIO_B6_IN (GPIO_INPUT|GPIO_B6_PULL|GPIO_B6_SPEED|\ + GPIO_PORTB|GPIO_PIN6) +#define GPIO_B6_INT (GPIO_B6_IN|GPIO_EXTI) + +/* GPIO_B7 definition */ + +#define GPIO_B7_OUT (GPIO_OUTPUT|GPIO_B7_OUTTYPE|GPIO_B7_OUT_DEFAULT|\ + GPIO_B7_PULL|GPIO_B7_SPEED|GPIO_PORTB|GPIO_PIN7) +#define GPIO_B7_IN (GPIO_INPUT|GPIO_B7_PULL|GPIO_B7_SPEED|\ + GPIO_PORTB|GPIO_PIN7) +#define GPIO_B7_INT (GPIO_B7_IN|GPIO_EXTI) + +/* GPIO_B8 definition */ + +#define GPIO_B8_OUT (GPIO_OUTPUT|GPIO_B8_OUTTYPE|GPIO_B8_OUT_DEFAULT|\ + GPIO_B8_PULL|GPIO_B8_SPEED|GPIO_PORTB|GPIO_PIN8) +#define GPIO_B8_IN (GPIO_INPUT|GPIO_B8_PULL|GPIO_B8_SPEED|\ + GPIO_PORTB|GPIO_PIN8) +#define GPIO_B8_INT (GPIO_B8_IN|GPIO_EXTI) + +/* GPIO_B9 definition */ + +#define GPIO_B9_OUT (GPIO_OUTPUT|GPIO_B9_OUTTYPE|GPIO_B9_OUT_DEFAULT|\ + GPIO_B9_PULL|GPIO_B9_SPEED|GPIO_PORTB|GPIO_PIN9) +#define GPIO_B9_IN (GPIO_INPUT|GPIO_B9_PULL|GPIO_B9_SPEED|\ + GPIO_PORTB|GPIO_PIN9) +#define GPIO_B9_INT (GPIO_B9_IN|GPIO_EXTI) + +/* GPIO_B10 definition */ + +#define GPIO_B10_OUT (GPIO_OUTPUT|GPIO_B10_OUTTYPE|GPIO_B10_OUT_DEFAULT|\ + GPIO_B10_PULL|GPIO_B10_SPEED|GPIO_PORTB|GPIO_PIN10) +#define GPIO_B10_IN (GPIO_INPUT|GPIO_B10_PULL|GPIO_B10_SPEED|\ + GPIO_PORTB|GPIO_PIN10) +#define GPIO_B10_INT (GPIO_B10_IN|GPIO_EXTI) + +/* GPIO_B12 definition */ + +#define GPIO_B12_OUT (GPIO_OUTPUT|GPIO_B12_OUTTYPE|GPIO_B12_OUT_DEFAULT|\ + GPIO_B12_PULL|GPIO_B12_SPEED|GPIO_PORTB|GPIO_PIN12) +#define GPIO_B12_IN (GPIO_INPUT|GPIO_B12_PULL|GPIO_B12_SPEED|\ + GPIO_PORTB|GPIO_PIN12) +#define GPIO_B12_INT (GPIO_B12_IN|GPIO_EXTI) + +/* GPIO_B13 definition */ + +#define GPIO_B13_OUT (GPIO_OUTPUT|GPIO_B13_OUTTYPE|GPIO_B13_OUT_DEFAULT|\ + GPIO_B13_PULL|GPIO_B13_SPEED|GPIO_PORTB|GPIO_PIN13) +#define GPIO_B13_IN (GPIO_INPUT|GPIO_B13_PULL|GPIO_B13_SPEED|\ + GPIO_PORTB|GPIO_PIN13) +#define GPIO_B13_INT (GPIO_B13_IN|GPIO_EXTI) + +/* GPIO_B14 definition */ + +#define GPIO_B14_OUT (GPIO_OUTPUT|GPIO_B14_OUTTYPE|GPIO_B14_OUT_DEFAULT|\ + GPIO_B14_PULL|GPIO_B14_SPEED|GPIO_PORTB|GPIO_PIN14) +#define GPIO_B14_IN (GPIO_INPUT|GPIO_B14_PULL|GPIO_B14_SPEED|\ + GPIO_PORTB|GPIO_PIN14) +#define GPIO_B14_INT (GPIO_B14_IN|GPIO_EXTI) + +/* GPIO_B15 definition */ + +#define GPIO_B15_OUT (GPIO_OUTPUT|GPIO_B15_OUTTYPE|GPIO_B15_OUT_DEFAULT|\ + GPIO_B15_PULL|GPIO_B15_SPEED|GPIO_PORTB|GPIO_PIN15) +#define GPIO_B15_IN (GPIO_INPUT|GPIO_B15_PULL|GPIO_B15_SPEED|\ + GPIO_PORTB|GPIO_PIN15) +#define GPIO_B15_INT (GPIO_B15_IN|GPIO_EXTI) + +/* GPIO_C13 definition */ + +#define GPIO_C13_OUT (GPIO_OUTPUT|GPIO_C13_OUTTYPE|GPIO_C13_OUT_DEFAULT|\ + GPIO_C13_PULL|GPIO_C13_SPEED|GPIO_PORTC|GPIO_PIN13) +#define GPIO_C13_IN (GPIO_INPUT|GPIO_C13_PULL|GPIO_C13_SPEED|\ + GPIO_PORTC|GPIO_PIN13) +#define GPIO_C13_INT (GPIO_C13_IN|GPIO_EXTI) + +/* GPIO_C14 definition */ + +#define GPIO_C14_OUT (GPIO_OUTPUT|GPIO_C14_OUTTYPE|GPIO_C14_OUT_DEFAULT|\ + GPIO_C14_PULL|GPIO_C14_SPEED|GPIO_PORTC|GPIO_PIN14) +#define GPIO_C14_IN (GPIO_INPUT|GPIO_C14_PULL|GPIO_C14_SPEED|\ + GPIO_PORTC|GPIO_PIN14) +#define GPIO_C14_INT (GPIO_C14_IN|GPIO_EXTI) + +/* GPIO_C15 definition */ + +#define GPIO_C15_OUT (GPIO_OUTPUT|GPIO_C15_OUTTYPE|GPIO_C15_OUT_DEFAULT|\ + GPIO_C15_PULL|GPIO_C15_SPEED|GPIO_PORTC|GPIO_PIN15) +#define GPIO_C15_IN (GPIO_INPUT|GPIO_C15_PULL|GPIO_C15_SPEED|\ + GPIO_PORTC|GPIO_PIN15) +#define GPIO_C15_INT (GPIO_C15_IN|GPIO_EXTI) + +#define BOARD_NGPIO_OUT \ + GPIO_A0_USED_OUT + \ + GPIO_A1_USED_OUT + \ + GPIO_A2_USED_OUT + \ + GPIO_A3_USED_OUT + \ + GPIO_A4_USED_OUT + \ + GPIO_A5_USED_OUT + \ + GPIO_A6_USED_OUT + \ + GPIO_A7_USED_OUT + \ + GPIO_A8_USED_OUT + \ + GPIO_A9_USED_OUT + \ + GPIO_A10_USED_OUT + \ + GPIO_A11_USED_OUT + \ + GPIO_A12_USED_OUT + \ + GPIO_A15_USED_OUT + \ + GPIO_B0_USED_OUT + \ + GPIO_B1_USED_OUT + \ + GPIO_B2_USED_OUT + \ + GPIO_B3_USED_OUT + \ + GPIO_B4_USED_OUT + \ + GPIO_B5_USED_OUT + \ + GPIO_B6_USED_OUT + \ + GPIO_B7_USED_OUT + \ + GPIO_B8_USED_OUT + \ + GPIO_B9_USED_OUT + \ + GPIO_B10_USED_OUT + \ + GPIO_B12_USED_OUT + \ + GPIO_B13_USED_OUT + \ + GPIO_B14_USED_OUT + \ + GPIO_B15_USED_OUT + \ + GPIO_C13_USED_OUT + \ + GPIO_C14_USED_OUT + \ + GPIO_C15_USED_OUT + +#define BOARD_NGPIO_IN \ + GPIO_A0_USED_IN + \ + GPIO_A1_USED_IN + \ + GPIO_A2_USED_IN + \ + GPIO_A3_USED_IN + \ + GPIO_A4_USED_IN + \ + GPIO_A5_USED_IN + \ + GPIO_A6_USED_IN + \ + GPIO_A7_USED_IN + \ + GPIO_A8_USED_IN + \ + GPIO_A9_USED_IN + \ + GPIO_A10_USED_IN + \ + GPIO_A11_USED_IN + \ + GPIO_A12_USED_IN + \ + GPIO_A15_USED_IN + \ + GPIO_B0_USED_IN + \ + GPIO_B1_USED_IN + \ + GPIO_B2_USED_IN + \ + GPIO_B3_USED_IN + \ + GPIO_B4_USED_IN + \ + GPIO_B5_USED_IN + \ + GPIO_B6_USED_IN + \ + GPIO_B7_USED_IN + \ + GPIO_B8_USED_IN + \ + GPIO_B9_USED_IN + \ + GPIO_B10_USED_IN + \ + GPIO_B12_USED_IN + \ + GPIO_B13_USED_IN + \ + GPIO_B14_USED_IN + \ + GPIO_B15_USED_IN + \ + GPIO_C13_USED_IN + \ + GPIO_C14_USED_IN + \ + GPIO_C15_USED_IN + +#define BOARD_NGPIO_INT \ + GPIO_A0_USED_INT + \ + GPIO_A1_USED_INT + \ + GPIO_A2_USED_INT + \ + GPIO_A3_USED_INT + \ + GPIO_A4_USED_INT + \ + GPIO_A5_USED_INT + \ + GPIO_A6_USED_INT + \ + GPIO_A7_USED_INT + \ + GPIO_A8_USED_INT + \ + GPIO_A9_USED_INT + \ + GPIO_A10_USED_INT + \ + GPIO_A11_USED_INT + \ + GPIO_A12_USED_INT + \ + GPIO_A15_USED_INT + \ + GPIO_B0_USED_INT + \ + GPIO_B1_USED_INT + \ + GPIO_B2_USED_INT + \ + GPIO_B3_USED_INT + \ + GPIO_B4_USED_INT + \ + GPIO_B5_USED_INT + \ + GPIO_B6_USED_INT + \ + GPIO_B7_USED_INT + \ + GPIO_B8_USED_INT + \ + GPIO_B9_USED_INT + \ + GPIO_B10_USED_INT + \ + GPIO_B12_USED_INT + \ + GPIO_B13_USED_INT + \ + GPIO_B14_USED_INT + \ + GPIO_B15_USED_INT + \ + GPIO_C13_USED_INT + \ + GPIO_C14_USED_INT + \ + GPIO_C15_USED_INT + +#if BOARD_NGPIO_INT > CONFIG_DEV_GPIO_NSIGNALS +# error You have enabled more interrupts than supported, adjust CONFIG_DEV_GPIO_NSIGNALS to support them all +#endif + +#endif /* __BOARDS_ARM_STM32_STM32F411_MINIMUM_SRC_STM32F411_MINIMUM_GPIO_H */ diff --git a/boards/arm/stm32/stm32f411-minimum/src/stm32f411-minimum.h b/boards/arm/stm32/stm32f411-minimum/src/stm32f411-minimum.h index 47e5b3a10e..53770be266 100644 --- a/boards/arm/stm32/stm32f411-minimum/src/stm32f411-minimum.h +++ b/boards/arm/stm32/stm32f411-minimum/src/stm32f411-minimum.h @@ -27,9 +27,14 @@ #include #include +#include #include +#ifdef CONFIG_STM32F411MINIMUM_GPIO +#include "stm32f411-minimum-gpio.h" +#endif + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -183,6 +188,18 @@ void stm32_usbinitialize(void); int stm32_usbhost_initialize(void); #endif +/**************************************************************************** + * Name: stm32_gpio_initialize + * + * Description: + * Initialize GPIO drivers + * + ****************************************************************************/ + +#ifdef CONFIG_STM32F411MINIMUM_GPIO +int stm32_gpio_initialize(void); +#endif + /**************************************************************************** * Name: stm32_bringup *