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:
Benjamin Walsh 2015-08-21 16:57:57 -04:00 committed by Anas Nashif
parent 1611816a7d
commit bb2ba33f10
6 changed files with 12 additions and 10 deletions

View file

@ -204,6 +204,9 @@ uint32_t _sys_clock_cycle_get(void)
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)
/**
*

View file

@ -665,6 +665,9 @@ uint32_t _sys_clock_cycle_get(void)
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
/**

View file

@ -661,6 +661,9 @@ uint32_t _sys_clock_cycle_get(void)
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
/**

View file

@ -590,6 +590,9 @@ uint32_t _sys_clock_cycle_get(void)
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)
/**
*

View file

@ -69,11 +69,6 @@ int sys_clock_us_per_tick;
int sys_clock_hw_cycles_per_tick;
#endif
uint32_t task_cycle_get_32(void)
{
return _sys_clock_cycle_get();
}
int32_t task_tick_get_32(void)
{
return (int32_t)_k_sys_clock_tick_count;

View file

@ -92,11 +92,6 @@ int64_t nano_tick_get(void)
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