diff options
Diffstat (limited to 'docs/library/rp2.rst')
-rw-r--r-- | docs/library/rp2.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/library/rp2.rst b/docs/library/rp2.rst index ec7666d7c..7a473387b 100644 --- a/docs/library/rp2.rst +++ b/docs/library/rp2.rst @@ -66,6 +66,17 @@ For running PIO programs, see :class:`rp2.StateMachine`. >>> rp2.asm_pio_encode("set(0, 1)", 0) 57345 +.. function:: bootsel_button() + + Temporarily turns the QSPI_SS pin into an input and reads its value, + returning 1 for low and 0 for high. + On a typical RP2040 board with a BOOTSEL button, a return value of 1 + indicates that the button is pressed. + + Since this function temporarily disables access to the external flash + memory, it also temporarily disables interrupts and the other core to + prevent them from trying to execute code from flash. + .. class:: PIOASMError This exception is raised from `asm_pio()` or `asm_pio_encode()` if there is |