steering-wheel/Core/Inc/STWButtonController.hpp

25 lines
674 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 = 21;
constexpr uint8_t KEY_ENC1_CCW = 22;
constexpr uint8_t KEY_ENC2_CW = 23;
constexpr uint8_t KEY_ENC2_CCW = 24;
class STWButtonController : public touchgfx::ButtonController {
public:
virtual void init();
virtual bool sample(uint8_t &key);
};
#endif // __INC_STW_BUTTON_CONTROLLER_HPP