xiaoxiang781216 commented on code in PR #7126: URL: https://github.com/apache/incubator-nuttx/pull/7126#discussion_r975403684
########## drivers/timers/watchdog.c: ########## @@ -186,26 +223,49 @@ static void watchdog_automonitor_idle(FAR struct pm_callback_s *cb, #endif #ifdef CONFIG_WATCHDOG_AUTOMONITOR -static void watchdog_automonitor_start(FAR struct watchdog_upperhalf_s - *upper) +# if defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_ONESHOT) +static void +watchdog_automonitor_start(FAR struct watchdog_upperhalf_s *upper, + FAR struct oneshot_lowerhalf_s *oneshot) +# elif defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_TIMER) +static void +watchdog_automonitor_start(FAR struct watchdog_upperhalf_s *upper, + FAR struct timer_lowerhalf_s *timer) +# else +static void +watchdog_automonitor_start(FAR struct watchdog_upperhalf_s *upper) +# endif { FAR struct watchdog_lowerhalf_s *lower = upper->lower; if (!upper->monitor) { - upper->monitor = true; -#if defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_CAPTURE) +# if defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_CAPTURE) lower->ops->capture(lower, watchdog_automonitor_capture); +# elif defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_ONESHOT) + struct timespec ts = + { + WATCHDOG_AUTOMONITOR_PING_INTERVAL, 0 + }; Review Comment: Reply before. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org