|
LightHub 4.6.0
Open-source smart home controller firmware
|
DMX input/output (and Art-Net) support. More...
Go to the source code of this file.
Macros | |
| #define | D_UPDATED1 1 |
| #define | D_UPDATED2 2 |
| #define | D_UPDATED3 4 |
| #define | D_UPDATED4 8 |
| #define | D_CHECKT 300 |
Functions | |
| void | DMXput (void) |
| Propagates received DMX input frames to the mapped items. | |
| void | DMXinSetup (int channels) |
| Sets up the DMX input for the given number of channels. | |
| void | DMXoutSetup (int channels) |
| Sets up the DMX output for the given number of channels. | |
| void | artnetSetup () |
| Initializes the Art-Net receiver and wires its frame callback. | |
| void | artnetSetChans (uint8_t minCh, uint8_t maxCh) |
| Restricts the Art-Net channel range that is forwarded. | |
| void | DMXCheck (void) |
| DMX housekeeping called from the main loop: propagates changes and services pending DMX-in updates. | |
| int | itemCtrl2 (char *name, int r, int g, int b, int w) |
| Drives a named DMX/LED item with an RGB(W) value. | |
| void | DmxWriteBuf (uint16_t chan, uint8_t val) |
| Writes a value into the intermediate (smoothing) DMX output buffer. | |
| void | DMXOUT_propagate () |
| Smoothly ramps the actual DMX output toward the buffered target. | |
Variables | |
| aJsonObject * | dmxArr |
| DMX channel-to-item mapping array from the JSON config. | |
DMX input/output (and Art-Net) support.
DMX output uses a hardware USART on the SAM3X8E (Due) and a software bit-banged driver (DmxSimple, pin 3/18) on AVR; DMX input uses DMXSerial on AVR and the hardware USART on the Due. Received DMX/Art-Net channels are mapped to items via the dmxArr configuration.
| #define D_CHECKT 300 |
| #define D_UPDATED1 1 |
| #define D_UPDATED2 2 |
| #define D_UPDATED3 4 |
| #define D_UPDATED4 8 |
| void artnetSetChans | ( | uint8_t | minCh, |
| uint8_t | maxCh ) |
Restricts the Art-Net channel range that is forwarded.
| minCh | First channel (1-based) to accept. |
| maxCh | Last channel (1-based) to accept. |
| void artnetSetup | ( | ) |
Initializes the Art-Net receiver and wires its frame callback.
| void DMXCheck | ( | void | ) |
DMX housekeeping called from the main loop: propagates changes and services pending DMX-in updates.
| void DMXinSetup | ( | int | channels | ) |
Sets up the DMX input for the given number of channels.
| channels | Number of DMX input channels. |
ToDo: re-init
| void DMXOUT_propagate | ( | ) |
Smoothly ramps the actual DMX output toward the buffered target.
| void DMXoutSetup | ( | int | channels | ) |
Sets up the DMX output for the given number of channels.
| channels | Number of DMX output channels. |
| void DMXput | ( | void | ) |
Propagates received DMX input frames to the mapped items.
DMX in/out is handled per platform: on the SAM3X8E (Due) a hardware USART (DmxDue) is used for both input and output; on AVR a software bit-banged driver (DmxSimple for output on pin 3/18, DMXSerial for input). ESP8266/ESP32 use ESPDMX.
| void DmxWriteBuf | ( | uint16_t | chan, |
| uint8_t | val ) |
Writes a value into the intermediate (smoothing) DMX output buffer.
| chan | 1-based DMX channel. |
| val | Channel value 0..255. |
| int itemCtrl2 | ( | char * | name, |
| int | r, | ||
| int | g, | ||
| int | b, | ||
| int | w ) |
Drives a named DMX/LED item with an RGB(W) value.
| name | Name of the target item. |
| r | Red component. |
| g | Green component. |
| b | Blue component. |
| w | White component. |
|
extern |
DMX channel-to-item mapping array from the JSON config.