diff options
| author | 2026-06-29 03:00:12 -0500 | |
|---|---|---|
| committer | 2026-06-29 03:00:12 -0500 | |
| commit | 6bb84fe005fc151df1a67259242da9c0eaf3fe93 (patch) | |
| tree | 683d6e160bf48fd0c235635be874a8fef697402c /source/tests/led.c | |
| parent | add new tests (diff) | |
begin work on pc side
Diffstat (limited to 'source/tests/led.c')
| -rw-r--r-- | source/tests/led.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/source/tests/led.c b/source/tests/led.c deleted file mode 100644 index 82913ae..0000000 --- a/source/tests/led.c +++ /dev/null @@ -1,38 +0,0 @@ -#define ET_TEST_IMPL -#include "../test.h" -#include <inttypes.h> - -static int flash_led_tick(const struct et_state *state, void *data, struct et_next_state *next_state) { - struct et_test_state_private_base *priv = data; - struct et_test_plan *plan = priv->plan; - struct et_test_plan_entry *cur = test_current(plan); - et_test_status status = TEST_PASS; - - for (int i = 0; i < 1024; ++i) { - u16 cmd_orig, cmd; - - if (i & 1) { - /* LED off */ - cmd_orig = 0x7000; - } else { - /* LED on */ - cmd_orig = 0x8000; - } - - cmd = cmd_orig; - if ((status = test_exi_readwrite(plan, &cmd, sizeof(cmd), TEST_EPRIV_BASE)) != TEST_PASS) { - break; - } - - if (cmd != 0x0000) { - status = TEST_FAIL; - test_plan_entry_set_error(cur, "spurious response to 0x%04" PRIx16 ": 0x%04" PRIx16 " (should be 0x0000)", cmd_orig, cmd); - break; - } - } - - cur->status = status; - return test_next(plan, next_state); -} - -TEST_DEF(flash_led, "Flash LED", 0, NULL, flash_led_tick, NULL, struct et_test_state_private_base); |
