@@ -45,7 +45,7 @@ from micropython import const # type: ignore
4545if TYPE_CHECKING :
4646 # defined functions are all methods of the (frozen) class PIOASMEmit:
4747 # but also have a self method
48- from rp2 import PIOASMEmit
48+ from rp2 import PIOASMEmit , _PIO_ASM_Program
4949
5050 # constants defined for PIO assembly
5151 # TODO: Make Final - or make const always return Final
@@ -110,15 +110,15 @@ if TYPE_CHECKING:
110110
111111 ####################################################################################
112112
113- def delay (delay : int ) -> PIOASMEmit :
113+ def delay (delay : int ) -> _PIO_ASM_Program :
114114 """rp2.PIO delay modifier.
115115
116116 The delay method allows setting a delay for the current instruction,
117117 ensuring it does not exceed the maximum allowed delay.
118118 """
119119 ...
120120
121- def side (value : int ) -> PIOASMEmit :
121+ def side (value : int ) -> _PIO_ASM_Program :
122122 """rp2.PIO WRAP modifier.
123123 This is a modifier which can be applied to any instruction, and is used to control side-set pin values.
124124 value: the value (bits) to output on the side-set pins
@@ -167,23 +167,23 @@ if TYPE_CHECKING:
167167 """
168168 ...
169169
170- def word (instr , label : Incomplete | None = ...) -> PIOASMEmit :
170+ def word (instr , label : Incomplete | None = ...) -> _PIO_ASM_Program :
171171 """rp2.PIO instruction.
172172
173173 Stores a raw 16-bit value as an instruction in the program. This directive is
174174 invalid outside of a program.
175175 """
176176 ...
177177
178- def nop () -> PIOASMEmit :
178+ def nop () -> _PIO_ASM_Program :
179179 """rp2.PIO NOP instruction.
180180
181181 Assembles to mov y, y. "No operation", has no particular side effect, but a useful vehicle for a side-set
182182 operation or an extra delay.
183183 """
184184 ...
185185
186- def jmp (condition , label : Incomplete | None = ...) -> PIOASMEmit :
186+ def jmp (condition , label : Incomplete | None = ...) -> _PIO_ASM_Program :
187187 """rp2.PIO JMP instruction.
188188
189189 Set program counter to Address if Condition is true, otherwise no operation.
@@ -218,7 +218,7 @@ if TYPE_CHECKING:
218218 """
219219 ...
220220
221- def wait (polarity : int , src : int , index : int , / ) -> PIOASMEmit :
221+ def wait (polarity : int , src : int , index : int , / ) -> _PIO_ASM_Program :
222222 """rp2.PIO WAIT instruction.
223223
224224 Stall until some condition is met.
@@ -253,7 +253,7 @@ if TYPE_CHECKING:
253253 """
254254 ...
255255
256- def in_ (src , data ) -> PIOASMEmit :
256+ def in_ (src , data ) -> _PIO_ASM_Program :
257257 """rp2.PIO IN instruction.
258258
259259 Shift Bit count bits from Source into the Input Shift Register (ISR).
@@ -286,7 +286,7 @@ if TYPE_CHECKING:
286286 """
287287 ...
288288
289- def out (destination : int , bit_count : int ) -> PIOASMEmit :
289+ def out (destination : int , bit_count : int ) -> _PIO_ASM_Program :
290290 """rp2.PIO OUT instruction.
291291
292292 Shift Bit count bits out of the Output Shift Register (OSR), and write those bits to Destination.
@@ -324,7 +324,7 @@ if TYPE_CHECKING:
324324 """
325325 ...
326326
327- def push (value : int = ..., value2 : int = ...) -> PIOASMEmit :
327+ def push (value : int = ..., value2 : int = ...) -> _PIO_ASM_Program :
328328 """rp2.PIO PUSH instruction..
329329
330330 Push the contents of the ISR into the RX FIFO, as a single 32-bit word. Clear ISR to all-zeroes.
@@ -343,7 +343,7 @@ if TYPE_CHECKING:
343343 """
344344 ...
345345
346- def pull (block : int = block , timeout : int = 0 ) -> PIOASMEmit :
346+ def pull (block : int = block , timeout : int = 0 ) -> _PIO_ASM_Program :
347347 """rp2.PIO PULL instruction..
348348
349349 Load a 32-bit word from the TX FIFO into the OSR.
@@ -369,7 +369,7 @@ if TYPE_CHECKING:
369369 """
370370 ...
371371
372- def mov (dest , src , operation : Optional [int ] = None ) -> PIOASMEmit :
372+ def mov (dest , src , operation : Optional [int ] = None ) -> _PIO_ASM_Program :
373373 """rp2.PIO MOV instruction..
374374
375375 Copy data from Source to Destination.
@@ -415,7 +415,7 @@ if TYPE_CHECKING:
415415 """
416416 ...
417417
418- def irq (mod , index : Incomplete | None = ...) -> PIOASMEmit :
418+ def irq (mod , index : Incomplete | None = ...) -> _PIO_ASM_Program :
419419 """rp2.PIO instruction.
420420
421421 Set or clear the IRQ flag selected by Index argument.
@@ -435,7 +435,7 @@ if TYPE_CHECKING:
435435 If Wait is set, Delay cycles do not begin until after the wait period elapses."""
436436 ...
437437
438- def set (destination , data ) -> PIOASMEmit :
438+ def set (destination , data ) -> _PIO_ASM_Program :
439439 """rp2.PIO SET instruction..
440440
441441 Write immediate value Data to Destination.
0 commit comments