From a2d82431e6e34d938be3085fd9f3d53ef5dafb2b Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Thu, 11 Feb 2021 18:14:22 +0000 Subject: [PATCH] oops --- src/rp2_common/hardware_pio/include/hardware/pio.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rp2_common/hardware_pio/include/hardware/pio.h b/src/rp2_common/hardware_pio/include/hardware/pio.h index 97efb44..9541616 100644 --- a/src/rp2_common/hardware_pio/include/hardware/pio.h +++ b/src/rp2_common/hardware_pio/include/hardware/pio.h @@ -180,8 +180,7 @@ static inline void sm_config_set_sideset_pins(pio_sm_config *c, uint sideset_bas */ static inline void sm_config_set_sideset(pio_sm_config *c, uint bit_count, bool optional, bool pindirs) { assert(bit_count <= 5); - if (optional) - assert(bit_count >= 1); + assert(!optional || bit_count >= 1); c->pinctrl = (c->pinctrl & ~PIO_SM0_PINCTRL_SIDESET_COUNT_BITS) | (bit_count << PIO_SM0_PINCTRL_SIDESET_COUNT_LSB);