1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/periph/gpio: state that interrupt callback must not be NULL

This allows us to use `assert(cb != NULL)` inside `gpio_init_int()`
and save a few cycles of interrupt latency.
This commit is contained in:
Benjamin Valentin 2021-10-19 20:55:17 +02:00
parent 39c91bbf7d
commit f624eb473a

View File

@ -182,6 +182,8 @@ int gpio_init(gpio_t pin, gpio_mode_t mode);
* @note You have to add the module `periph_gpio_irq` to your project to
* enable this function
*
* @pre @p cb must not be NULL
*
* @param[in] pin pin to initialize
* @param[in] mode mode of the pin, see @c gpio_mode_t
* @param[in] flank define the active flank(s)