Skip to content

Commit fc55e3e

Browse files
committed
Fixes comparison of unsigned expression in '>= 0' warning in pio_instructions.h
1 parent a1438df commit fc55e3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rp2_common/hardware_pio/include/hardware/pio_instructions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static inline uint pio_encode_sideset(uint sideset_bit_count, uint value) {
148148
* \return the side set bits to be ORed with an instruction encoding
149149
*/
150150
static inline uint pio_encode_sideset_opt(uint sideset_bit_count, uint value) {
151-
valid_params_if(PIO_INSTRUCTIONS, sideset_bit_count >= 0 && sideset_bit_count <= 4);
151+
valid_params_if(PIO_INSTRUCTIONS, sideset_bit_count <= 4);
152152
valid_params_if(PIO_INSTRUCTIONS, value <= ((1u << sideset_bit_count) - 1));
153153
return 0x1000u | value << (12u - sideset_bit_count);
154154
}

0 commit comments

Comments
 (0)