Skip to content

Commit eaecd3a

Browse files
committed
Documentation: Clarify GPIO interrupt behaviour
1 parent 5d422de commit eaecd3a

File tree

1 file changed

+9
-8
lines changed
  • src/rp2_common/hardware_gpio/include/hardware

1 file changed

+9
-8
lines changed

src/rp2_common/hardware_gpio/include/hardware/gpio.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -357,14 +357,14 @@ enum gpio_drive_strength gpio_get_drive_strength(uint gpio);
357357
* \param events Which events will cause an interrupt
358358
* \param enabled Enable or disable flag
359359
*
360-
* Events is a bitmask of the following:
360+
* Events is a bitmask of the following \ref gpio_irq_level values:
361361
*
362-
* bit | interrupt
363-
* ----|----------
364-
* 0 | Low level
365-
* 1 | High level
366-
* 2 | Edge low
367-
* 3 | Edge high
362+
* bit | constant | interrupt
363+
* ----|----------------------------------------------------------
364+
* 0 | GPIO_IRQ_LEVEL_LOW | Continuously while level is low
365+
* 1 | GPIO_IRQ_LEVEL_HIGH | Continuously while level is high
366+
* 2 | GPIO_IRQ_EDGE_FALL | On each transition from high to low
367+
* 3 | GPIO_IRQ_EDGE_RISE | On each transition from low to high
368368
*/
369369
void gpio_set_irq_enabled(uint gpio, uint32_t events, bool enabled);
370370

@@ -401,7 +401,8 @@ void gpio_set_dormant_irq_enabled(uint gpio, uint32_t events, bool enabled);
401401
*
402402
* \param gpio GPIO number
403403
* \param events Bitmask of events to clear. See \ref gpio_set_irq_enabled for details.
404-
*
404+
*
405+
* \note \ref gpio_set_irq_enabled_with_callback calls this function before the callback.
405406
*/
406407
void gpio_acknowledge_irq(uint gpio, uint32_t events);
407408

0 commit comments

Comments
 (0)