microscope-ring-light/firmware/include/ring-light/dmx.h

38 lines
609 B
C
Raw Normal View History

2022-06-21 20:33:23 +02:00
#ifndef _DMX_H_
#define _DMX_H_
#include <stdint.h>
#include <stdbool.h>
#define DMX_UNIVERSE_SIZE (255u)
#define DMX_USED_CHANNEL_COUNT (129u)
/**
* @brief Init DMX reception
*
* DMX data is received from the base channel onwards:
* - R LED1
* - G LED1
* - B LED1
* - W LED1
* - R LED2
* ...
* - W LED32
* - W DISCRETE
*
* In Sum: 129 8 bit channels
*
* @param base_channel Base channel the ring light will listen on
*/
void dmx_init(uint32_t base_channel);
/**
* @brief Returns the array of the 129 DMX channels
* @return
*/
const uint8_t *dmx_get_data(void);
2022-06-21 20:33:23 +02:00
#endif /* _DMX_H_ */