add lock control via GPIO

This commit is contained in:
technyon
2022-07-01 19:23:52 +02:00
parent 571e4ddca2
commit 4f780eb164
10 changed files with 105 additions and 4 deletions

22
Gpio.h Normal file
View File

@@ -0,0 +1,22 @@
#pragma once
#include "NukiWrapper.h"
class Gpio
{
public:
Gpio() = delete;
static void init(NukiWrapper* nuki);
private:
static const uint _debounceTime;
static void IRAM_ATTR isrLock();
static void IRAM_ATTR isrUnlock();
static void IRAM_ATTR isrUnlatch();
static Gpio* _inst;
static NukiWrapper* _nuki;
static unsigned long _lockedTs;
};