mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-12-17 00:58:02 +00:00
Change module enable logic
This commit is contained in:
@@ -22,12 +22,20 @@
|
||||
#endif // DOXYGEN
|
||||
|
||||
|
||||
// Only enable module on STM32 platform w/ HAL GPIO module enabled
|
||||
#include <sta/config.hpp>
|
||||
#ifdef STA_STM32_GPIO_ENABLE
|
||||
#ifdef STA_PLATFORM_STM32
|
||||
# include <sta/stm32/hal.hpp>
|
||||
# ifdef HAL_GPIO_MODULE_ENABLED
|
||||
# define STA_STM32_GPIO_ENABLED
|
||||
# endif // HAL_GPIO_MODULE_ENABLED
|
||||
#endif // STA_PLATFORM_STM32
|
||||
|
||||
|
||||
#ifdef STA_STM32_GPIO_ENABLED
|
||||
|
||||
#include <sta/gpio_pin.hpp>
|
||||
|
||||
#include <sta/stm32/hal.hpp>
|
||||
|
||||
|
||||
namespace sta
|
||||
@@ -103,6 +111,6 @@ namespace sta
|
||||
#define STA_STM32_GPIO_PIN(label) sta::STM32GpioPin{label##_GPIO_Port, label##_Pin}
|
||||
|
||||
|
||||
#endif // STA_STM32_GPIO_ENABLE
|
||||
#endif // STA_STM32_GPIO_ENABLED
|
||||
|
||||
#endif // STA_CORE_STM32_GPIO_PIN_HPP
|
||||
|
||||
Reference in New Issue
Block a user