diff options
Diffstat (limited to 'docs/library/rp2.StateMachine.rst')
-rw-r--r-- | docs/library/rp2.StateMachine.rst | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/library/rp2.StateMachine.rst b/docs/library/rp2.StateMachine.rst index d39194e6ff..ee16ce3c51 100644 --- a/docs/library/rp2.StateMachine.rst +++ b/docs/library/rp2.StateMachine.rst @@ -82,11 +82,18 @@ Methods .. method:: StateMachine.exec(instr) - Execute a single PIO instruction. Uses `asm_pio_encode` to encode the - instruction from the given string *instr*. + Execute a single PIO instruction. + + If *instr* is a string then uses `asm_pio_encode` to encode the instruction + from the given string. >>> sm.exec("set(0, 1)") + If *instr* is an integer then it is treated as an already encoded PIO + machine code instruction to be executed. + + >>> sm.exec(rp2.asm_pio_encode("out(y, 8)", 0)) + .. method:: StateMachine.get(buf=None, shift=0) Pull a word from the state machine's RX FIFO. |