1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include <stdint.h> struct power { struct power_stat { uint64_t energy; uint64_t timestamp; } stat[2]; int error; int count; int new_sample; uint64_t power_mW; }; int power_init(struct power *power); int power_update(struct power *power);