aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/src/adc.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/src/adc.hpp')
-rw-r--r--firmware/src/adc.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/firmware/src/adc.hpp b/firmware/src/adc.hpp
new file mode 100644
index 0000000..a3bd0b0
--- /dev/null
+++ b/firmware/src/adc.hpp
@@ -0,0 +1,25 @@
+#include <array>
+#include <cstdint>
+
+namespace adc
+{
+
+struct Sample
+{
+ std::uint8_t value {0};
+ bool changed {false};
+};
+
+void
+init()
+{
+}
+
+std::array<Sample, 2>
+get_samples()
+{
+ // TODO: scale 12-bit range into MIDI 7-bit range with hysteresis
+ return std::array<Sample, 2>{{{}, {}}};
+}
+
+}