Files

25 lines
670 B
C++
Raw Permalink Normal View History

2024-06-27 14:50:57 +02:00
#pragma once
2025-01-12 18:08:57 +01:00
#include "input/InputDriver.h"
2024-06-27 14:50:57 +02:00
class EncoderInputDriver : public InputDriver
{
public:
EncoderInputDriver(void);
virtual void init(void) override;
virtual ~EncoderInputDriver(void) {}
static void intPressHandler(void);
static void intDownHandler(void);
static void intUpHandler(void);
static void intLeftHandler(void);
static void intRightHandler(void);
protected:
enum EncoderActionType { TB_ACTION_NONE, TB_ACTION_PRESSED, TB_ACTION_UP, TB_ACTION_DOWN, TB_ACTION_LEFT, TB_ACTION_RIGHT };
static volatile EncoderActionType action;
static void encoder_read(lv_indev_t *indev, lv_indev_data_t *data);
};