From a0c6bbb21c5e7d9e0090e66c316cf88ef7f0726b Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Fri, 24 Oct 2025 13:26:25 -0400 Subject: eeprom systest --- fw/tests/system/eeprom_systest.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 fw/tests/system/eeprom_systest.c (limited to 'fw/tests/system/eeprom_systest.c') diff --git a/fw/tests/system/eeprom_systest.c b/fw/tests/system/eeprom_systest.c new file mode 100644 index 0000000..8285e5c --- /dev/null +++ b/fw/tests/system/eeprom_systest.c @@ -0,0 +1,30 @@ +#include + +#include + +#include "system.h" +#include "types.h" +#include "spi.h" +#include "eeprom.h" + +static const U16 addr = {0x00, 0x0A}; + +void +main(void) { + U8 val; + + sysInit(); + spiInit(); + eepromInit(); + + val = 0x8A; + (void)eepromWrite(addr, &val, 1u); // write 0b1000_1010 + (void)eepromRead(addr, &val, 1u); // read 0b1000_1010 + val = 0x8E; + (void)eepromWrite(addr, &val, 1u); // write 0b1000_1110 + (void)eepromRead(addr, &val, 1u); // read 0b1000_1110 + + for (;;) { + + } +} -- cgit v1.2.3