mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-09-28 21:17:33 +00:00
Change module enable logic
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include <sta/stm32/can.hpp>
|
||||
#ifdef STA_STM32_CAN_ENABLE
|
||||
#ifdef STA_STM32_CAN_ENABLED
|
||||
|
||||
#include <sta/assert.hpp>
|
||||
#include <sta/lang.hpp>
|
||||
@@ -207,4 +207,4 @@ extern "C"
|
||||
#endif // STA_STM32_CAN_GLOBAL
|
||||
|
||||
|
||||
#endif // STA_STM32_CAN_ENABLE
|
||||
#endif // STA_STM32_CAN_ENABLED
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include <sta/stm32/delay.hpp>
|
||||
#ifdef STA_STM32_DELAY_ENABLE
|
||||
#ifdef STA_PLATFORM_STM32
|
||||
|
||||
#include <sta/stm32/hal.hpp>
|
||||
#include <sta/stm32/clocks.hpp>
|
||||
@@ -19,6 +19,10 @@ namespace sta
|
||||
|
||||
#ifdef STA_STM32_DELAY_US_TIM
|
||||
|
||||
#ifndef HAL_TIM_MODULE_ENABLED
|
||||
# error "STM32 HAL TIM module not enabled!"
|
||||
#endif // HAL_TIM_MODULE_ENABLED
|
||||
|
||||
#include <tim.h>
|
||||
|
||||
namespace sta
|
||||
@@ -68,4 +72,4 @@ namespace sta
|
||||
#endif // STA_STM32_DELAY_US_TIM
|
||||
|
||||
|
||||
#endif // STA_STM32_DELAY_ENABLE
|
||||
#endif // STA_PLATFORM_STM32
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include <sta/stm32/gpio_pin.hpp>
|
||||
#ifdef STA_STM32_GPIO_ENABLE
|
||||
#ifdef STA_STM32_GPIO_ENABLED
|
||||
|
||||
#include <sta/assert.hpp>
|
||||
#include <sta/lang.hpp>
|
||||
@@ -80,4 +80,4 @@ namespace sta
|
||||
} // namespace sta
|
||||
|
||||
|
||||
#endif // STA_STM32_GPIO_ENABLE
|
||||
#endif // STA_STM32_GPIO_ENABLED
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include <sta/stm32/spi.hpp>
|
||||
#ifdef STA_STM32_SPI_ENABLE
|
||||
#ifdef STA_STM32_SPI_ENABLED
|
||||
|
||||
#include <sta/assert.hpp>
|
||||
#include <sta/endian.hpp>
|
||||
@@ -10,13 +10,7 @@
|
||||
# define STA_STM32_SPI_REVERSE_BIT_ORDER SpiBitOrder::MSB
|
||||
#elif STA_MCU_BIG_ENDIAN
|
||||
# define STA_STM32_SPI_REVERSE_BIT_ORDER SpiBitOrder::LSB
|
||||
#else // !STA_MCU_LITTLE_ENDIAN && !STA_MCU_BIG_ENDIAN
|
||||
# ifdef STA_STM32_SPI_REVERSE_BIT_ORDER
|
||||
# warning "Internal STA_STM32_SPI_REVERSE_BIT_ORDER macro manually defined! Better now what you are doing!!!"
|
||||
# else // !STA_STM32_SPI_REVERSE_BIT_ORDER
|
||||
# error "Unknown endian-ness. Define STA_MCU_LITTLE_ENDIAN or STA_MCU_BIG_ENDIAN in <sta/config.hpp>"
|
||||
# endif // !STA_STM32_SPI_REVERSE_BIT_ORDER
|
||||
#endif // !STA_MCU_LITTLE_ENDIAN && !STA_MCU_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
|
||||
namespace sta
|
||||
@@ -178,4 +172,4 @@ namespace sta
|
||||
} // namespace sta
|
||||
|
||||
|
||||
#endif // STA_HAL_SPI_ENABLE
|
||||
#endif // STA_STM32_SPI_ENABLED
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include <sta/stm32/uart.hpp>
|
||||
#ifdef STA_STM32_UART_ENABLE
|
||||
#ifdef STA_STM32_UART_ENABLED
|
||||
|
||||
#include <sta/assert.hpp>
|
||||
|
||||
@@ -40,4 +40,4 @@ namespace sta
|
||||
#endif // STA_STM32_UART_DEBUG_SERIAL
|
||||
|
||||
|
||||
#endif // STA_STM32_UART_ENABLE
|
||||
#endif // STA_STM32_UART_ENABLED
|
||||
|
Reference in New Issue
Block a user