Open Lighting Architecture
Latest Git
|
Public Member Functions | |
SPIDMXParser (DmxBuffer *buffer, Callback0< void > *callback) | |
void | ParseDmx (uint8_t *buffer, uint64_t chunksize) |
void | SetCallback (Callback0< void > *callback) |
void ola::plugin::spidmx::SPIDMXParser::ParseDmx | ( | uint8_t * | buffer, |
uint64_t | buffersize | ||
) |
This class implements the DMX protocol on a very low level, so be sure to fully understand the protocol before you tackle this code ;)
Possible DMX frequencies are 245 - 255kbit/s. With a sampling rate of 2MHz, this results in one DMX bit being mapped to 8.163265306122449 - 7.843137254901961 SPI bits. So if we calculate with 7.5 - 8.5 bit length, we should be fine.
Abbreviations used in this class:
*buffer | - The buffer with SPI bytes to read from |
buffersize | - Size of the buffer |