blob: c072ed15627cb155d366d1fccadd536fb3bacd62 (
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
|
#ifndef DRIVERS_I2C_H_
#define DRIVERS_I2C_H_
#include <stdbool.h>
#include <stdint.h>
#define I2C_NUM_OF_CHANNELS 7 // 6 dispensers and feeder
//front panel date saved in the same array of sampeled ADC data g_pui32ADCSeq[]
#define I2C_START_INDEX 14
#define I2C_ADC_DISP_1_POT 20
#define I2C_ADC_DISP_2_POT 19
#define I2C_ADC_DISP_3_POT 14
#define I2C_ADC_DISP_4_POT 17
#define I2C_ADC_DISP_5_POT 16
#define I2C_ADC_DISP_6_POT 15
#define I2C_ADC_FEEDER_POT 18
/*********************************************************************************************
* this function is responsible for recieving a to d data of the potentiometers that connected
* to front panel and arrives in I2C communication protocol.
* input parameters - slave addres of I2C device
* buffer to write the result into
* index inside the beffer from where to atart writing
*********************************************************************************************/
void SampleI2CData(uint32_t* _resultData);
void InitI2C(void);
#endif /* DRIVERS_I2C_H_ */
|