mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-12-16 16:48:04 +00:00
Change module enable logic
This commit is contained in:
@@ -14,14 +14,6 @@
|
||||
*/
|
||||
|
||||
#ifdef DOXYGEN
|
||||
/**
|
||||
* @def STA_STM32_CAN_ENABLE
|
||||
* @brief Enable module.
|
||||
*
|
||||
* @ingroup stm32BuildConfig
|
||||
*/
|
||||
# define STA_STM32_CAN_ENABLE
|
||||
|
||||
/**
|
||||
* @def STA_STM32_CAN_GLOBAL
|
||||
* @brief Create global CanBus object using this CAN instance.
|
||||
@@ -32,12 +24,20 @@
|
||||
#endif // DOXYGEN
|
||||
|
||||
|
||||
|
||||
// Only enable module on STM32 platform w/ HAL CAN module enabled
|
||||
#include <sta/config.hpp>
|
||||
#ifdef STA_STM32_CAN_ENABLE
|
||||
#ifdef STA_PLATFORM_STM32
|
||||
# include <sta/stm32/hal.hpp>
|
||||
# ifdef HAL_CAN_MODULE_ENABLED
|
||||
# define STA_STM32_CAN_ENABLED
|
||||
# endif // HAL_CAN_MODULE_ENABLED
|
||||
#endif // STA_PLATFORM_STM32
|
||||
|
||||
#include <sta/can_bus/controller.hpp>
|
||||
|
||||
#include <sta/stm32/hal.hpp>
|
||||
#ifdef STA_STM32_CAN_ENABLED
|
||||
|
||||
#include <sta/can/controller.hpp>
|
||||
|
||||
|
||||
namespace sta
|
||||
@@ -124,6 +124,6 @@ namespace sta
|
||||
} // namespace sta
|
||||
|
||||
|
||||
#endif // STA_STM32_CAN_ENABLE
|
||||
#endif // STA_STM32_CAN_ENABLED
|
||||
|
||||
#endif // STA_CORE_STM32_CAN_HPP
|
||||
|
||||
Reference in New Issue
Block a user