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:
wangchengdong 2025-12-15 09:25:04 +08:00 committed by archer
parent 506c75069d
commit a86af7abcd

View file

@ -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)
{