mirror of
https://github.com/apache/nuttx.git
synced 2026-08-04 05:39:01 +00:00
drivers/timers: Implement up_alarm_start() in arch_alarm.c
Add the implementation of up_alarm_start() in arch_alarm.c. Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
This commit is contained in:
parent
506c75069d
commit
a86af7abcd
1 changed files with 12 additions and 0 deletions
|
|
@ -367,6 +367,18 @@ int weak_function up_alarm_tick_cancel(FAR clock_t *ticks)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
int weak_function up_alarm_start(const struct timespec *ts)
|
||||
{
|
||||
int ret = -EAGAIN;
|
||||
|
||||
if (g_oneshot_lower != NULL)
|
||||
{
|
||||
ret = ONESHOT_ABSOLUTE(g_oneshot_lower, ts);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SCHED_TICKLESS
|
||||
int weak_function up_alarm_tick_start(clock_t ticks)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue