well, I assume within your inline statement you need "#include "stm32f4xx_hal.h"” instead of "#include "stm32f4xx_hal_gpio.h”". Then all further includes will be managed within "#include "stm32f4xx_hal.h", which itself is configured by "TargetSpecific/stm32f4xx_hal_conf.h" within our preconfigured STM32CubeIDE project.
In “stm32f4xx_hal_conf.h” you can find all available HAL modules right at the beginning:
As you can see, the GPIO Module is already enabled and its corresponding .c is already included into the project. You can find the C file under “ThirdParty/STM32Cube_FW_F4/Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal_gpio.c ". So, in your case you do not have to reconfigured the HAL. You can use all GPIO HAL function right inside your inline statement after including "stm32f4xx_hal.h".
But I would recommend to take a look into the Emedded Wizard example “DeviceIntegration” in combination with “Application/Source/DeviceDriver.c”, “TargetSpecific/ew_bsp_inout.c” and “TargetSpecific/stm32f4xx_it.c”. This example demonstrates how to use an interrupt sensitive button to perform an action within the Embedded Wizard HMI. It contains everything what you are looking for. Generally speaking the correct interface between an Embedded Wizard UI and the IDE Project is well documented in our doc article Device Interface.
If you have any further questions, please do not hesitate to ask again.
Ask Embedded Wizard
Welcome to the question and answer site for Embedded Wizard users and UI developers.
Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!