Hal refactored (#99)
This commit is contained in:
committed by
GitHub
parent
0188ce721c
commit
33bb742dfb
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "lvgl.h"
|
||||
|
||||
namespace tt::hal {
|
||||
|
||||
class Touch;
|
||||
|
||||
class Display {
|
||||
public:
|
||||
[[nodiscard]] virtual bool start() = 0;
|
||||
[[nodiscard]] virtual bool stop() = 0;
|
||||
|
||||
[[nodiscard]] virtual void setPowerOn(bool turnOn) = 0;
|
||||
[[nodiscard]] virtual bool isPoweredOn() const = 0;
|
||||
[[nodiscard]] virtual bool supportsPowerControl() const = 0;
|
||||
|
||||
[[nodiscard]] virtual Touch* _Nullable createTouch() = 0;
|
||||
|
||||
/** Set a value in the range [0, 255] */
|
||||
virtual void setBacklightDuty(uint8_t backlightDuty) = 0;
|
||||
[[nodiscard]] virtual uint8_t getBacklightDuty() const = 0;
|
||||
[[nodiscard]] virtual bool supportsBacklightDuty() const = 0;
|
||||
|
||||
/** After start() returns true, this should return a valid pointer until stop() is called and returns true */
|
||||
[[nodiscard]] virtual lv_display_t* _Nullable getLvglDisplay() const = 0;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user