diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-11-01 18:40:37 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-11-01 18:40:37 -0400 |
| commit | 96a85a2bb8e52cb8b15745bca617e3cc788d02ad (patch) | |
| tree | e7d95155898e25659a7020724892d71b0b970948 /fw/can.c | |
| parent | 0debe2b2b20818a6899c0635847306d75f86f978 (diff) | |
| download | can-gauge-interface-96a85a2bb8e52cb8b15745bca617e3cc788d02ad.zip | |
extract signal from received frames
Diffstat (limited to 'fw/can.c')
| -rw-r--r-- | fw/can.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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; + } +} |