sys_clock: Make sys_clock_hw_cycles_per_tick() a proper API
This was another "global variable" API. Give it function syntax too. Also add a warning, because on nRF devices (at least) the cycle clock runs in kHz and is too slow to give a precise answer here. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
cbb77be675
commit
b2e4283555
15 changed files with 59 additions and 66 deletions
|
@ -487,7 +487,7 @@ int _sys_clock_driver_init(struct device *device)
|
|||
timer0_control_register_set(0);
|
||||
timer0_count_register_set(0);
|
||||
|
||||
cycles_per_tick = sys_clock_hw_cycles_per_tick;
|
||||
cycles_per_tick = sys_clock_hw_cycles_per_tick();
|
||||
|
||||
IRQ_CONNECT(IRQ_TIMER0, CONFIG_ARCV2_TIMER_IRQ_PRIORITY,
|
||||
_timer_int_handler, NULL, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue