2023-10-16 14:29:23 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* adc.c: probe, user config, and user IO (switch and button) reading
|
|
|
|
*
|
|
|
|
* file creation: 20231016 0102
|
|
|
|
*/
|
|
|
|
|
2023-10-19 16:20:41 -07:00
|
|
|
#ifndef _INC_ADC_H
|
|
|
|
#define _INC_ADC_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
2023-10-16 14:29:23 -07:00
|
|
|
|
2023-10-21 19:45:15 -07:00
|
|
|
#define ADC_CHANNELS 5
|
2023-11-01 06:05:01 -07:00
|
|
|
#define ADC_HISTLEN 32
|
2023-10-19 19:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-01 06:05:01 -07:00
|
|
|
extern uint32_t adc_avg[ADC_CHANNELS];
|
2023-10-19 16:20:41 -07:00
|
|
|
|
2023-10-19 19:53:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
void adc_init();
|
2023-10-19 16:20:41 -07:00
|
|
|
uint8_t adc_next();
|
|
|
|
|
2023-10-21 19:45:15 -07:00
|
|
|
void adc_switch0();
|
|
|
|
|
2023-10-19 16:20:41 -07:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* _INC_ADC_H */
|