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

24 lines
469 B
C

#ifndef _DMX_H_
#define _DMX_H_
#include <stdint.h>
enum dmx_tx_state {
DMX_TX_OFF,
DMX_TX_IDLE,
DMX_TX_BREAK,
DMX_TX_BREAK_PAUSE,
DMX_TX_NULLBYTE,
DMX_TX_DATA,
};
void dmx_init(uint8_t *data, uint32_t universe_length, GPIO_TypeDef *tx_port, uint8_t tx_pin,
uint16_t dmx_delay, uint16_t dmx_break_len, uint16_t break_pause);
void dmx_stream_start(void);
void dmx_stream_stop(void);
enum dmx_tx_state dmx_tx_get_current_state(void);
#endif /* _DMX_H_ */