aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Code_Composer/twine_usblib_demo/drivers/ADC_Sampling/ADC.h
blob: f04c2d512ca5613fe73b26d50d1914125814a79e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef DRIVERS_ADC_H_
#define DRIVERS_ADC_H_

#include <stdint.h>

//*****************************************************************************
//
// The following are indexes for values returned from the ADC's. These index's
// map directly to g_pui32ADCSeq[], and inside this array there is a directly
// ADC copied data
//*****************************************************************************
#define ADCSEQ_DISPENSER_TEMP_3 0
#define ADCSEQ_DISPENSER_TEMP_1 1
#define ADCSEQ_RGB_RED          2
#define ADCSEQ_TEMP_3           3
#define ADCSEQ_POS_POOLER       4
#define ADCSEQ_RGB_GREEN        5
#define ADCSEQ_RGB_BLUE         6
#define ADCSEQ_DISPENSER_TEMP_5 7
#define ADCSEQ_DISPENSER_TEMP_6 8
#define ADCSEQ_TEMP_1           9
#define ADCSEQ_TEMP_2           10
#define ADCSEQ_DISPENSER_TEMP_4 11
#define ADCSEQ_DISPENSER_TEMP_2 12
#define ADCSEQ_POS_WINDER       13

//max potentiometer read in I2C protocol
#define MAX_DIGITAL_POTENTIOMETER_READ      0x660D

typedef void (*ProcessCallback)(uint32_t*  adcData);

void ADCAcquireInit(void);

void ADCAcquireStart(ProcessCallback _callback, uint32_t _period);

void ADCAcquireStop(void);

#endif // DRIVERS_ADC_H_