Skip to content

Commit 3a01fd8

Browse files
authored
Bug fix in RP2xxx fifo level readback
tx+rx is 8 bits per snum (4 bits each).
1 parent db7ba2c commit 3a01fd8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

port/raspberrypi/rp2xxx/src/hal/pio/common.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ pub fn PioImpl(EnumType: type, chip: Chip) type {
426426
const regs = self.get_regs();
427427
const levels = regs.FLEVEL.raw;
428428

429-
return @as(u4, @truncate(levels >> (@as(u5, 4) * snum) + offset));
429+
return @as(u4, @truncate(levels >> (@as(u5, 8) * snum) + offset));
430430
}
431431

432432
fn interrupt_bit_pos(

0 commit comments

Comments
 (0)