Emx::Key类 参考

#include "Key.hpp"

Public 类型

enum class  EventE : uint8_t { Click , LongPress }
 
using OnKeyEvent = std::function< void(const char *name, EventE e)>
 

Public 成员函数

 Key (const char *name, EuvLoop &loop, Bsp::GpioLike *key, int longPressTimeMs)
 
virtual ~Key ()
 
void Create (OnKeyEvent e)
 
void Destroy ()
 

静态 Public 属性

static const int DetectInterval = 50
 

成员类型定义说明

◆ OnKeyEvent

using Emx::Key::OnKeyEvent = std::function<void(const char *name, EventE e)>

成员枚举类型说明

◆ EventE

enum Emx::Key::EventE : uint8_t
strong
枚举值
Click 
LongPress 

构造及析构函数说明

◆ Key()

Emx::Key::Key ( const char *  name,
EuvLoop loop,
Bsp::GpioLike key,
int  longPressTimeMs 
)
inline

◆ ~Key()

virtual Emx::Key::~Key ( )
inlinevirtual

成员函数说明

◆ Create()

void Emx::Key::Create ( OnKeyEvent  e)

◆ Destroy()

void Emx::Key::Destroy ( )

类成员变量说明

◆ DetectInterval

const int Emx::Key::DetectInterval = 50
static