sys_clock: move [nano|task]_cycle_get_32 to drivers
The drivers provide _sys_clock_cycle_get(): moving the public APIs to the drivers allow them to be aliases of it. Change-Id: Ic5975a048f2b51f94510f0c3cd5e6ab3a8907718 Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
1611816a7d
commit
bb2ba33f10
|
@ -204,6 +204,9 @@ uint32_t _sys_clock_cycle_get(void)
|
||||||
return (clock_accumulated_count + count_get());
|
return (clock_accumulated_count + count_get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FUNC_ALIAS(_sys_clock_cycle_get, nano_cycle_get_32, uint32_t);
|
||||||
|
FUNC_ALIAS(_sys_clock_cycle_get, task_cycle_get_32, uint32_t);
|
||||||
|
|
||||||
#if defined(CONFIG_SYSTEM_TIMER_DISABLE)
|
#if defined(CONFIG_SYSTEM_TIMER_DISABLE)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -665,6 +665,9 @@ uint32_t _sys_clock_cycle_get(void)
|
||||||
return clock_accumulated_count + (__scs.systick.strvr - __scs.systick.stcvr);
|
return clock_accumulated_count + (__scs.systick.strvr - __scs.systick.stcvr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FUNC_ALIAS(_sys_clock_cycle_get, nano_cycle_get_32, uint32_t);
|
||||||
|
FUNC_ALIAS(_sys_clock_cycle_get, task_cycle_get_32, uint32_t);
|
||||||
|
|
||||||
#ifdef CONFIG_SYSTEM_TIMER_DISABLE
|
#ifdef CONFIG_SYSTEM_TIMER_DISABLE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -661,6 +661,9 @@ uint32_t _sys_clock_cycle_get(void)
|
||||||
return (uint32_t) *_HPET_MAIN_COUNTER_VALUE;
|
return (uint32_t) *_HPET_MAIN_COUNTER_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FUNC_ALIAS(_sys_clock_cycle_get, nano_cycle_get_32, uint32_t);
|
||||||
|
FUNC_ALIAS(_sys_clock_cycle_get, task_cycle_get_32, uint32_t);
|
||||||
|
|
||||||
#ifdef CONFIG_SYSTEM_TIMER_DISABLE
|
#ifdef CONFIG_SYSTEM_TIMER_DISABLE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -590,6 +590,9 @@ uint32_t _sys_clock_cycle_get(void)
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FUNC_ALIAS(_sys_clock_cycle_get, nano_cycle_get_32, uint32_t);
|
||||||
|
FUNC_ALIAS(_sys_clock_cycle_get, task_cycle_get_32, uint32_t);
|
||||||
|
|
||||||
#if defined(CONFIG_SYSTEM_TIMER_DISABLE)
|
#if defined(CONFIG_SYSTEM_TIMER_DISABLE)
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -69,11 +69,6 @@ int sys_clock_us_per_tick;
|
||||||
int sys_clock_hw_cycles_per_tick;
|
int sys_clock_hw_cycles_per_tick;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint32_t task_cycle_get_32(void)
|
|
||||||
{
|
|
||||||
return _sys_clock_cycle_get();
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t task_tick_get_32(void)
|
int32_t task_tick_get_32(void)
|
||||||
{
|
{
|
||||||
return (int32_t)_k_sys_clock_tick_count;
|
return (int32_t)_k_sys_clock_tick_count;
|
||||||
|
|
|
@ -92,11 +92,6 @@ int64_t nano_tick_get(void)
|
||||||
return tmp_nano_ticks;
|
return tmp_nano_ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t nano_cycle_get_32(void)
|
|
||||||
{
|
|
||||||
return _sys_clock_cycle_get();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @brief Return number of ticks since a reference time
|
* @brief Return number of ticks since a reference time
|
||||||
|
|
Loading…
Reference in a new issue