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