25 lines
690 B
C++
25 lines
690 B
C++
#ifndef __INC_STW_BUTTON_CONTROLLER_HPP
|
|
#define __INC_STW_BUTTON_CONTROLLER_HPP
|
|
|
|
#include "platform/driver/button/ButtonController.hpp"
|
|
#include <stdint.h>
|
|
|
|
constexpr uint8_t KEY_BTN1 = '1';
|
|
constexpr uint8_t KEY_BTN2 = '2';
|
|
constexpr uint8_t KEY_BTN3 = '3';
|
|
constexpr uint8_t KEY_BTN4 = '4';
|
|
constexpr uint8_t KEY_BTN5 = '5';
|
|
constexpr uint8_t KEY_BTN6 = '6';
|
|
constexpr uint8_t KEY_ENC1_CW = 'l';
|
|
constexpr uint8_t KEY_ENC1_CCW = 'h';
|
|
constexpr uint8_t KEY_ENC2_CW = 'j';
|
|
constexpr uint8_t KEY_ENC2_CCW = 'k';
|
|
|
|
class STWButtonController : public touchgfx::ButtonController {
|
|
public:
|
|
virtual void init();
|
|
virtual bool sample(uint8_t &key);
|
|
};
|
|
|
|
#endif // __INC_STW_BUTTON_CONTROLLER_HPP
|