aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Drivers/ADC_Sampling/ADC.h
blob: b667025e5cf531b5467396bfbfa940bbfb27541c (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
#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  MAX_ADC_DEVICES 20
#define MAX_DISPENSERS

//#define MAX_ADC_DEVICES NUM_ADC_CHANNELS

#define MAX_DIGITAL_POTENTIOMETER_READ		0x660D

extern int DispenserIdToPressureSensorId[MAX_DISPENSERS];
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);

void ADC0SS0Handler(void);

#endif /* DRIVERS_ADC_H_ */