Fix #50: Enable core cycle counter

This commit is contained in:
2023-01-01 20:01:04 +01:00
parent fd12faff75
commit d48ccf1612
4 changed files with 52 additions and 8 deletions

View File

@@ -30,10 +30,16 @@
#include <stdint.h>
/**
* @brief Initialize/Reset the main cycle counter to 0.
* @brief Initialize the main cycle counter and reset to 0. This also enables the core cycle counter
* This function can be called multiple times.
*/
void main_cycle_counter_init(void);
void main_and_core_cycle_counter_init(void);
/**
* @brief Reset the main cycle counter.
* @note This does not reset the core cycle counter
*/
void main_cycle_counter_reset(void);
/**
* @brief Increment the main cycle counter by 1
@@ -46,6 +52,18 @@ void main_cycle_counter_inc(void);
*/
uint64_t main_cycle_counter_get(void);
/**
* @brief Reset the core cycle counter to 0
*/
void core_cycle_counter_reset(void);
/**
* @brief Get the current value of the core cycle counter
*
* @return uint32_t Counter value
*/
uint32_t core_cycle_counter_get(void);
#endif /* __MAIN_CYCLE_COUNTER_H__ */
/** @} */