背光接口
公共头文件: #include "brookesia/hal_interface/interfaces/display/backlight.hpp"
API 参考
Header File
Classes
-
class DisplayBacklightIface : public esp_brookesia::hal::Interface
Display backlight control interface.
Public Functions
-
inline DisplayBacklightIface()
Construct a display backlight interface.
-
virtual ~DisplayBacklightIface() = default
Virtual destructor for polymorphic backlight interfaces.
-
virtual bool set_brightness(uint8_t percent) = 0
Set backlight brightness.
- 参数
percent -- [in] Brightness percentage.
- 返回
trueon success; otherwisefalse.
-
virtual bool get_brightness(uint8_t &percent) = 0
Get current backlight brightness.
- 参数
percent -- [out] Current brightness percentage.
- 返回
trueon success; otherwisefalse.
-
virtual bool is_light_on_off_supported() = 0
Check if the light on/off control is supported.
- 返回
trueif the light on/off control is supported; otherwisefalse.
-
virtual bool set_light_on_off(bool on) = 0
Set the backlight on/off state.
- 参数
on -- [in]
trueto set the backlight on;falseto set the backlight off.- 返回
trueif the backlight on/off state is set successfully; otherwisefalse.
-
virtual bool is_light_on() const = 0
Check if the backlight is set on.
- 返回
trueif the backlight is set on; otherwisefalse.
-
inline DisplayBacklightIface()