Lines Matching refs:state
104 is_lit(struct light_state_t const* state)
106 return state->color & 0x00ffffff;
110 rgb_to_brightness(struct light_state_t const* state)
112 int color = state->color & 0x00ffffff;
119 struct light_state_t const* state)
122 int brightness = rgb_to_brightness(state);
134 struct light_state_t const* state)
145 switch (state->flashMode) {
147 onMS = state->flashOnMS;
148 offMS = state->flashOffMS;
157 colorRGB = state->color;
161 state->flashMode, colorRGB, onMS, offMS);
217 struct light_state_t const* state)
220 g_battery = *state;
228 struct light_state_t const* state)
231 g_notification = *state;
239 struct light_state_t const* state)
242 if (state->flashMode == LIGHT_FLASH_HARDWARE) {
243 g_attention = state->flashOnMS;
244 } else if (state->flashMode == LIGHT_FLASH_NONE) {
254 struct light_state_t const* state)
261 err = write_int(BUTTON_FILE, state->color & 0xFF);
268 struct light_state_t const* state)
275 err = write_int(BLUETOOTH_LED_FILE, state->color & 0xFF);
302 struct light_state_t const* state);