lib: Update to latest can2040 code

Minor comment change to unstuf_pull_bits()
Introduce unstuf_get_raw() helper function
Move crc stuffed bit calculation to data_state_go_crc()
Restore stuffed_bits state on missing ack
Use a single pio_irq_set() function
Reschedule tx if previous tx unexpectedly finished transmit
Simplify report_state handling

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2022-11-19 10:30:11 -05:00
parent 8977c4e764
commit cfb633a0ec
3 changed files with 99 additions and 82 deletions

View File

@@ -63,12 +63,11 @@ struct can2040 {
// Input data state
uint32_t parse_state;
uint32_t parse_crc;
uint32_t parse_crc, parse_crc_bits, parse_crc_pos;
struct can2040_msg parse_msg;
// Reporting
uint32_t report_state;
uint32_t report_eof_key;
// Transmits
uint32_t tx_state;