#pragma once #include "config.hpp" #include "hardware.hpp" #include #include "../io/io.hpp" namespace adc { template class Adc { public: static_assert(sizeof(Input) == -1, "Invalid input source selected"); }; template class Adc { private: using callback_t = void (*)(uint16_t); public: static_assert(detail::supports_adc_v, "Pin does not support ADC"); Adc() {} Adc(callback_t callback) : m_callback(callback) {} uint16_t read() { return 0; } private: const callback_t m_callback = nullptr; }; template class Adc { private: using callback_t = void (*)(uint16_t); public: Adc() {} Adc(callback_t callback) : m_callback(callback) {} uint16_t read() { return 0; } private: const callback_t m_callback = nullptr; }; } // namespace adc