summaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2021-03-01 14:23:45 +0100
committerDamien George <damien@micropython.org>2021-04-11 22:41:54 +1000
commit22554cf8e21ab97c60137539536eab05d6a6cdcb (patch)
treeafbca74bd6bf54441cc7068151ead7b89772cf0b /py/runtime.c
parent6f06dcaee57cc6f36a4121b4797942200b2d7281 (diff)
rp2/rp2_pio: Add StateMachine restart,rx_fifo,tx_fifo helper functions.
StateMachine.restart: Restarts the state machine StateMachine.rx_fifo: Return the number of RX FIFO items, 0 if empty StateMachine.tx_fifo: Return the number of TX FIFO items, 0 if empty restart() seems to be the most useful one, as it resets the state machine to the initial state without the need to re-initialise/re-create. It also makes PIO code easier, because then stalling as an error state can be unlocked. rx_fifo() is also useful, for MP code to check for data and timeout if no data arrived. Complex logic is easier handled in Python code than in PIO code. tx_fifo() can be useful to check states where data is not processed, and is mostly for symmetry.
Diffstat (limited to 'py/runtime.c')
0 files changed, 0 insertions, 0 deletions