Add ADC Handling. Write first draft of operating modes for testing
This commit is contained in:
@@ -3,6 +3,14 @@
|
||||
|
||||
#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);
|
||||
@@ -11,4 +19,6 @@ void dmx_stream_start(void);
|
||||
|
||||
void dmx_stream_stop(void);
|
||||
|
||||
enum dmx_tx_state dmx_tx_get_current_state(void);
|
||||
|
||||
#endif /* _DMX_H_ */
|
19
include/poti.h
Normal file
19
include/poti.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef _POTI_H_
|
||||
#define _POTI_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define POTI_COUNT (3)
|
||||
|
||||
#define POTI_ADC_CHANNELS 0, 1, 4
|
||||
|
||||
struct poti_values {
|
||||
uint16_t current_pot_vals[POTI_COUNT];
|
||||
uint8_t pot_vals_filtered[POTI_COUNT];
|
||||
};
|
||||
|
||||
void poti_init_adc(void);
|
||||
|
||||
void poti_get_values(struct poti_values *out_val);
|
||||
|
||||
#endif /* _POTI_H_ */
|
Reference in New Issue
Block a user