#include "driver/gpio.h"
#include "esp_attr.h"
#include "esp_err.h"
Go to the source code of this file.
|
| void IRAM_ATTR | switch_isr_handler (void *arg) |
| | GPIO interrupt handler for an on/off switch.
|
| |
◆ switch_state_t
| Enumerator |
|---|
| SWITCH_OFF | |
| SWITCH_ON | |
◆ switch_isr_handler()
| void IRAM_ATTR switch_isr_handler |
( |
void * |
arg | ) |
|
GPIO interrupt handler for an on/off switch.
Call from GPIO ISR; debounces and toggles switch state (SWITCH_ON <-> SWITCH_OFF). arg must be a pointer to the on_off_switch_t for this switch.
- Parameters
-
| arg | User argument: pointer to on_off_switch_t (passed to gpio_isr_handler_add) |