#ifndef KEYER_H #define KEYER_H class Keyer final { public: enum class State { Wait, Dit, Dah, InterCharSpace, }; void run(); private: State state{State::Wait}; uint8_t numElements{0}; }; inline uint64_t element_duration_us(uint8_t wpm) { uint64_t duration = static_cast(1.2 / static_cast(wpm) * 1000 * 1000); return duration; } #endif