Skip to content

Commit 9fa2cc9

Browse files
authored
Merge pull request #2 from ryang14/patch-1
Fix wait source encoding
2 parents 25618d8 + e4f2740 commit 9fa2cc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_pioasm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def assemble(text_program):
9696
if not 0 <= polarity <= 1:
9797
raise RuntimeError("Invalid polarity")
9898
assembled[-1] |= polarity << 7
99-
assembled[-1] |= WAIT_SOURCES.index(instruction[2]) << 4
99+
assembled[-1] |= WAIT_SOURCES.index(instruction[2]) << 5
100100
num = int(instruction[3])
101101
if not 0 <= num <= 31:
102102
raise RuntimeError("Wait num out of range")

0 commit comments

Comments
 (0)