added profiler and updated delay implementation

This commit is contained in:
dario
2024-05-22 13:07:36 +02:00
parent 7aac2badc5
commit 767bd19c36
6 changed files with 99 additions and 3 deletions

View File

@@ -58,6 +58,7 @@ namespace sta
*/
#define _STA_STM32_PCLK_IDX_MAP(type, idx) STA_STM32_ ## type ## _ ## idx ## _PCLK_IDX
// Get HAL handle to PCLK index map macro
/**
* @brief Map instance handle to PCLK index.
*

View File

@@ -16,12 +16,27 @@ namespace sta
* @return Time in milliseconds
*/
using TimeMsFn = uint32_t (*)();
/**
* @brief Signature for microseconds precision time.
*
* @return Time in microseconds
*/
using TimeUsFn = uint32_t (*)();
/**
* @brief Gets the current time in milliseconds.
*
* @return Time in milliseconds
*/
uint32_t timeMs();
/**
* @brief Gets the current time in microseconds.
*
* @return Time in microseconds
*/
uint32_t timeUs();
} // namespace sta