summaryrefslogtreecommitdiff
path: root/overlay/power.h
diff options
context:
space:
mode:
Diffstat (limited to 'overlay/power.h')
-rw-r--r--overlay/power.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/overlay/power.h b/overlay/power.h
new file mode 100644
index 00000000..d77dbabc
--- /dev/null
+++ b/overlay/power.h
@@ -0,0 +1,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);