![]() |
Fraise
2.1
FRAmework for Interfacing Software and Electronics
|
#include <fruit.h>Go to the source code of this file.
Macros | |
Settings to put in config.h | |
You must define the pin used to trig the interrupt (sensing the AC zero-crossing): #define DIMMER_INTPIN K9 (replace K9 by the pin used by your dimmer)
The following parameters can be overloaded: | |
| #define | DIMMER_INTEDGE |
| Edge of the interrupt (0:falling edge ; 1:rising edge) ; default: 1(rising edge). | |
| #define | DIMMER_TIMER |
| Timer to be used by the dimmer module (only 1, 3 or 5 ; default: 5). | |
| #define | DIMMER_K0 |
| output pin for channel 0. | |
| #define | DIMMER_K1 |
| output pin for channel 1. | |
| #define | DIMMER_K2 |
| output pin for channel 2. | |
| #define | DIMMER_K3 |
| output pin for channel 3. | |
| #define | DIMMER_K4 |
| output pin for channel 4. | |
| #define | DIMMER_K5 |
| output pin for channel 5. | |
| #define | DIMMER_K6 |
| output pin for channel 6. | |
| #define | DIMMER_K7 |
| output pin for channel 7. | |
| #define | DIMMER_TMIN |
| #define | DIMMER_INTPRI |
Functions | |
Initialization | |
| void | dimmerInit (void) |
| Init the module in setup() | |
Main loop functions | |
| void | dimmerService (void) |
| Module service routine, to be called by the main loop(). | |
Utilities | |
| void | dimmerSet (unsigned char num, unsigned int val) |
| Set the value of a dimmer channel. More... | |
Interrupt routine | |
| void | dimmerHighInterrupt (void) |
| Module high interrupt routine, must be called by the highInterrupts() user defined function. | |
| void | dimmerLowInterrupt (void) |
| Module low interrupt routine, must be called by the lowInterrupts() user defined function. | |
Receive function | |
| void | dimmerReceive () |
| Module receive function, to be called by the fraiseReceive() user defined function. More... | |
| void | dimmerPrintDebug () |