ESPHome
2024.11.1
|
#include <ac_dimmer.h>
Public Member Functions | |
uint32_t | timer_intr (uint32_t now) |
Function called from timer interrupt Input is current time in microseconds (micros()) Returns when next "event" is expected in µs, or 0 if no such event known. More... | |
void | gpio_intr () |
GPIO interrupt routine, called when ZC pin triggers. More... | |
Static Public Member Functions | |
static void | s_gpio_intr (AcDimmerDataStore *store) |
static void | s_timer_intr () |
Data Fields | |
ISRInternalGPIOPin | zero_cross_pin |
Zero-cross pin. More... | |
uint8_t | zero_cross_pin_number |
Zero-cross pin number - used to share ZC pin across multiple dimmers. More... | |
ISRInternalGPIOPin | gate_pin |
Output pin to write to. More... | |
uint16_t | value |
Value of the dimmer - 0 to 65535. More... | |
uint16_t | min_power |
Minimum power for activation. More... | |
uint32_t | cycle_time_us |
Time between the last two ZC pulses. More... | |
uint32_t | crossed_zero_at |
Time (in micros()) of last ZC signal. More... | |
uint32_t | enable_time_us |
Time since last ZC pulse to enable gate pin. 0 means not set. More... | |
uint32_t | disable_time_us |
Time since last ZC pulse to disable gate pin. 0 means no disable. More... | |
bool | init_cycle |
Set to send the first half ac cycle complete. More... | |
DimMethod | method |
Dimmer method. More... | |
Definition at line 14 of file ac_dimmer.h.
void IRAM_ATTR HOT esphome::ac_dimmer::AcDimmerDataStore::gpio_intr | ( | ) |
GPIO interrupt routine, called when ZC pin triggers.
Definition at line 90 of file ac_dimmer.cpp.
|
static |
Definition at line 138 of file ac_dimmer.cpp.
|
static |
Definition at line 156 of file ac_dimmer.cpp.
uint32_t IRAM_ATTR HOT esphome::ac_dimmer::AcDimmerDataStore::timer_intr | ( | uint32_t | now | ) |
Function called from timer interrupt Input is current time in microseconds (micros()) Returns when next "event" is expected in µs, or 0 if no such event known.
Definition at line 34 of file ac_dimmer.cpp.
uint32_t esphome::ac_dimmer::AcDimmerDataStore::crossed_zero_at |
Time (in micros()) of last ZC signal.
Definition at line 28 of file ac_dimmer.h.
uint32_t esphome::ac_dimmer::AcDimmerDataStore::cycle_time_us |
Time between the last two ZC pulses.
Definition at line 26 of file ac_dimmer.h.
uint32_t esphome::ac_dimmer::AcDimmerDataStore::disable_time_us |
Time since last ZC pulse to disable gate pin. 0 means no disable.
Definition at line 32 of file ac_dimmer.h.
uint32_t esphome::ac_dimmer::AcDimmerDataStore::enable_time_us |
Time since last ZC pulse to enable gate pin. 0 means not set.
Definition at line 30 of file ac_dimmer.h.
ISRInternalGPIOPin esphome::ac_dimmer::AcDimmerDataStore::gate_pin |
Output pin to write to.
Definition at line 20 of file ac_dimmer.h.
bool esphome::ac_dimmer::AcDimmerDataStore::init_cycle |
Set to send the first half ac cycle complete.
Definition at line 34 of file ac_dimmer.h.
DimMethod esphome::ac_dimmer::AcDimmerDataStore::method |
Dimmer method.
Definition at line 36 of file ac_dimmer.h.
uint16_t esphome::ac_dimmer::AcDimmerDataStore::min_power |
Minimum power for activation.
Definition at line 24 of file ac_dimmer.h.
uint16_t esphome::ac_dimmer::AcDimmerDataStore::value |
Value of the dimmer - 0 to 65535.
Definition at line 22 of file ac_dimmer.h.
ISRInternalGPIOPin esphome::ac_dimmer::AcDimmerDataStore::zero_cross_pin |
Zero-cross pin.
Definition at line 16 of file ac_dimmer.h.
uint8_t esphome::ac_dimmer::AcDimmerDataStore::zero_cross_pin_number |
Zero-cross pin number - used to share ZC pin across multiple dimmers.
Definition at line 18 of file ac_dimmer.h.