mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-12-10 07:14:36 +01:00
Add missing pio_encode_wait_jmppin function to pio_instructions.h
This commit is contained in:
parent
a76f2416ba
commit
478d75804c
1 changed files with 17 additions and 0 deletions
|
|
@ -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));
|
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
|
/*! \brief Encode an IN instruction
|
||||||
* \ingroup pio_instructions
|
* \ingroup pio_instructions
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue