This is an automated email from the ASF dual-hosted git repository. pkarashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 47d2859f853945651ddfadeaadac6f20df511834 Author: Xiang Xiao <xiaoxi...@xiaomi.com> AuthorDate: Sun Sep 18 10:18:40 2022 +0800 watchdog: Rename WATCHDOG_AUTOMONITOR_BY_TIMER to WATCHDOG_AUTOMONITOR_BY_WDOG Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com> --- drivers/timers/Kconfig | 10 +++++----- drivers/timers/watchdog.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/timers/Kconfig b/drivers/timers/Kconfig index 5160ae910e..8988d052b6 100644 --- a/drivers/timers/Kconfig +++ b/drivers/timers/Kconfig @@ -366,13 +366,13 @@ if WATCHDOG_AUTOMONITOR choice prompt "Auto-monitor keepalive by" - default WATCHDOG_AUTOMONITOR_BY_TIMER + default WATCHDOG_AUTOMONITOR_BY_WDOG config WATCHDOG_AUTOMONITOR_BY_CAPTURE bool "Capture callback" -config WATCHDOG_AUTOMONITOR_BY_TIMER - bool "Timer callback" +config WATCHDOG_AUTOMONITOR_BY_WDOG + bool "Wdog callback" config WATCHDOG_AUTOMONITOR_BY_WORKER bool "Worker callback" @@ -388,7 +388,7 @@ config WATCHDOG_AUTOMONITOR_TIMEOUT int "Auto-monitor reset timeout(second)" default 60 -if WATCHDOG_AUTOMONITOR_BY_TIMER || WATCHDOG_AUTOMONITOR_BY_WORKER +if WATCHDOG_AUTOMONITOR_BY_WDOG || WATCHDOG_AUTOMONITOR_BY_WORKER config WATCHDOG_AUTOMONITOR_PING_INTERVAL int "Auto-monitor keep a live interval" @@ -400,7 +400,7 @@ config WATCHDOG_AUTOMONITOR_PING_INTERVAL This interval will only be used by auto-monitor by Worker callback or by Timer callback. -endif # WATCHDOG_AUTOMONITOR_BY_TIMER || WATCHDOG_AUTOMONITOR_BY_WORKER +endif # WATCHDOG_AUTOMONITOR_BY_WDOG || WATCHDOG_AUTOMONITOR_BY_WORKER endif # WATCHDOG_AUTOMONITOR diff --git a/drivers/timers/watchdog.c b/drivers/timers/watchdog.c index 8cbe0f3b86..c81a3c4ad0 100644 --- a/drivers/timers/watchdog.c +++ b/drivers/timers/watchdog.c @@ -53,7 +53,7 @@ #define WATCHDOG_AUTOMONITOR_TIMEOUT_MSEC \ (1000 * CONFIG_WATCHDOG_AUTOMONITOR_TIMEOUT) -#if defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_TIMER) || \ +#if defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_WDOG) || \ defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_WORKER) #if (CONFIG_WATCHDOG_AUTOMONITOR_TIMEOUT == \ CONFIG_WATCHDOG_AUTOMONITOR_PING_INTERVAL) @@ -76,7 +76,7 @@ struct watchdog_upperhalf_s { #ifdef CONFIG_WATCHDOG_AUTOMONITOR -#if defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_TIMER) +#if defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_WDOG) struct wdog_s wdog; #elif defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_WORKER) struct work_s work; @@ -144,8 +144,8 @@ static int watchdog_automonitor_capture(int irq, FAR void *context, return 0; } -#elif defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_TIMER) -static void watchdog_automonitor_timer(wdparm_t arg) +#elif defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_WDOG) +static void watchdog_automonitor_wdog(wdparm_t arg) { FAR struct watchdog_upperhalf_s *upper = (FAR void *)arg; FAR struct watchdog_lowerhalf_s *lower = upper->lower; @@ -154,7 +154,7 @@ static void watchdog_automonitor_timer(wdparm_t arg) { lower->ops->keepalive(lower); wd_start(&upper->wdog, WATCHDOG_AUTOMONITOR_PING_INTERVAL, - watchdog_automonitor_timer, (wdparm_t)upper); + watchdog_automonitor_wdog, (wdparm_t)upper); } } #elif defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_WORKER) @@ -196,9 +196,9 @@ static void watchdog_automonitor_start(FAR struct watchdog_upperhalf_s upper->monitor = true; #if defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_CAPTURE) lower->ops->capture(lower, watchdog_automonitor_capture); -#elif defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_TIMER) +#elif defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_WDOG) wd_start(&upper->wdog, WATCHDOG_AUTOMONITOR_PING_INTERVAL, - watchdog_automonitor_timer, (wdparm_t)upper); + watchdog_automonitor_wdog, (wdparm_t)upper); #elif defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_WORKER) work_queue(LPWORK, &upper->work, watchdog_automonitor_worker, upper, WATCHDOG_AUTOMONITOR_PING_INTERVAL); @@ -225,7 +225,7 @@ static void watchdog_automonitor_stop(FAR struct watchdog_upperhalf_s *upper) lower->ops->stop(lower); #if defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_CAPTURE) lower->ops->capture(lower, NULL); -#elif defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_TIMER) +#elif defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_WDOG) wd_cancel(&upper->wdog); #elif defined(CONFIG_WATCHDOG_AUTOMONITOR_BY_WORKER) work_cancel(LPWORK, &upper->work);