This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 3b9c78831e684ca59df63dde57567660b2974f42
Author: ouyangxiangzhen <[email protected]>
AuthorDate: Fri Apr 3 15:47:28 2026 +0800

    timers: Add missing up_timer_start for arch_timer
    
    This commit added missing up_timer_start for arch_timer.
    
    Signed-off-by: ouyangxiangzhen <[email protected]>
---
 drivers/timers/arch_timer.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/timers/arch_timer.c b/drivers/timers/arch_timer.c
index 2cfef37cdae..31d5df2fd67 100644
--- a/drivers/timers/arch_timer.c
+++ b/drivers/timers/arch_timer.c
@@ -30,6 +30,7 @@
 
 #include <nuttx/arch.h>
 #include <nuttx/clock.h>
+#include <nuttx/debug.h>
 #include <nuttx/lib/math32.h>
 #include <nuttx/timers/arch_timer.h>
 
@@ -425,6 +426,23 @@ int weak_function up_timer_tick_start(clock_t ticks)
 
   return ret;
 }
+
+int weak_function up_timer_start(FAR const struct timespec *ts)
+{
+  int ret = -EAGAIN;
+
+  DEBUGASSERT(ts);
+
+  if (g_timer.lower != NULL)
+    {
+      clock_t ticks = clock_time2ticks(ts);
+
+      update_timeout(ticks);
+      ret = OK;
+    }
+
+  return ret;
+}
 #endif
 
 /****************************************************************************

Reply via email to