micropython/docs/library
Adam Green f9958417d8 rp2: Make rp2_state_machine_exec accept integers.
Currently rp2.StateMachine.exec(instr_in) requires that the instr_in
parameter be a string representing the PIO assembly language instruction
to be encoded by rp2.asm_pio_encode(). This commit allows the parameter
to also be of integral type. This is useful if the exec() method is
being called often where the use of pre-encoded machine code is
desireable.

This commit still supports calls like:
    sm.exec("set(0, 1)")

It also now supports calls like:
    # Performed once earlier, maybe in __init__()
    assembled_instr = rp2.asm_pio_encode("out(y, 8)", 0)
    # Performed multiple times later as the PIO state machine is
    # configured for its next run.
    sm.exec(assembled_instr)

The existing examples/rp2/pio_exec.py and examples/rp2/pio_pwm.py that
exercise the rp2.StateMachine.exec() method still work with this change.

Signed-off-by: Adam Green <adamgrym@yahoo.com>
2023-05-18 12:33:02 +10:00
..
_thread.rst
array.rst
binascii.rst
bluetooth.rst
btree.rst
builtins.rst
cmath.rst
collections.rst
cryptolib.rst
errno.rst
esp.rst
esp32.rst
espnow.rst
framebuf.rst
gc.rst
hashlib.rst
heapq.rst
index.rst
io.rst
json.rst
lcd160cr.rst
machine.ADC.rst
machine.ADCBlock.rst
machine.ADCWiPy.rst
machine.I2C.rst
machine.I2S.rst
machine.PWM.rst rp2/machine_pwm: Add support for inverting a PWM channel output. 2023-05-04 13:18:47 +10:00
machine.Pin.rst
machine.RTC.rst
machine.SD.rst
machine.SDCard.rst
machine.SPI.rst
machine.Signal.rst
machine.Timer.rst
machine.TimerWiPy.rst
machine.UART.rst
machine.WDT.rst
machine.rst
math.rst
micropython.rst
neopixel.rst
network.LAN.rst
network.WIZNET5K.rst
network.WLAN.rst esp32,esp8266: Add support to set/get power saving mode of WLAN. 2023-05-06 13:51:00 +10:00
network.WLANWiPy.rst
network.rst
os.rst
pyb.ADC.rst
pyb.Accel.rst
pyb.CAN.rst
pyb.DAC.rst
pyb.ExtInt.rst
pyb.Flash.rst
pyb.I2C.rst
pyb.LCD.rst
pyb.LED.rst
pyb.Pin.rst
pyb.RTC.rst
pyb.SPI.rst
pyb.Servo.rst
pyb.Switch.rst
pyb.Timer.rst
pyb.UART.rst
pyb.USB_HID.rst
pyb.USB_VCP.rst
pyb.rst
random.rst
re.rst
rp2.Flash.rst
rp2.PIO.rst
rp2.StateMachine.rst rp2: Make rp2_state_machine_exec accept integers. 2023-05-18 12:33:02 +10:00
rp2.rst
select.rst
socket.rst
ssl.rst
stm.rst
struct.rst
sys.rst
time.rst
uasyncio.rst
uctypes.rst
wipy.rst
wm8960.rst
zephyr.DiskAccess.rst
zephyr.FlashArea.rst
zephyr.rst
zephyr.zsensor.rst
zlib.rst