interface to get kernel tick added
This commit is contained in:
parent
46c3adc82b
commit
4aca55bdcc
@ -60,5 +60,6 @@ struct thread_context *thread_create(
|
||||
|
||||
void thread_exit(void);
|
||||
void sleep_ms(unsigned int ms);
|
||||
unsigned long sys_tick_get_ms(void);
|
||||
|
||||
#endif /* SOURCE_FIRMWARE_KERNEL_INTERFACE_KERNEL_H_ */
|
||||
|
@ -54,6 +54,11 @@ void sys_tick_init(const struct loki_timer *hw_timer)
|
||||
timer_set_it_callback(hw_timer, timer_cb, NULL);
|
||||
}
|
||||
|
||||
unsigned long sys_tick_get_ms(void)
|
||||
{
|
||||
return sys_tick_obj.tick;
|
||||
}
|
||||
|
||||
void sleep_ms(unsigned int ms)
|
||||
{
|
||||
int irq;
|
||||
@ -68,4 +73,3 @@ void sleep_ms(unsigned int ms)
|
||||
restore_irq(irq);
|
||||
schedule();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user