Lines Matching refs:state
115 is_lit(struct light_state_t const* state)
117 return state->color & 0x00ffffff;
121 rgb_to_brightness(struct light_state_t const* state)
123 int color = state->color & 0x00ffffff;
130 struct light_state_t const* state)
133 int brightness = rgb_to_brightness(state);
135 state->brightnessMode == BRIGHTNESS_MODE_LOW_PERSISTENCE;
141 // Toggle low persistence mode state
142 if ((g_last_backlight_mode != state->brightnessMode && lpEnabled) ||
154 g_last_backlight_mode = state->brightnessMode;
170 struct light_state_t const* state)
178 int brightness = state->color & 0x00ffffff;
192 struct light_state_t const* state)
203 switch (state->flashMode) {
205 onMS = state->flashOnMS;
206 offMS = state->flashOffMS;
215 colorRGB = state->color;
219 state->flashMode, colorRGB, onMS, offMS);
275 struct light_state_t const* state)
278 g_battery = *state;
286 struct light_state_t const* state)
289 g_notification = *state;
297 struct light_state_t const* state)
300 if (state->flashMode == LIGHT_FLASH_HARDWARE) {
301 g_attention = state->flashOnMS;
302 } else if (state->flashMode == LIGHT_FLASH_NONE) {
312 struct light_state_t const* state)
319 err = write_int(BUTTON_FILE, state->color & 0xFF);
346 struct light_state_t const* state);