A struct for a clock used for dimming a PowerUnit. More...
Public Attributes | |
uint8_t | level |
The current level of the dimmer (0-100) More... | |
volatile uint8_t * | interruptreg |
The timer interrupt register. More... | |
uint8_t | interruptbit |
The bit on the timer interrupt register. More... | |
volatile uint16_t * | comparereg |
Time timer compare register to use. More... | |
struct PowerUnit * | pu |
The currently-connected PowerUnit, if any. More... | |
A struct for a clock used for dimming a PowerUnit.
The combination of interrupt and interrupt represents the timer interrupt register and bit to be set/cleared when dimming is started or stopped. This prevents unecessary interrupts when thing are not being dimmed. The compare register pointed to by comparereg is set to the appropriate time that represents when to turn on/pulse the triac.
Definition at line 110 of file triaclight.c.
volatile uint16_t* DimmerClock::comparereg |
Time timer compare register to use.
Definition at line 122 of file triaclight.c.
uint8_t DimmerClock::interruptbit |
The bit on the timer interrupt register.
Definition at line 119 of file triaclight.c.
volatile uint8_t* DimmerClock::interruptreg |
The timer interrupt register.
Definition at line 116 of file triaclight.c.
uint8_t DimmerClock::level |
The current level of the dimmer (0-100)
Definition at line 113 of file triaclight.c.
struct PowerUnit* DimmerClock::pu |
The currently-connected PowerUnit, if any.
Definition at line 125 of file triaclight.c.