49 void setup()
override;
51 void dump_config()
override;
58 void write_state(
float state)
override;
bool init_with_half_cycle_
uint32_t enable_time_us
Time since last ZC pulse to enable gate pin. 0 means not set.
Copy of GPIOPin that is safe to use from ISRs (with no virtual functions)
Base class for all output components that can output a variable level, like PWM.
uint32_t cycle_time_us
Time between the last two ZC pulses.
uint32_t crossed_zero_at
Time (in micros()) of last ZC signal.
void set_gate_pin(InternalGPIOPin *gate_pin)
uint16_t min_power
Minimum power for activation.
DimMethod method
Dimmer method.
bool init_cycle
Set to send the first half ac cycle complete.
void set_method(DimMethod method)
static void s_gpio_intr(AcDimmerDataStore *store)
static void s_timer_intr()
InternalGPIOPin * zero_cross_pin_
uint32_t timer_intr(uint32_t now)
Function called from timer interrupt Input is current time in microseconds (micros()) Returns when ne...
uint16_t value
Value of the dimmer - 0 to 65535.
ISRInternalGPIOPin gate_pin
Output pin to write to.
Implementation of SPI Controller mode.
void set_init_with_half_cycle(bool init_with_half_cycle)
ISRInternalGPIOPin zero_cross_pin
Zero-cross pin.
uint32_t disable_time_us
Time since last ZC pulse to disable gate pin. 0 means no disable.
void set_zero_cross_pin(InternalGPIOPin *zero_cross_pin)
InternalGPIOPin * gate_pin_
void gpio_intr()
GPIO interrupt routine, called when ZC pin triggers.
uint8_t zero_cross_pin_number
Zero-cross pin number - used to share ZC pin across multiple dimmers.