mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-06-12 01:25:59 +00:00
41 lines
738 B
C++
41 lines
738 B
C++
/**
|
|
* @brief Delay functions.
|
|
*
|
|
* Configuration:
|
|
* STA_HAL_DELAY_ENABLE: Enable module
|
|
* STA_HAL_DELAY_US_TIM: HAL TIM instance for `delayUs()`
|
|
*
|
|
* NOTE: Don't forget to start TIM. When using startup system task this
|
|
* is automatically handled.
|
|
*/
|
|
#ifndef STA_HAL_DELAY_HPP
|
|
#define STA_HAL_DELAY_HPP
|
|
|
|
#include <sta/config.hpp>
|
|
#ifdef STA_HAL_DELAY_ENABLE
|
|
|
|
|
|
namespace sta
|
|
{
|
|
/**
|
|
* @brief Millisecond delay.
|
|
*
|
|
* @param ms Milliseconds
|
|
*/
|
|
void delayMs(uint32_t ms);
|
|
|
|
#ifdef STA_HAL_DELAY_US_TIM
|
|
/**
|
|
* @brief Microsecond delay.
|
|
*
|
|
* @param us Microseconds
|
|
*/
|
|
void delayUs(uint32_t us);
|
|
#endif // STA_HAL_DELAY_US_TIM
|
|
} // namespace sta
|
|
|
|
|
|
#endif // STA_HAL_DELAY_TIM
|
|
|
|
#endif // STA_HAL_DELAY_HPP
|