Lines Matching defs:brightness
71 static int write_brightness(struct dragon_lights *lights, int brightness)
76 bytes = snprintf(path, sizeof(path), "%s/brightness",
80 "failed to create brightness path %d\n", bytes);
91 bytes = snprintf(buffer, sizeof(buffer), "%d\n", brightness);
94 "failed to create brightness value %d/%d\n",
95 brightness, bytes);
102 "failed to write brightness value %d/%d\n", amt,
161 int brightness = rgb_to_brightness(state);
163 if (brightness > 0) {
164 // Get the bin number for brightness (0 to kNumBrightnessLevels - 1)
165 brightness_idx = (brightness - 1) * kNumBrightnessLevels / 0xff;
167 // Get brightness level
168 brightness = kBrightnessLevels[brightness_idx];
172 err = write_brightness(lights, brightness);