2022-08-08 22:30:19 +02:00
|
|
|
#ifndef _DMX_H_
|
|
|
|
#define _DMX_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2022-08-11 23:24:24 +02:00
|
|
|
enum dmx_tx_state {
|
|
|
|
DMX_TX_OFF,
|
|
|
|
DMX_TX_IDLE,
|
|
|
|
DMX_TX_BREAK,
|
|
|
|
DMX_TX_BREAK_PAUSE,
|
|
|
|
DMX_TX_NULLBYTE,
|
|
|
|
DMX_TX_DATA,
|
|
|
|
};
|
2022-08-08 22:30:19 +02:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
2022-08-11 23:24:24 +02:00
|
|
|
enum dmx_tx_state dmx_tx_get_current_state(void);
|
|
|
|
|
2022-08-08 22:30:19 +02:00
|
|
|
#endif /* _DMX_H_ */
|