MCU
Loading...
Searching...
No Matches
test
test_interfaces
Watchdog_interface_test.h
Go to the documentation of this file.
1
#include <Arduino.h>
2
#include <unity.h>
3
4
#include "WatchdogInterface.h"
5
6
void
test_watchdog_kick
()
7
{
8
// Hypothetical pin setup
9
WatchdogInterface
wd_interface
(1);
10
wd_interface
.
init
(millis());
11
TEST_ASSERT_EQUAL(HIGH,
wd_interface
.
get_watchdog_state
());
12
delay(5);
13
wd_interface
.
kick_watchdog
(millis());
14
TEST_ASSERT_EQUAL(HIGH,
wd_interface
.
get_watchdog_state
());
15
delay(5);
16
wd_interface
.
kick_watchdog
(millis());
17
TEST_ASSERT_EQUAL(LOW,
wd_interface
.
get_watchdog_state
());
18
19
}
test_watchdog_kick
void test_watchdog_kick()
Definition:
Watchdog_interface_test.h:6
WatchdogInterface
Definition:
WatchdogInterface.h:9
WatchdogInterface::init
void init(unsigned long curr_millis)
Definition:
WatchdogInterface.cpp:4
WatchdogInterface::kick_watchdog
void kick_watchdog(unsigned long curr_millis)
Definition:
WatchdogInterface.cpp:21
WatchdogInterface::get_watchdog_state
bool get_watchdog_state()
Definition:
WatchdogInterface.cpp:32
wd_interface
WatchdogInterface wd_interface(WATCHDOG_INPUT)
Generated by
1.9.5