aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.h
blob: f4e17ad3ff6fe1fcfa6455858857202386ab3abe (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
41
42
43
44
45
46
47
48
49
#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
//*****************************************************************************

typedef enum
{
    AIR_PRESSURE_1,
    AIR_PRESSURE_2,
    DISPENSE_PRESSURE_1,
    DISPENSE_PRESSURE_2,
    DISPENSE_PRESSURE_3,
    DISPENSE_PRESSURE_4,
    DISPENSE_PRESSURE_5,
    DISPENSE_PRESSURE_6,
    DISPENSE_PRESSURE_7,
    DISPENSE_PRESSURE_8,
    LEFT_DANCER_1,
    LEFT_DANCER_2,
    RIGHT_DANCER,
    DRYER_CURRENT_1,
    DRYER_CURRENT_2,
    DRYER_CURRENT_3,
    MAX_ADC_DEVICES
}ADC_DATA_DEVICES;
//max potentiometer read in I2C protocol
#define MAX_DIGITAL_POTENTIOMETER_READ		0x660D

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

void ADCAcquireInit(void);

uint32_t ADC_TriggerCollection(void);

uint32_t ADC_GetReading(int DataItemId);

void ADCAcquireStart(ProcessCallback _callback, uint32_t _period);

void ADCAcquireStop(void);

#endif /* DRIVERS_ADC_H_ */