diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2022-11-23 11:59:24 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2022-11-23 11:59:24 -0500 |
commit | 1b56a63abfffb6a19d1ad9ee3f06a1067642dc7c (patch) | |
tree | 82d09fccd0d61eb953a38cbe3c5a4a8e8780edc0 | |
parent | 9727f00e504aaae5b7fd401e790895eeebbde784 (diff) | |
download | kutter-1b56a63abfffb6a19d1ad9ee3f06a1067642dc7c.tar.gz kutter-1b56a63abfffb6a19d1ad9ee3f06a1067642dc7c.tar.xz kutter-1b56a63abfffb6a19d1ad9ee3f06a1067642dc7c.zip |
lib: Update to latest can2040 code
Clear PIO irq flags in pio_sm_setup()
Set TXPENDING during pio_sm_setup()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | lib/README | 2 | ||||
-rw-r--r-- | lib/can2040/can2040.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -146,4 +146,4 @@ used to upload firmware to devices flashed with the CanBoot bootloader. The can2040 directory contains code from: https://github.com/KevinOConnor/can2040 -revision 53c09fb06a8eac90a6941e988d09d08b8e16ba78. +revision 177b0073fe6f19281ee7f7fdbe9599e32d1b4b8b. diff --git a/lib/can2040/can2040.c b/lib/can2040/can2040.c index f39636ae..fb9e3fb6 100644 --- a/lib/can2040/can2040.c +++ b/lib/can2040/can2040.c @@ -347,6 +347,8 @@ pio_sm_setup(struct can2040 *cd) pio_hw_t *pio_hw = cd->pio_hw; pio_hw->ctrl = PIO_CTRL_SM_RESTART_BITS | PIO_CTRL_CLKDIV_RESTART_BITS; pio_hw->fdebug = 0xffffffff; + pio_hw->irq = 0xff; + pio_signal_set_txpending(cd); // Load pio program int i; |