Skip to content

Commit ec906cf

Browse files
sumpfrallesimbit18
authored andcommitted
rp2040,rp23xx,rp23xx-rv: allow up to 32 PIO instructions
Previously only up to 31 PIO instructions were accepted. But the hardware allowed 32 instructions. Now we accept 32 instructions. See the corresponding commit in the pico-sdk repository: raspberrypi/pico-sdk@6f7dc67 Signed-off-by: Lars Kruse <devel@sumpfralle.de>
1 parent 097dd84 commit ec906cf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

arch/arm/src/rp2040/rp2040_pio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static void hw_claim_clear(uint8_t *bits, uint32_t bit_index)
133133
static int _pio_find_offset_for_program(uint32_t pio,
134134
const rp2040_pio_program_t *program)
135135
{
136-
ASSERT(program->length < PIO_INSTRUCTION_COUNT);
136+
ASSERT(program->length <= PIO_INSTRUCTION_COUNT);
137137
uint32_t used_mask = _used_instruction_space[rp2040_pio_get_index(pio)];
138138
uint32_t program_mask = (1u << program->length) - 1;
139139

arch/arm/src/rp23xx/rp23xx_pio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static void hw_claim_clear(uint8_t *bits, uint32_t bit_index)
120120
static int _pio_find_offset_for_program(uint32_t pio,
121121
const rp23xx_pio_program_t *program)
122122
{
123-
ASSERT(program->length < PIO_INSTRUCTION_COUNT);
123+
ASSERT(program->length <= PIO_INSTRUCTION_COUNT);
124124
uint32_t used_mask = _used_instruction_space[rp23xx_pio_get_index(pio)];
125125
uint32_t program_mask = (1u << program->length) - 1;
126126

arch/risc-v/src/rp23xx-rv/rp23xx_pio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static void hw_claim_clear(uint8_t *bits, uint32_t bit_index)
120120
static int _pio_find_offset_for_program(uint32_t pio,
121121
const rp23xx_pio_program_t *program)
122122
{
123-
ASSERT(program->length < PIO_INSTRUCTION_COUNT);
123+
ASSERT(program->length <= PIO_INSTRUCTION_COUNT);
124124
uint32_t used_mask = _used_instruction_space[rp23xx_pio_get_index(pio)];
125125
uint32_t program_mask = (1u << program->length) - 1;
126126

0 commit comments

Comments
 (0)