minor update

This commit is contained in:
Gabriel Wang 2024-04-09 20:48:59 +01:00
parent f67b6598b0
commit e22be687f6
2 changed files with 13 additions and 1 deletions

View File

@ -127,6 +127,11 @@ void perfc_port_insert_to_system_timer_insert_ovf_handler(void)
}
uint32_t perfc_get_systimer_frequency(void)
{
return perfc_port_get_system_timer_freq();
}
__WEAK
void __perf_os_patch_init(void)
{
@ -157,7 +162,8 @@ bool init_cycle_counter(bool bIsSysTickOccupied)
s_lSystemClockCounts = 0; // reset system cycle counter
s_lSystemMS = 0; // reset system millisecond counter
s_lSystemUS = 0; // reset system microsecond counter
s_lOldTimestamp = 0;
__perf_os_patch_init();
return bResult;

View File

@ -669,6 +669,12 @@ int64_t stop_cycle_counter(void)
* @{
*/
/*!
* \brief get the system timer frequency
* \return uint32_t the system timer frequency in Hz
*/
extern uint32_t perfc_get_systimer_frequency(void);
/*!
* \brief get the elapsed milliseconds since perf_counter is initialised
* \return int64_t the elapsed milliseconds