|
Safe Sprinkler
Master/slave irrigation system (ESP-NOW + LoRaWAN)
|
#include "driver/gpio.h"#include "esp_err.h"#include "esp_log.h"
Go to the source code of this file.
Data Structures | |
| struct | alarm_handle_t |
Enumerations | |
| enum | alarm_state { NO_BEEP = 0 , BEEP } |
Functions | |
| int | alarm_sound_init (alarm_handle_t *alarm) |
| Initialize the alarm sound output. | |
| int | alarm_sound_toggle (alarm_handle_t *alarm) |
| Toggle the alarm sound on or off. | |
| enum alarm_state |
| int alarm_sound_init | ( | alarm_handle_t * | alarm | ) |
Initialize the alarm sound output.
Configures the GPIO and sets initial state. Call once before alarm_sound_toggle().
| alarm | Pointer to alarm_handle_t (power_pin must be set) |
| int alarm_sound_toggle | ( | alarm_handle_t * | alarm | ) |
Toggle the alarm sound on or off.
Switches between NO_BEEP and BEEP and updates alarm->current_state.
| alarm | Pointer to initialized alarm_handle_t |