tcMenu
Loading...
Searching...
No Matches
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
22class TwoButtonSwitchEncoder : public RotaryEncoder, public SwitchListener {
23private:
24 pinid_t upPin;
25 pinid_t downPin;
26
27public:
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
Definition TwoButtonSwitchEncoder.h:22
The menu manager is responsible for managing a set of menu items, and is configured with a renderer a...