diff options
| author | Eddy Pedroni <epedroni@pm.me> | 2026-10-25 09:23:27 +0100 |
|---|---|---|
| committer | Eddy Pedroni <epedroni@pm.me> | 2026-10-25 10:32:32 +0100 |
| commit | a41db06404670b18c7a0809009d611a4bc807e90 (patch) | |
| tree | 0e2ea5ca87d02da834bb2ae9e584319c4045835b /firmware/src/adc.hpp | |
Initial commit, firmware skeleton
Diffstat (limited to 'firmware/src/adc.hpp')
| -rw-r--r-- | firmware/src/adc.hpp | 25 |
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>{{{}, {}}}; +} + +} |
