#ifndef _DATA_H_
#define _DATA_H_
-int read_data(int infd, int outfd);
+#define MAX_CELLS 10
+
+struct charger_data {
+ int channel;
+ int state;
+ double timestamp; /* seconds since beginning of the charging */
+ double input_voltage;
+ double charging_voltage;
+ double charging_current;
+ double cell_voltage[MAX_CELLS];
+
+ double total_charge; /* mAh */
+ double int_temp; /* celsius */
+ double ext_temp;
+};
+
+int init_data_parser(int infd, int outfd);
#endif