more code cleanup
This commit is contained in:
parent
1d4d387299
commit
69b6214668
5 changed files with 35 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
target_sources(pico_keyer PRIVATE
|
||||
pico_keyer.cpp
|
||||
settings.cpp
|
||||
keyer.cpp
|
||||
)
|
14
src/keyer.cpp
Normal file
14
src/keyer.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include "keyer.h"
|
||||
|
||||
void Keyer::run()
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case State::WAIT:
|
||||
// do nothing
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
18
src/keyer.h
Normal file
18
src/keyer.h
Normal file
|
@ -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
|
|
@ -1,6 +1,6 @@
|
|||
#include <cstring>
|
||||
|
||||
#include <pico/stdlib.h>
|
||||
#include "pico/stdlib.h"
|
||||
|
||||
#include "settings.h"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef SETTINGS_H
|
||||
#define SETTINGS_H
|
||||
|
||||
#include <pico/flash.h>
|
||||
#include "pico/flash.h"
|
||||
|
||||
const uint16_t MAGIC_NUMBER = 2;
|
||||
|
||||
|
|
Loading…
Reference in a new issue