clock: remove z_ from semi-public APIs
The clock/timer APIs are not application facing APIs, however, similar to arch_ and a few other APIs they are available to implement drivers and add support for new hardware and are documented and available to be used outside of the clock/kernel subsystems. Remove the leading z_ and provide them as clock_* APIs for someone writing a new timer driver to use. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
f943a5581d
commit
9c1efe6b4b
33 changed files with 171 additions and 168 deletions
|
@ -90,7 +90,7 @@ static void hpet_isr(const void *arg)
|
|||
}
|
||||
|
||||
k_spin_unlock(&lock, key);
|
||||
z_clock_announce(IS_ENABLED(CONFIG_TICKLESS_KERNEL) ? dticks : 1);
|
||||
sys_clock_announce(IS_ENABLED(CONFIG_TICKLESS_KERNEL) ? dticks : 1);
|
||||
}
|
||||
|
||||
static void set_timer0_irq(unsigned int irq)
|
||||
|
@ -106,7 +106,7 @@ static void set_timer0_irq(unsigned int irq)
|
|||
TIMER0_CONF_REG = val;
|
||||
}
|
||||
|
||||
int z_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
{
|
||||
extern int z_clock_hw_cycles_per_sec;
|
||||
uint32_t hz;
|
||||
|
@ -154,7 +154,7 @@ void smp_timer_init(void)
|
|||
*/
|
||||
}
|
||||
|
||||
void z_clock_set_timeout(int32_t ticks, bool idle)
|
||||
void sys_clock_set_timeout(int32_t ticks, bool idle)
|
||||
{
|
||||
ARG_UNUSED(idle);
|
||||
|
||||
|
@ -191,7 +191,7 @@ void z_clock_set_timeout(int32_t ticks, bool idle)
|
|||
#endif
|
||||
}
|
||||
|
||||
uint32_t z_clock_elapsed(void)
|
||||
uint32_t sys_clock_elapsed(void)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_TICKLESS_KERNEL)) {
|
||||
return 0;
|
||||
|
@ -209,7 +209,7 @@ uint32_t z_timer_cycle_get_32(void)
|
|||
return MAIN_COUNTER_REG;
|
||||
}
|
||||
|
||||
void z_clock_idle_exit(void)
|
||||
void sys_clock_idle_exit(void)
|
||||
{
|
||||
GENERAL_CONF_REG |= GCONF_ENABLE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue