Unit tests for Watchdog timer module.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include <conf_test.h>
#include <asf.h>
Functions | |
int | main (void) |
Set up and run test suite. More... | |
static void | mdelay (uint16_t ms) |
Delay for ms milliseconds. More... | |
static void | run_reset_cause_test (const struct test_case *test) |
Run test to check last reset cause. More... | |
Variables | |
bool | wdt_rc |
Flag to indicate if last reset is caused by watchdog timeout. More... | |
int main | ( | void | ) |
Set up and run test suite.
References usart_rs232_options::baudrate, board_init(), CHIP_RESET_CAUSE_WDT, DEFINE_TEST_ARRAY, DEFINE_TEST_CASE, DEFINE_TEST_SUITE, mdelay(), reset_cause_clear_causes(), reset_cause_get_causes(), run_reset_cause_test(), stdio_serial_init(), sysclk_init(), test_suite_run(), usart_serial_options, wdt_rc, and wdt_reset_mcu().
|
static |
Delay for ms milliseconds.
ms | number of milliseconds to busy wait |
References sysclk_get_cpu_hz().
Referenced by main().
|
static |
Run test to check last reset cause.
This test will pass if last reset was caused by a watchdog timeout.
test | Current test case. |
References test_assert_true, and wdt_rc.
Referenced by main().
bool wdt_rc |
Flag to indicate if last reset is caused by watchdog timeout.
Referenced by main(), and run_reset_cause_test().