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>
This commit is contained in:
Kevin O'Connor 2022-11-23 11:59:24 -05:00
parent 9727f00e50
commit 1b56a63abf
2 changed files with 3 additions and 1 deletions

View file

@ -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;