Skip to content

Commit 3a8179f

Browse files
authored
Fix EncodeDelay() (#24)
The prior code always returned 0. Signed-off-by: Tinkerer <[email protected]>
1 parent bf864b4 commit 3a8179f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rp2-pio/instr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func encodeInstrAndSrcDest(instr uint16, dest SrcDest, value uint8) uint16 {
9393
}
9494

9595
func EncodeDelay(cycles uint8) uint16 {
96-
return 0b11111 & (uint16(cycles) << 8)
96+
return uint16(0b11111&cycles) << 8
9797
}
9898

9999
func EncodeSideSet(bitCount, value uint8) uint16 {

0 commit comments

Comments
 (0)