From 96a85a2bb8e52cb8b15745bca617e3cc788d02ad Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Sat, 1 Nov 2025 18:40:37 -0400 Subject: extract signal from received frames --- fw/can.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'fw/can.c') diff --git a/fw/can.c b/fw/can.c index 45340bf..9c706a4 100644 --- a/fw/can.c +++ b/fw/can.c @@ -375,3 +375,15 @@ void canSetFilter5(const CanId *filter) { writeId(filter, REG_RXF5SIDH, REG_RXF5SIDL, REG_RXF5EID8, REG_RXF5EID0); } + +bool +canIdEq(const CanId *a, const CanId *b) { + if (a->isExt != b->isExt) { + return false; + } + if (a->isExt) { + return a->eid == b->eid; + } else { + return a->sid == b->sid; + } +} -- cgit v1.2.3