mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-06-12 01:25:59 +00:00
Some fixes to ensure compatibility of arduino branch with stm32 features
This commit is contained in:
parent
dcc4bd2720
commit
e811292ffc
@ -1,28 +0,0 @@
|
|||||||
#ifndef STA_DEVICES_ARDUINO_TIME_HPP
|
|
||||||
#define STA_DEVICES_ARDUINO_TIME_HPP
|
|
||||||
|
|
||||||
#include <sta/config.hpp>
|
|
||||||
#ifdef STA_PLATFORM_ARDUINO
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
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
|
|
@ -5,6 +5,9 @@
|
|||||||
#ifndef STA_CORE_STM32_INIT_HPP
|
#ifndef STA_CORE_STM32_INIT_HPP
|
||||||
#define STA_CORE_STM32_INIT_HPP
|
#define STA_CORE_STM32_INIT_HPP
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
#ifdef STA_PLATFORM_STM32
|
||||||
|
|
||||||
#include <sta/devices/stm32/hal.hpp>
|
#include <sta/devices/stm32/hal.hpp>
|
||||||
|
|
||||||
namespace sta
|
namespace sta
|
||||||
@ -17,5 +20,6 @@ namespace sta
|
|||||||
void initHAL();
|
void initHAL();
|
||||||
} // namespace sta
|
} // namespace sta
|
||||||
|
|
||||||
|
#endif // STA_PLATFORM_STM32
|
||||||
|
|
||||||
#endif // STA_CORE_STM32_INIT_HPP
|
#endif // STA_CORE_STM32_INIT_HPP
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
#include <sta/devices/arduino/time.hpp>
|
#include <sta/time.hpp>
|
||||||
|
|
||||||
|
#include <sta/config.hpp>
|
||||||
#ifdef STA_PLATFORM_ARDUINO
|
#ifdef STA_PLATFORM_ARDUINO
|
||||||
#include <sta/devices/arduino/hal.hpp>
|
#include <sta/devices/arduino/hal.hpp>
|
||||||
|
|
||||||
namespace sta
|
namespace sta
|
||||||
{
|
{
|
||||||
uint32_t now()
|
uint32_t timeMs()
|
||||||
{
|
{
|
||||||
return millis();
|
return millis();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t nowUs()
|
uint32_t timeUs()
|
||||||
{
|
{
|
||||||
return micros();
|
return micros();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user