mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-08-05 18:21:54 +00:00
Added I2C support for raspi & first rework of debugging
This commit is contained in:
57
include/sta/devices/stm32/delay.hpp
Normal file
57
include/sta/devices/stm32/delay.hpp
Normal file
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief Delay functions.
|
||||
*
|
||||
* Configuration:
|
||||
* * STA_STM32_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_STM32_DELAY_HPP
|
||||
#define STA_CORE_STM32_DELAY_HPP
|
||||
|
||||
|
||||
// Only enable module on STM32 platform
|
||||
#include <sta/config.hpp>
|
||||
|
||||
|
||||
#if defined(STA_PLATFORM_STM32) || defined(DOXYGEN)
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
namespace sta
|
||||
{
|
||||
/**
|
||||
* @defgroup sta_core_stm32_delay Delay
|
||||
* @ingroup sta_core_stm32
|
||||
* @brief STM32 Delay module.
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Millisecond delay.
|
||||
*
|
||||
* @param ms Milliseconds
|
||||
*/
|
||||
void delayMs(uint32_t ms);
|
||||
|
||||
#if defined(STA_STM32_DELAY_US_TIM) || defined(DOXYGEN)
|
||||
/**
|
||||
* @brief Microsecond delay.
|
||||
*
|
||||
* @param us Microseconds
|
||||
*/
|
||||
void delayUs(uint32_t us);
|
||||
#endif // STA_STM32_DELAY_US_TIM
|
||||
|
||||
|
||||
/** @} */
|
||||
} // namespace sta
|
||||
|
||||
|
||||
#endif // STA_PLATFORM_STM32
|
||||
|
||||
#endif // STA_CORE_STM32_DELAY_HPP
|
Reference in New Issue
Block a user