Skip to content

Commit

Permalink
tests: drivers: watchdog: wdt_basic_api:
Browse files Browse the repository at this point in the history
1. Add atcwdt200 options for WDT_NODE in testcase.
2. Add the board overlay file in wdt sample to specify
   the watchdog0 alias

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
  • Loading branch information
Kevin Wang authored and fabiobaltieri committed Jun 29, 2023
1 parent a9955d3 commit 5876cc5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions samples/drivers/watchdog/boards/adp_xc7k_ae350.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/*
* Copyright (c) 2023 Andes Technology Corporation.
*
* SPDX-License-Identifier: Apache-2.0
*/

/ {
aliases {
watchdog0 = &wdt;
};
};
4 changes: 4 additions & 0 deletions tests/drivers/watchdog/wdt_basic_api/src/test_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@
#define WDT_NODE DT_INST(0, gd_gd32_fwdgt)
#elif DT_HAS_COMPAT_STATUS_OKAY(zephyr_counter_watchdog)
#define WDT_NODE DT_COMPAT_GET_ANY_STATUS_OKAY(zephyr_counter_watchdog)
#elif DT_HAS_COMPAT_STATUS_OKAY(andestech_atcwdt200)
#define WDT_NODE DT_INST(0, andestech_atcwdt200)
#define TIMEOUTS 0
#define WDT_TEST_MAX_WINDOW 200U
#endif
#if DT_HAS_COMPAT_STATUS_OKAY(raspberrypi_pico_watchdog)
#define WDT_TEST_MAX_WINDOW 20000U
Expand Down

0 comments on commit 5876cc5

Please sign in to comment.