tcMenu
src
extras
TwoButtonSwitchEncoder.h
1
/*
2
* Copyright (c) 2018 https://www.thecoderscorner.com (Dave Cherry).
3
* This product is licensed under an Apache license, see the LICENSE file in the top-level directory.
4
*/
5
6
#ifndef TCMENU_TWOBUTTONSWITCHCONTROL_H
7
#define TCMENU_TWOBUTTONSWITCHCONTROL_H
8
14
#include <
tcMenu.h
>
15
#include <IoAbstraction.h>
16
22
class
TwoButtonSwitchEncoder
:
public
RotaryEncoder,
public
SwitchListener {
23
private
:
24
pinid_t upPin;
25
pinid_t downPin;
26
27
public
:
34
TwoButtonSwitchEncoder
(pinid_t up, pinid_t down, EncoderCallbackFn callbackFn);
35
36
void
onPressed(pinid_t pin,
bool
held)
override
;
37
38
void
onReleased(pinid_t pin,
bool
held)
override
;
39
40
};
41
42
#endif
//TCMENU_TWOBUTTONSWITCHCONTROL_H
TwoButtonSwitchEncoder
Definition:
TwoButtonSwitchEncoder.h:22
TwoButtonSwitchEncoder::TwoButtonSwitchEncoder
TwoButtonSwitchEncoder(pinid_t up, pinid_t down, EncoderCallbackFn callbackFn)
Definition:
TwoButtonSwitchEncoder.cpp:4
tcMenu.h
The menu manager is responsible for managing a set of menu items, and is configured with a renderer a...