mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-06-12 01:25:59 +00:00
45 lines
854 B
C++
45 lines
854 B
C++
/**
|
|
* @file
|
|
* @brief Delay functions.
|
|
*
|
|
* Configuration:
|
|
* * STA_RASPI_DELAY_US_TIM: 1 MHz TIM instance used by sta::delayUs
|
|
*
|
|
* NOTE: TIM time base must be started before use of sta::delayUs by calling sta::initHAL.
|
|
* When using startup system task this is handled automatically.
|
|
*/
|
|
#ifndef STA_CORE_RASPI_DELAY_HPP
|
|
#define STA_CORE_RASPI_DELAY_HPP
|
|
|
|
|
|
// Only enable module on RASPI platform
|
|
#include <sta/config.hpp>
|
|
|
|
|
|
#if defined(STA_PLATFORM_RASPI) || defined(DOXYGEN)
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
namespace sta
|
|
{
|
|
/**
|
|
* @brief Millisecond delay.
|
|
*
|
|
* @param ms Milliseconds
|
|
*/
|
|
void delayMs(uint32_t ms);
|
|
|
|
/**
|
|
* @brief Microsecond delay.
|
|
*
|
|
* @param us Microseconds
|
|
*/
|
|
void delayUs(uint32_t us);
|
|
} // namespace sta
|
|
|
|
|
|
#endif // STA_PLATFORM_RASPI
|
|
|
|
#endif // STA_CORE_RASPI_DELAY_HPP
|