@@ -63,8 +63,7 @@ def __init__(self, text_program: str, *, build_debuginfo: bool = False) -> None:
63
63
pio_version = 0
64
64
fifo_type = None
65
65
mov_status_type = None
66
- mov_status_count = None
67
- mov_status_param = None
66
+ mov_status_n = None
68
67
in_count = None
69
68
in_shift_right = None
70
69
auto_push = None
@@ -139,24 +138,26 @@ def parse_rxfifo_brackets(arg, fifo_dir):
139
138
elif line .startswith (".mov_status" ):
140
139
require_before_instruction ()
141
140
required_version = 0
142
- mov_status_param = 0
141
+ mov_status_n = 0
143
142
mov_status_type = words [1 ]
144
143
if words [1 ] in ("txfifo" , "rxfifo" ):
145
144
if words [2 ] != "<" :
146
145
raise RuntimeError (f"Invalid { line } " )
147
- mov_status_count = int_in_range (words [3 ], 0 , 16 , words [1 ])
146
+ mov_status_n = int_in_range (words [3 ], 0 , 32 , words [1 ])
148
147
elif words [1 ] == "irq" :
149
148
required_version = 1
150
149
idx = 2
151
150
if words [idx ] == "next" :
152
- mov_status_param = 2
151
+ mov_status_n = 0x10
153
152
idx += 1
154
- if words [idx ] == "next " :
155
- mov_status_param = 1
153
+ elif words [idx ] == "prev " :
154
+ mov_status_n = 0x8
156
155
idx += 1
156
+ else :
157
+ mov_status_n = 0
157
158
if words [idx ] != "set" :
158
159
raise RuntimeError (f"Invalid { line } )" )
159
- mov_status_count = int (words [idx + 1 ])
160
+ mov_status_n |= int_in_range (words [idx + 1 ], 0 , 8 , "mov_status irq" )
160
161
require_version (required_version , line )
161
162
elif words [0 ] == ".out" :
162
163
require_before_instruction ()
@@ -447,8 +448,7 @@ def parse_rxfifo_brackets(arg, fifo_dir):
447
448
448
449
if mov_status_type is not None :
449
450
self .pio_kwargs ["mov_status_type" ] = mov_status_type
450
- self .pio_kwargs ["mov_status_count" ] = mov_status_count
451
- self .pio_kwargs ["mov_status_param" ] = mov_status_param
451
+ self .pio_kwargs ["mov_status_n" ] = mov_status_n
452
452
453
453
if set_count not in (None , 32 ):
454
454
self .pio_kwargs ["set_count" ] = set_count
0 commit comments