mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-12-10 07:14:36 +01:00
pico_encode_gpio_wait doc improvement (#2579)
Some checks failed
Bazel presubmit checks / bazel-build-check (macos-latest) (push) Has been cancelled
Bazel presubmit checks / bazel-build-check (ubuntu-latest) (push) Has been cancelled
Bazel presubmit checks / other-bazel-checks (push) Has been cancelled
Check Configs / check-configs (push) Has been cancelled
CMake / build (push) Has been cancelled
Build on macOS / build (push) Has been cancelled
Build on Windows / build (push) Has been cancelled
Some checks failed
Bazel presubmit checks / bazel-build-check (macos-latest) (push) Has been cancelled
Bazel presubmit checks / bazel-build-check (ubuntu-latest) (push) Has been cancelled
Bazel presubmit checks / other-bazel-checks (push) Has been cancelled
Check Configs / check-configs (push) Has been cancelled
CMake / build (push) Has been cancelled
Build on macOS / build (push) Has been cancelled
Build on Windows / build (push) Has been cancelled
This commit is contained in:
parent
3461d65d79
commit
bb66fdfac0
1 changed files with 5 additions and 5 deletions
|
|
@ -18,10 +18,6 @@
|
|||
* parameters.
|
||||
*
|
||||
* For fuller descriptions of the instructions in question see the "RP2040 Datasheet"
|
||||
*
|
||||
* NOTE: These are helper functions for the raw instruction encoding, and thus
|
||||
* only provide support for pins numbered 0-31. You should adjust your encoding
|
||||
* according to your expected GPIO_BASE (see \ref pio_set_gpio_base)
|
||||
*/
|
||||
|
||||
// PICO_CONFIG: PARAM_ASSERTIONS_ENABLED_PIO_INSTRUCTIONS, Enable/disable assertions in the PIO instructions, type=bool, default=0, group=pio_instructions
|
||||
|
|
@ -271,8 +267,12 @@ static inline uint _pio_encode_irq(bool relative, uint irq) {
|
|||
*
|
||||
* This is the equivalent of `WAIT <polarity> GPIO <gpio>`
|
||||
*
|
||||
* \note gpio here refers to the raw instruction encoding, which only supports 32 GPIOs. So, if you had a PIO
|
||||
* program with `WAIT <polarity> GPIO 42` and a GPIO_BASE (see \ref pio_set_gpio_base) of 16, then you'd want to do
|
||||
* `pio_encode_wait_gpio(polarity, 42-16)` assuming you are using this function to craft instructions for \ref pio_sm_exec.
|
||||
*
|
||||
* \param polarity true for `WAIT 1`, false for `WAIT 0`
|
||||
* \param gpio The real GPIO number 0-31
|
||||
* \param gpio The GPIO number 0-31 relative to the state machine's GPIO_BASE (see \ref pio_set_gpio_base)
|
||||
* \return The instruction encoding with 0 delay and no side set value
|
||||
* \see pio_encode_delay, pio_encode_sideset, pio_encode_sideset_opt
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue