first std::function test

This commit is contained in:
Martin Brodbeck 2024-03-07 15:15:20 +01:00
parent 87ea5f663f
commit 665e50f456
3 changed files with 19 additions and 0 deletions

View file

@ -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;
};