Commit Graph

61 Commits

Author SHA1 Message Date
Allen Hill 746551351f store the results of tmp & 1 to avoid recalc 2026-05-10 18:52:43 -07:00
Allen Hill 8caee73765 Reorder error enums for simpler partial success check 2026-05-10 18:50:55 -07:00
Allen Hill 4de22e01f3 Substantially refactor ~everything to separate concerns and improve flow clarity
Highlights:
- Remove all use of malloc and friends
- Refactor message handling functions to work with references
- Move core message read => triage => respond logic loop to main
  function
- Improve message triage and support follow-up messages
- Refactor hex byte parsing
- Disable periodic interrupt when not playing
2026-05-08 13:10:14 -07:00
Allen Hill bdb1a8af0d fixup readframe error logs 2026-05-06 13:59:04 -07:00
Allen Hill 18c5a28410 Fix incorrect time updating logic 2026-05-06 13:57:36 -07:00
Allen Hill c904bc2c89 Refactor AVCLAN_parseframe call signature to avoid dynamic allocs 2026-05-05 20:35:05 -07:00
Allen Hill 9b2c71fa6e Add some compiler warnings and fix revealed bugs 2026-05-05 18:17:02 -07:00
Allen Hill a37140a779 Refactor error handling in read/send frame 2026-05-05 14:37:09 -07:00
Allen Hill 67cec49a60 Combine similar sendbit functions 2026-05-05 12:32:43 -07:00
Allen Hill 3d67e0a2ca Refactor message handling switch tree 2026-05-05 11:27:09 -07:00
Allen Hill 6adffe1619 Convert some local macros to inline functions 2026-05-04 12:30:45 -07:00
Allen Hill 628ec2de5f Replace use of numeric literals with appropriate enums 2026-05-04 11:47:34 -07:00
Allen Hill cbb1c1a30d Improve action/function names and tweak report responses 2025-10-08 21:26:04 -07:00
Allen Hill 977041bd67 Commit old working changes 2024-08-23 12:26:42 -07:00
Allen Hill fadd2c4259 Refactor frame handling and response code 2023-10-28 14:41:56 -04:00
Allen Hill 18ae9a48cc Optimize binary printframe (reduce number of RS232_print calls) 2023-10-28 14:38:15 -04:00
Allen Hill 5b97eff725 Rename HU/CD_ID and change to defines (never need to change at runtime) 2023-10-28 14:36:02 -04:00
Allen Hill f80f2f1376 Remove bad send init commands function 2023-10-26 13:30:33 -04:00
Allen Hill 218b4320dd Reorder avclan functions and rename AVCLAN_SendAnswer to AVCLAN_respond 2023-10-26 13:01:36 -04:00
Allen Hill c656281275 [NFC] Update comments and move a defines 2023-10-25 14:26:09 -04:00
Allen Hill dbe8b8b877 Rename for_me to shouldACK 2023-10-25 14:13:20 -04:00
Allen Hill c4831b1b48 Remove non-functioning variable 2023-10-25 14:12:27 -04:00
Allen Hill b0b3d9f34e Add muteing functionality and avoid unnecessary work when muted 2023-10-25 14:10:42 -04:00
Allen Hill dea335af7f Remove hardcoded length in favor of const evaled sizeof 2023-10-24 17:42:38 -04:00
Allen Hill c906725a0c Move RTC PIT to avclandrv and add CD status struct and answerreq 2023-10-24 16:39:39 -04:00
Allen Hill 67608e789f Fix binary printframe 2023-10-16 18:56:22 -04:00
Allen Hill 17f5510b16 Tweak formatting rules 2023-09-17 12:16:14 -04:00
Allen Hill 1d6690a234 Fix printBinary flag 2023-09-16 16:31:08 -04:00
Allen Hill ebb5ec95ca Add binary printing and reading/parsing from serial 2023-09-15 18:43:41 -04:00
Allen Hill cabcd06e67 Rearrange some functions 2023-09-15 18:37:46 -04:00
Allen Hill ff55d7e671 More send related bugfixes 2023-09-14 19:52:11 -04:00
Allen Hill 9fcca0a6fb Rename INPUT_IS_SET/CLEAR to BUS_IS_IDLE 2023-09-13 21:53:53 -04:00
Allen Hill 3c5c1d269e Fix reading functions 2023-09-13 17:16:21 -04:00
Allen Hill de658f1fb7 Update AVCLAN summary 2023-09-13 17:09:11 -04:00
Allen Hill 18202c5264 Add toggleable verbose debugging messages and tweak/improve the serial interface 2023-09-12 19:21:19 -04:00
Allen Hill 08f7fe934d Add printhex12 function 2023-09-12 11:20:21 -04:00
Allen Hill da6a3371fd Update signal measuring and apply new measurements to bit-timings 2023-09-11 22:12:23 -04:00
Allen Hill 4c19f27992 Update/fix pin levels for new transmission design 2023-09-10 16:34:59 -04:00
Allen Hill 7245695bc7 Setup timing better (fuses, clock speed, TCB clock speed) 2023-09-10 16:02:06 -04:00
Allen Hill 09bcd75811 Implement bit-read timing with TCB0 pulse-width measurement 2023-09-10 15:54:24 -04:00
Allen Hill d6d1995ae4 Re-add an AVCLAN summary/diagram 2023-09-03 20:03:22 -04:00
Allen Hill 332fb4545f Rename send/read bits/bytes functions and rearrange 2023-09-03 19:48:33 -04:00
Allen Hill ba40f96d44 Change sendbit timer config to optimize function length (insns) 2023-09-03 19:32:09 -04:00
Allen Hill 82ab967b7c Move incBCD to sniffer; only used there 2023-09-03 19:04:08 -04:00
Allen Hill cedad9df9f Remove unused functions 2023-09-03 18:29:13 -04:00
Allen Hill 9c024506c0 Add copyright attribution for louis frigon too 2023-09-03 18:15:50 -04:00
Allen Hill 064fc01ac6 Update LICENSE and notices in files 2023-09-03 13:43:49 -04:00
Allen Hill b736816de0 Switch master/slave replacements to OSHWA recommended controller/peripheral 2023-09-03 13:42:12 -04:00
Allen Hill 3e008f32eb Tooling updates and modification suggested by clang-tidy 2023-09-03 09:49:03 -04:00
Allen Hill b9bae7a65f More reorganization [nfc] 2023-09-02 22:18:11 -04:00