1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#ifndef _DWXINFO_MODULES_BATTERY_H_ #define _DWXINFO_MODULES_BATTERY_H_ #include <stdio.h> #define BATTERY_VALUE_SIZE 5 struct battery { int full; int file_current; char value[BATTERY_VALUE_SIZE]; }; struct battery * battery_new(); void battery_free(struct battery *); void battery_update(struct battery *); #endif