Lines Matching refs:state
182 is_lit(struct light_state_t const* state) in is_lit() argument
184 return state->color & 0x00ffffff; in is_lit()
188 rgb_to_brightness(struct light_state_t const* state) in rgb_to_brightness() argument
190 int color = state->color & 0x00ffffff; in rgb_to_brightness()
197 struct light_state_t const* state) in set_light_backlight() argument
200 int brightness = rgb_to_brightness(state); in set_light_backlight()
202 state->brightnessMode == BRIGHTNESS_MODE_LOW_PERSISTENCE; in set_light_backlight()
215 bool persistence_mode = ((g_last_backlight_mode != state->brightnessMode && lpEnabled) || in set_light_backlight()
227 g_last_backlight_mode = state->brightnessMode; in set_light_backlight()
230 g_last_backlight_mode = state->brightnessMode; in set_light_backlight()
246 struct light_state_t const* state) in set_speaker_light_locked() argument
257 switch (state->flashMode) { in set_speaker_light_locked()
259 onMS = state->flashOnMS; in set_speaker_light_locked()
260 offMS = state->flashOffMS; in set_speaker_light_locked()
269 colorRGB = state->color; in set_speaker_light_locked()
273 state->flashMode, colorRGB, onMS, offMS); in set_speaker_light_locked()
307 struct light_state_t const* state) in set_light_battery() argument
310 g_battery = *state; in set_light_battery()
318 struct light_state_t const* state) in set_light_notifications() argument
321 g_notification = *state; in set_light_notifications()
329 struct light_state_t const* state) in set_light_attention() argument
332 if (state->flashMode == LIGHT_FLASH_HARDWARE) { in set_light_attention()
333 g_attention = state->flashOnMS; in set_light_attention()
334 } else if (state->flashMode == LIGHT_FLASH_NONE) { in set_light_attention()
344 struct light_state_t const* state) in set_light_buttons() argument
351 err = write_int(BUTTON_FILE, state->color & 0xFF); in set_light_buttons()
378 struct light_state_t const* state); in open_lights()