Display Service
The display service is responsible for managing screen brightness, power on/off and other display-related functions.
Brightness Settings
Set screen brightness:
void eos_display_set_brightness(uint8_t brightness, eos_display_duration_t duration_ms, bool is_temporary);
Parameters:
brightness: Brightness value (0-100)duration_ms: Animation duration in milliseconds, useeos_display_duration_tpresets orEOS_DISPLAY_DURATION_OFFfor immediate changeis_temporary: If true, saves current brightness and temporarily sets new brightness; callingeos_display_restore()can restore the saved brightness
Animation Duration Presets
typedef enum {
EOS_DISPLAY_DURATION_OFF = 0, // Immediate change
EOS_DISPLAY_DURATION_FAST = 100, // Fast (100ms)
EOS_DISPLAY_DURATION_MEDIUM = 300, // Medium (300ms)
EOS_DISPLAY_DURATION_SLOW = 500, // Slow (500ms)
} eos_display_duration_t;
Screen Power Control
Turn On Screen
void eos_display_power_on(void);
Turn Off Screen
void eos_display_power_off(void);
Restore Brightness
Restore to the brightness saved when eos_display_set_brightness() was called:
void eos_display_restore(eos_display_duration_t duration_ms);