Lines Matching refs:state

113 is_lit(struct light_state_t const* state)  in is_lit()  argument
115 return state->color & 0x00ffffff; in is_lit()
119 rgb_to_brightness(struct light_state_t const* state) in rgb_to_brightness() argument
121 int color = state->color & 0x00ffffff; in rgb_to_brightness()
128 struct light_state_t const* state) in set_light_backlight() argument
131 int brightness = rgb_to_brightness(state); in set_light_backlight()
133 state->brightnessMode == BRIGHTNESS_MODE_LOW_PERSISTENCE; in set_light_backlight()
140 if ((g_last_backlight_mode != state->brightnessMode && lpEnabled) || in set_light_backlight()
152 g_last_backlight_mode = state->brightnessMode; in set_light_backlight()
168 struct light_state_t const* state) in set_speaker_light_locked() argument
179 switch (state->flashMode) { in set_speaker_light_locked()
181 onMS = state->flashOnMS; in set_speaker_light_locked()
182 offMS = state->flashOffMS; in set_speaker_light_locked()
191 colorRGB = state->color; in set_speaker_light_locked()
195 state->flashMode, colorRGB, onMS, offMS); in set_speaker_light_locked()
251 struct light_state_t const* state) in set_light_battery() argument
254 g_battery = *state; in set_light_battery()
262 struct light_state_t const* state) in set_light_notifications() argument
265 g_notification = *state; in set_light_notifications()
273 struct light_state_t const* state) in set_light_attention() argument
276 if (state->flashMode == LIGHT_FLASH_HARDWARE) { in set_light_attention()
277 g_attention = state->flashOnMS; in set_light_attention()
278 } else if (state->flashMode == LIGHT_FLASH_NONE) { in set_light_attention()
288 struct light_state_t const* state) in set_light_buttons() argument
295 err = write_int(BUTTON_FILE, state->color & 0xFF); in set_light_buttons()
322 struct light_state_t const* state); in open_lights()