first std::function test
This commit is contained in:
parent
87ea5f663f
commit
665e50f456
3 changed files with 19 additions and 0 deletions
|
@ -1,11 +1,15 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
|
||||
#include "pico/util/queue.h"
|
||||
|
||||
class WinKeyer final
|
||||
{
|
||||
public:
|
||||
void run(queue_t &queue);
|
||||
void addObserver(std::function<void()> obs);
|
||||
|
||||
private:
|
||||
enum class CommandState {
|
||||
|
@ -24,4 +28,5 @@ class WinKeyer final
|
|||
CommandState m_commandState {CommandState::None};
|
||||
WkMode m_wkMode {WkMode::WK1};
|
||||
bool m_hostOpen {false};
|
||||
std::vector<std::function<void()>> m_observers;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue