Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/rp2_common/hardware_pio/include/hardware/pio_instructions.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,23 @@ static inline uint pio_encode_wait_irq(bool polarity, bool relative, uint irq) {
return _pio_encode_instr_and_args(pio_instr_bits_wait, 2u | (polarity ? 4u : 0u), _pio_encode_irq(relative, irq));
}

#if PICO_PIO_VERSION > 0
/*! \brief Encode a WAIT for jmppin instruction
* \ingroup pio_instructions
*
* This is the equivalent of `WAIT <polarity> JMPPIN + <offset>`
*
* \param polarity true for `WAIT 1`, false for `WAIT 0`
* \param offset The pin offset 0-3 relative to the executing SM's jmp pin mapping
* \return The instruction encoding with 0 delay and no side set value
* \see pio_encode_delay, pio_encode_sideset, pio_encode_sideset_opt
*/
static inline uint pio_encode_wait_jmppin(bool polarity, uint offset) {
valid_params_if(PIO_INSTRUCTIONS, offset <= 4);
return _pio_encode_instr_and_args(pio_instr_bits_wait, 3u | (polarity ? 4u : 0u), offset);
}
#endif

/*! \brief Encode an IN instruction
* \ingroup pio_instructions
*
Expand Down
Loading