Lines Matching refs:state

115 is_lit(struct light_state_t const* state)  in is_lit()  argument
117 return state->color & 0x00ffffff; in is_lit()
121 rgb_to_brightness(struct light_state_t const* state) in rgb_to_brightness() argument
123 int color = state->color & 0x00ffffff; in rgb_to_brightness()
130 struct light_state_t const* state) in set_light_backlight() argument
133 int brightness = rgb_to_brightness(state); in set_light_backlight()
135 state->brightnessMode == BRIGHTNESS_MODE_LOW_PERSISTENCE; in set_light_backlight()
142 if ((g_last_backlight_mode != state->brightnessMode && lpEnabled) || in set_light_backlight()
154 g_last_backlight_mode = state->brightnessMode; in set_light_backlight()
170 struct light_state_t const* state) in set_light_backlight_ext() argument
178 int brightness = state->color & 0x00ffffff; in set_light_backlight_ext()
192 struct light_state_t const* state) in set_speaker_light_locked() argument
203 switch (state->flashMode) { in set_speaker_light_locked()
205 onMS = state->flashOnMS; in set_speaker_light_locked()
206 offMS = state->flashOffMS; in set_speaker_light_locked()
215 colorRGB = state->color; in set_speaker_light_locked()
219 state->flashMode, colorRGB, onMS, offMS); in set_speaker_light_locked()
275 struct light_state_t const* state) in set_light_battery() argument
278 g_battery = *state; in set_light_battery()
286 struct light_state_t const* state) in set_light_notifications() argument
289 g_notification = *state; in set_light_notifications()
297 struct light_state_t const* state) in set_light_attention() argument
300 if (state->flashMode == LIGHT_FLASH_HARDWARE) { in set_light_attention()
301 g_attention = state->flashOnMS; in set_light_attention()
302 } else if (state->flashMode == LIGHT_FLASH_NONE) { in set_light_attention()
312 struct light_state_t const* state) in set_light_buttons() argument
319 err = write_int(BUTTON_FILE, state->color & 0xFF); in set_light_buttons()
346 struct light_state_t const* state); in open_lights()