Looks that way to me, and should be '((in_count & 0x1F) << PIO_SM0_SHIFTCTRL_IN_COUNT_LSB)'.However, in hardware/pio.h sm_config_set_in_pin_count() does:with what looks like a spurious -1Code:
c->shiftctrl = (c->shiftctrl & ~PIO_SM0_SHIFTCTRL_IN_COUNT_BITS) | ((in_count - 1) << PIO_SM0_SHIFTCTRL_IN_COUNT_LSB);
That's how I've done it in my updates to the MicroPython PIO assembler.
Statistics: Posted by hippy — Wed Aug 28, 2024 12:58 am