PebbleOS
Loading...
Searching...
No Matches
Functions
light.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <shell/prefs.h>

Functions

void light_init (void)
 Initialize the backlight service at startup.
 
void light_button_pressed (void)
 Handle a button press.
 
void light_button_released (void)
 Handle a button release.
 
void light_touch_down (void)
 Handle a touch finger-down.
 
void light_touch_up (void)
 Release the hold taken by light_touch_down().
 
void light_enable (bool enable)
 Turn the watch's backlight on or put it back into automatic control.
 
void light_enable_respect_settings (bool enable)
 light_enable() that respects the user's backlight settings.
 
void light_enable_interaction (void)
 Trigger the backlight and schedule a timer to automatically disable the backlight after a short delay.
 
void light_reset_user_controlled (void)
 Return to the normal state machine after an app forced the light with light_enable().
 
void light_set_color_rgb888 (uint32_t rgb)
 Tint the backlight LED to a packed 24-bit RGB value.
 
void light_set_system_color (void)
 Restore the backlight to the user's default color.
 
void light_system_color_request (void)
 Make the system color take precedence over any app color.
 
void light_system_color_release (void)
 Release a light_system_color_request().
 
void light_toggle_enabled (void)
 Toggle the user's backlight enabled setting.
 
void light_toggle_ambient_sensor_enabled (void)
 Toggle the user's ambient light sensor setting.
 
void light_set_dynamic_mode (BacklightDynamicMode mode)
 Set the dynamic backlight mode.
 
void light_allow (bool allowed)
 Allow or disallow the backlight, e.g.
 
uint8_t light_get_current_brightness_percent (void)
 Get the current backlight brightness.
 
bool light_is_on (void)
 Check whether the backlight is on.
 
bool light_is_lit_by_touch (void)
 Check whether the backlight was lit by touch alone.
 
uint32_t light_get_ambient_lux (void)
 Get the ambient light level.