20 lines
406 B
C
20 lines
406 B
C
#ifndef INC_ADC_READ_H_
|
|
#define INC_ADC_READ_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
#define N_MEAS 100 // number of measurements
|
|
#define N_PRE 30
|
|
#define N_POST N_MEAS - N_PRE
|
|
#define TH_lo (0.90/3.3) * (1<<16)
|
|
#define TH_hi (1/3.3) * (1<<16)
|
|
|
|
extern uint16_t results[N_MEAS+1];
|
|
extern uint8_t DC;
|
|
|
|
void ADC_calibrate();
|
|
void DMA_init();
|
|
void ADC_READ_init();
|
|
void ADC_READ_interrupt();
|
|
|
|
#endif /* INC_ADC_READ_H_ */
|