summaryrefslogtreecommitdiff
path: root/src/drivers/include/battery.hpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2022-11-07 12:01:29 +1100
committerjacqueline <me@jacqueline.id.au>2022-11-07 12:01:29 +1100
commit28d73ad8660e27f9c7b20b6e978d3d0c412dec00 (patch)
treec50b739ae4712f5ddb9fb6e44e39e01e4c20356d /src/drivers/include/battery.hpp
parentb13a9793e17e7e0e52ea08fa5fb69ca9b90ad56d (diff)
downloadtangara-fw-28d73ad8660e27f9c7b20b6e978d3d0c412dec00.tar.gz
Split driver-y things into a separate component
Diffstat (limited to 'src/drivers/include/battery.hpp')
-rw-r--r--src/drivers/include/battery.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/drivers/include/battery.hpp b/src/drivers/include/battery.hpp
new file mode 100644
index 00000000..399e866f
--- /dev/null
+++ b/src/drivers/include/battery.hpp
@@ -0,0 +1,16 @@
+#pragma once
+
+#include <stdint.h>
+
+#include "esp_err.h"
+
+namespace gay_ipod {
+
+esp_err_t init_adc(void);
+
+/**
+ * Returns the current battery level in millivolts.
+ */
+uint32_t read_battery_voltage(void);
+
+} // namespace gay_ipod