diff --git a/include/sta/devices/arduino/time.hpp b/include/sta/devices/arduino/time.hpp deleted file mode 100644 index 8d811e3..0000000 --- a/include/sta/devices/arduino/time.hpp +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef STA_DEVICES_ARDUINO_TIME_HPP -#define STA_DEVICES_ARDUINO_TIME_HPP - -#include -#ifdef STA_PLATFORM_ARDUINO - -#include - -namespace sta -{ - /** - * @brief The current time in milliseconds. - * - * @return uint32_t Returns current time in milliseconds. - */ - uint32_t now(); - - /** - * @brief The current time in microseconds. - * - * @return uint32_t Returns the current time in microseconds. - */ - uint32_t nowUs(); -} // namespace sta - -#endif // STA_PLATFORM_ARDUINO - -#endif // STA_DEVICES_ARDUINO_TIME_HPP \ No newline at end of file diff --git a/include/sta/devices/stm32/init.hpp b/include/sta/devices/stm32/init.hpp index cd34558..96d13ae 100644 --- a/include/sta/devices/stm32/init.hpp +++ b/include/sta/devices/stm32/init.hpp @@ -5,6 +5,9 @@ #ifndef STA_CORE_STM32_INIT_HPP #define STA_CORE_STM32_INIT_HPP +#include +#ifdef STA_PLATFORM_STM32 + #include namespace sta @@ -17,5 +20,6 @@ namespace sta void initHAL(); } // namespace sta +#endif // STA_PLATFORM_STM32 #endif // STA_CORE_STM32_INIT_HPP diff --git a/src/devices/arduino/time.cpp b/src/devices/arduino/time.cpp index 8597c6c..c43a38d 100644 --- a/src/devices/arduino/time.cpp +++ b/src/devices/arduino/time.cpp @@ -1,16 +1,17 @@ -#include +#include +#include #ifdef STA_PLATFORM_ARDUINO #include namespace sta { - uint32_t now() + uint32_t timeMs() { return millis(); } - uint32_t nowUs() + uint32_t timeUs() { return micros(); }