Home | History | Annotate | Download | only in liblights

Lines Matching refs:state

69 	enum LED_STATE state;
95 static int rgb_to_brightness(struct light_state_t const *state)
98 int color = state->color & 0x00ffffff;
113 struct light_state_t const *state)
116 int brightness = rgb_to_brightness(state);
232 switch(leds->state) {
265 static int set_light_leds(struct light_state_t const *state, int type)
274 switch (state->flashMode) {
276 leds.state = OFF;
280 if (state->flashOnMS < 0 || state->flashOffMS < 0)
283 leds.delay_off = state->flashOffMS;
284 leds.delay_on = state->flashOnMS;
290 if (!(state->color & ALPHA_MASK)) {
291 leds.state = OFF;
295 color = state->color & COLOR_MASK;
297 leds.state = OFF;
304 leds.state = OFF;
306 leds.state = BLINK;
308 leds.state = ON;
318 struct light_state_t const *state)
320 return set_light_leds(state, 0);
324 struct light_state_t const *state)
326 return set_light_leds(state, 1);
333 struct light_state_t const *state);