From d2376ed99656b5e6bad4f649c108d1908875078b Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Sat, 1 Nov 2025 11:21:25 -0400 Subject: update systests --- fw/tests/system/can_echo_systest.c | 12 ++++++++---- fw/tests/system/can_tx_systest.c | 2 +- fw/tests/system/dac_systest.c | 2 +- fw/tests/system/eeprom_can_systest.c | 10 +++++----- fw/tests/system/eeprom_systest.c | 2 +- 5 files changed, 16 insertions(+), 12 deletions(-) (limited to 'fw') diff --git a/fw/tests/system/can_echo_systest.c b/fw/tests/system/can_echo_systest.c index f0e08d2..d18289c 100644 --- a/fw/tests/system/can_echo_systest.c +++ b/fw/tests/system/can_echo_systest.c @@ -14,16 +14,20 @@ static const CanId mask0 = { .isExt = true, - .eid = {0xFF, 0xFF, 0xFF, 0x1F}}; + .eid = 0x1FFFFFFF, +}; static const CanId filter0 = { .isExt = true, - .eid = {0x67, 0x45, 0x23, 0x01}}; // 1234567h + .eid = 0x1234567, +}; static const CanId mask1 = { .isExt = false, - .sid = {.lo = 0xFF, .hi = 0x7}}; + .sid = 0x7FF, +}; static const CanId filter2 = { .isExt = false, - .sid = {.lo = 0x23, .hi = 0x1}}; // 123h + .sid = 0x123, +}; void main(void) { diff --git a/fw/tests/system/can_tx_systest.c b/fw/tests/system/can_tx_systest.c index f6651c6..5256417 100644 --- a/fw/tests/system/can_tx_systest.c +++ b/fw/tests/system/can_tx_systest.c @@ -14,7 +14,7 @@ static const CanFrame frame = { .id = { .isExt = false, - .sid = {0x01, 0x23}, + .sid = 0x123, }, .rtr = false, .dlc = 8u, diff --git a/fw/tests/system/dac_systest.c b/fw/tests/system/dac_systest.c index 9497e3b..47aefb9 100644 --- a/fw/tests/system/dac_systest.c +++ b/fw/tests/system/dac_systest.c @@ -13,7 +13,7 @@ main(void) { spiInit(); dacInit(); - dacSet1a((U16){0u, 252u}); // 1.23V + dacSet1a(252u); // 1.23V for (;;) { diff --git a/fw/tests/system/eeprom_can_systest.c b/fw/tests/system/eeprom_can_systest.c index 14e8f2d..0495e79 100644 --- a/fw/tests/system/eeprom_can_systest.c +++ b/fw/tests/system/eeprom_can_systest.c @@ -18,10 +18,10 @@ #include "eeprom.h" static const CanId id = { - .type = CAN_ID_STD, - .sid = {0x1, 0x23}, + .isExt = false, + .sid = 0x123, }; -static const U16 addr = {0x00, 0x0A}; +static const U16 addr = 0x000A; void main(void) { @@ -33,8 +33,8 @@ main(void) { // Setup MCP2515 CAN controller canSetBitTiming(CAN_TIMING_10K); CanId mask = { - .type=CAN_ID_STD, - .sid = {0xFF, 0xFF}, + .isExt = false, + .sid = 0x7FF, }; canSetMask0(&mask); // set masks canSetMask1(&mask); diff --git a/fw/tests/system/eeprom_systest.c b/fw/tests/system/eeprom_systest.c index 5261532..72834a2 100644 --- a/fw/tests/system/eeprom_systest.c +++ b/fw/tests/system/eeprom_systest.c @@ -9,7 +9,7 @@ #include "can.h" #include "eeprom.h" -static const U16 addr = {0x00, 0x0A}; +static const U16 addr = 0x000A; void main(void) { -- cgit v1.2.3