diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e58fc71..510430c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,5 @@ target_sources(pico_keyer PRIVATE pico_keyer.cpp settings.cpp + keyer.cpp ) \ No newline at end of file diff --git a/src/keyer.cpp b/src/keyer.cpp new file mode 100644 index 0000000..83f631d --- /dev/null +++ b/src/keyer.cpp @@ -0,0 +1,14 @@ +#include "keyer.h" + +void Keyer::run() +{ + switch (state) + { + case State::WAIT: + // do nothing + break; + + default: + break; + } +} \ No newline at end of file diff --git a/src/keyer.h b/src/keyer.h new file mode 100644 index 0000000..96abae0 --- /dev/null +++ b/src/keyer.h @@ -0,0 +1,18 @@ +#ifndef KEYER_H +#define KEYER_H + +class Keyer final +{ +public: + enum class State + { + WAIT + }; + + void run(); + +private: + State state{State::WAIT}; +}; + +#endif \ No newline at end of file diff --git a/src/settings.cpp b/src/settings.cpp index 637e94e..2f5c147 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1,6 +1,6 @@ #include -#include +#include "pico/stdlib.h" #include "settings.h" diff --git a/src/settings.h b/src/settings.h index 3e8ddcf..2b36485 100644 --- a/src/settings.h +++ b/src/settings.h @@ -1,7 +1,7 @@ #ifndef SETTINGS_H #define SETTINGS_H -#include +#include "pico/flash.h" const uint16_t MAGIC_NUMBER = 2;