Add I2C communication. Start writing DMX TX. Break generation already implemented
This commit is contained in:
14
include/dmx.h
Normal file
14
include/dmx.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef _DMX_H_
|
||||
#define _DMX_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
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);
|
||||
|
||||
#endif /* _DMX_H_ */
|
14
include/i2c.h
Normal file
14
include/i2c.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef _I2C_H_
|
||||
#define _I2C_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void i2c_init(void);
|
||||
|
||||
void i2c_reset(void);
|
||||
|
||||
int i2c_write(uint8_t i2c_addr, const uint8_t *data, uint8_t len);
|
||||
|
||||
int i2c_read(uint8_t i2c_addr, uint8_t command, uint8_t *data, uint8_t len);
|
||||
|
||||
#endif /* _I2C_H_ */
|
Reference in New Issue
Block a user