aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/src/firmware.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/src/firmware.cpp')
-rw-r--r--firmware/src/firmware.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/firmware/src/firmware.cpp b/firmware/src/firmware.cpp
new file mode 100644
index 0000000..fc5bdd7
--- /dev/null
+++ b/firmware/src/firmware.cpp
@@ -0,0 +1,35 @@
+#include "pico/stdlib.h"
+
+#include "debug.hpp"
+#include "display.hpp"
+#include "adc.hpp"
+#include "midi.hpp"
+
+void
+update()
+{
+ for (auto const [value, changed] : adc::get_samples())
+ {
+ if (!changed) continue;
+
+ midi::send_message();
+ // update framebuffer
+ }
+
+ // send frame to display
+}
+
+[[noreturn]] int
+main()
+{
+ debug::init();
+ display::init();
+ adc::init();
+ midi::init();
+
+ while (true)
+ {
+ update();
+ sleep_ms(50);
+ }
+}