diff --git a/Tests/HardwareTests/CMakeLists.txt b/Tests/HardwareTests/CMakeLists.txt index 5cebcd6e..1d751bef 100644 --- a/Tests/HardwareTests/CMakeLists.txt +++ b/Tests/HardwareTests/CMakeLists.txt @@ -36,6 +36,9 @@ target_link_libraries(Sts1CobcSwTests_Spi PRIVATE etl::etl rodos::rodos type_saf add_program(Uart Uart.test.cpp) target_link_libraries(Sts1CobcSwTests_Uart PRIVATE rodos::rodos Sts1CobcSw_Hal) +add_program(Watchdog Watchdog.test.cpp) +target_link_libraries(Sts1CobcSwTests_Watchdog PRIVATE rodos::rodos Sts1CobcSw_Hal) + get_property( top_level_hw_test_targets DIRECTORY ${CMAKE_CURRENT_LIST_DIR} diff --git a/Tests/HardwareTests/Watchdog.test.cpp b/Tests/HardwareTests/Watchdog.test.cpp new file mode 100644 index 00000000..79ec48fa --- /dev/null +++ b/Tests/HardwareTests/Watchdog.test.cpp @@ -0,0 +1,27 @@ +#include +#include + +#include + + +namespace sts1cobcsw +{ +auto ledGpio = hal::GpioPin(hal::led1Pin); + + +class WatchdogTest : public RODOS::StaticThread<> +{ + void init() override + { + ledGpio.Direction(hal::PinDirection::out); + } + + + void run() override + { + ledGpio.Reset(); + RODOS::AT(RODOS::NOW() + 800 * RODOS::MILLISECONDS); + ledGpio.Set(); + } +} watchdogTest; +}