Safe Sprinkler
Master/slave irrigation system (ESP-NOW + LoRaWAN)
Loading...
Searching...
No Matches
switch.h
Go to the documentation of this file.
1#ifndef SWITCH_H
2#define SWITCH_H
3
4#include "driver/gpio.h"
5#include "esp_attr.h"
6#include "esp_err.h"
7
8typedef enum
9{
13
14typedef struct
15{
16 gpio_num_t pin;
20
30void IRAM_ATTR switch_isr_handler(void* arg);
31
32#endif
Definition switch.h:15
int pin
Definition switch.h:16
int64_t last_interrupt_time
Definition switch.h:18
switch_state_t state
Definition switch.h:17
switch_state_t
Definition switch.h:9
@ SWITCH_OFF
Definition switch.h:10
@ SWITCH_ON
Definition switch.h:11
void IRAM_ATTR switch_isr_handler(void *arg)
GPIO interrupt handler for an on/off switch.