Open Lighting Architecture  Latest Git
Public Member Functions | List of all members
ola::plugin::spidmx::SPIDMXParser Class Reference

Public Member Functions

 SPIDMXParser (DmxBuffer *buffer, Callback0< void > *callback)
 
void ParseDmx (uint8_t *buffer, uint64_t chunksize)
 
void SetCallback (Callback0< void > *callback)
 

Member Function Documentation

◆ ParseDmx()

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:

  • MAB: Mark after break
  • MBS: Mark between slots
  • MBB: Mark before break Loop through the given SPI raw bytes and call in every iteration the respective function that handles the byte in the current state.
Parameters
*buffer- The buffer with SPI bytes to read from
buffersize- Size of the buffer

The documentation for this class was generated from the following files: