]> git.itanic.dy.fi Git - log-plotter/blob - data.h
3034e0c62ad1999081b342dceb206cdd2d862c7d
[log-plotter] / data.h
1 #ifndef _DATA_H_
2 #define _DATA_H_
3
4 #define MAX_CELLS 10
5
6 struct charger_data {
7         int channel;
8         int state;
9         double timestamp;       /* seconds since beginning of the charging */
10         double input_voltage;
11         double charging_voltage;
12         double charging_current;
13         double cell_voltage[MAX_CELLS];
14
15         double total_charge;    /* mAh */
16         double int_temp;        /* milli celsius */
17         double ext_temp;
18 };
19
20 int read_data(int infd, int outfd);
21
22 #endif