diff options
author | Paul Warren <pdw@ex-parrot.com> | 2023-01-11 14:08:08 +0000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2023-01-12 17:14:04 +1100 |
commit | a322ebafc0427f03e1423cf7642b1e6ded5a90a8 (patch) | |
tree | 69f523d113c00c62b79404bd83d43abfc40c377e | |
parent | 209a6bb6b7b39882e0efdf25eab29931fb2de859 (diff) |
docs/library/rp2.StateMachine: Expand put() documentation.
Document that put() can also accept arrays/bytearrays as values.
Fixes issue #10465.
Signed-off-by: Paul Warren <pdw@ex-parrot.com>
-rw-r--r-- | docs/library/rp2.StateMachine.rst | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/docs/library/rp2.StateMachine.rst b/docs/library/rp2.StateMachine.rst index 7e38ba8b1..d39194e6f 100644 --- a/docs/library/rp2.StateMachine.rst +++ b/docs/library/rp2.StateMachine.rst @@ -99,13 +99,17 @@ Methods .. method:: StateMachine.put(value, shift=0) - Push a word onto the state machine's TX FIFO. + Push words onto the state machine's TX FIFO. - If the FIFO is full, it blocks until there is space (i.e. the state machine - pulls a word). + *value* can be an integer, an array of type ``B``, ``H`` or ``I``, or a + `bytearray`. - The value is first shifted left by *shift* bits, i.e. the state machine - receives ``value << shift``. + This method will block until all words have been written to the FIFO. If + the FIFO is, or becomes, full, the method will block until the state machine + pulls enough words to complete the write. + + Each word is first shifted left by *shift* bits, i.e. the state machine + receives ``word << shift``. .. method:: StateMachine.rx_fifo() |