Skip to content

Commit

Permalink
Fix checking fifo mode for mov rxfifo instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jepler committed Sep 13, 2024
1 parent eaa8bb0 commit 919d075
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adafruit_pioasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,12 @@ def parse_rxfifo_brackets(arg, fifo_dir):
assembled.append(0b100_00000_0001_0_000)
if instruction[2] != "isr":
raise ValueError("mov rxfifo[] source must be isr")
assembled[-1] |= parse_rxfifo_brackets(instruction[1], "put")
assembled[-1] |= parse_rxfifo_brackets(instruction[1], "txput")
elif instruction[2].startswith("rxfifo["): # mov osr, rxfifo[]
assembled.append(0b100_00000_1001_0_000)
if instruction[1] != "osr":
raise ValueError("mov ,rxfifo[] target must be osr")
assembled[-1] |= parse_rxfifo_brackets(instruction[2], "get")
assembled[-1] |= parse_rxfifo_brackets(instruction[2], "txget")
else:
assembled.append(0b101_00000_000_00_000)
assembled[-1] |= mov_destinations.index(instruction[1]) << 5
Expand Down

0 comments on commit 919d075

Please sign in to comment.