The rp2.asm_pio() decorator saves and temporarily replaces the globals dictionary to allow the wrapped functions to reference PIO instructions and register names in a natural way, restoring them before returning the assembled program. However, if an exception occurs while assembling the program, the globals are not changed back, leaving them corrupted. Wrap with try/finally to ensure they are always restored correctly. Signed-off-by: Chris Webb <chris@arachsys.com> |
||
|---|---|---|
| .. | ||
| _boot_fat.py | ||
| _boot.py | ||
| rp2.py | ||