watchdog: Rename WATCHDOG_AUTOMONITOR_BY_TIMER to WATCHDOG_AUTOMONITOR_BY_WDOG
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
711681a90d
commit
47d2859f85
@ -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
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user