aboutsummaryrefslogtreecommitdiffstats
path: root/lib/can2040
Commit message (Collapse)AuthorAgeFilesLines
* lib: Update can2040 to v1.7.0Kevin O'Connor2025-01-101-11/+118
| | | | | | This provides improved support on rp2350 chips. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update can2040 to support v2.0.0 of pico-sdkKevin O'Connor2024-11-131-9/+9
| | | | | | | A new version of can2040 is needed due to changes in the 2.0.0 release of the pico-sdk. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update to latest can2040 codeKevin O'Connor2023-10-032-26/+81
| | | | | | | | | | Add support for can2040_stop() Add data_state_go_error() helper Add new can2040_get_statistics() API function Call report_note_discarding() after setting MS_DISCARD state Convert report_is_rx_eof_pending() to report_is_not_in_tx() Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update to latest can2040 codeKevin O'Connor2023-05-031-26/+39
| | | | | | | | | | Disable tx state machine before resetting it Check for rx message with same id as tx but different payload Do not use canrx line to alter bit timing of cantx line Improve bit time synchronization with slow transmitters Implement tx synchronization to faster transmitters Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update to latest can2040 codeKevin O'Connor2023-04-291-1/+1
| | | | | | Fix tx hang after error frame during tx Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update to latest can2040 codeKevin O'Connor2023-04-111-12/+20
| | | | | | | | | Avoid some gcc warnings by using uint32_t for iterators Better document the fallthough case statement in crc_bytes() Fix txpending race from report_line_ackdone() Make can2040_transmit() multi-cpu atomic Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update to latest can2040 codeKevin O'Connor2022-11-231-0/+2
| | | | | | | Clear PIO irq flags in pio_sm_setup() Set TXPENDING during pio_sm_setup() Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update to latest can2040 codeKevin O'Connor2022-11-211-61/+75
| | | | | | | | | | Fix PIO "sync" register overflow check Reduce latency of tx scheduling Clear ackdone irq from report_note_eof_success() Defer ack inject until after rx fifo drained Improve passive/dominant bit conflict check on tx reschedule Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update to latest can2040 codeKevin O'Connor2022-11-192-81/+98
| | | | | | | | | | | | 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>
* lib: Update to latest can2040 codeKevin O'Connor2022-10-131-32/+41
| | | | | | | | | | | Fix gpio function selection for PIO1 usage. Minor variable name changes. Allow scheduling tx "matched" event after a crc match. Allow for up to 5 passive bits after unstuf_clear_state(). Pause PIO "rx" bit reception after 10 passive bits. Signal the CPU to process data every 10 read bits. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update to latest can2040 codeKevin O'Connor2022-07-162-119/+133
| | | | | | Simplify tx state tracking. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Update to the latest can2040 codeKevin O'Connor2022-07-162-79/+94
| | | | | | | | | | Rename to "match" state machine instead of "ack". Minor simplification to tx_note_crc_start(). Call pio_match_clear() from report functions. Add pio_match_calc_key() helper function. Raise irq after 6 passive eof bits for faster rx message notification. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lib: Add can2040 codeKevin O'Connor2022-07-062-0/+1308
The "can2040" project implements "software canbus" support on rp2040 micro-controllers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>