Commit 7e31f6be authored by Michael Hope's avatar Michael Hope Committed by Benjamin Cabé
Browse files

samples: watchdog: add the ch32v003evt to the sample

The CH32V003 has a straight-forward watchdog that does not support
callbacks. Add an overlay and support.

To make the sample fit in flash, remove the unused logging from the
project configuration. The sample itself doesn't seem to use logging
so this is (mostly) a no-op.

Signed-off-by: default avatarMichael Hope <michaelh@juju.nz>
parent 7f21dc2d
Loading
Loading
Loading
Loading
+1 −0
Changes for samples/drivers/watchdog/boards/ch32v003evt.conf: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
CONFIG_LOG_MODE_MINIMAL=y
+15 −0
Changes for samples/drivers/watchdog/boards/ch32v003evt.overlay: 15 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*
 * Copyright (c) 2025 Michael Hope <michaelh@juju.nz>
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/ {
	aliases {
		watchdog0 = &iwdg;
	};
};

&iwdg {
	status = "okay";
};
+3 −0
Changes for samples/drivers/watchdog/src/main.c: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -42,6 +42,9 @@
#define WDG_FEED_INTERVAL (WDT_MIN_WINDOW + ((WDT_MAX_WINDOW - WDT_MIN_WINDOW) / 4))
#elif DT_HAS_COMPAT_STATUS_OKAY(renesas_ra_wdt)
#define WDT_ALLOW_CALLBACK 0
#elif DT_HAS_COMPAT_STATUS_OKAY(wch_iwdg)
#define WDT_ALLOW_CALLBACK 0
#define WDT_OPT            0
#endif

#ifndef WDT_ALLOW_CALLBACK