display backlight and bluetooth reference counting (#639)

This commit is contained in:
Ken Van Hoeylandt
2026-08-29 23:37:31 +02:00
committed by GitHub
parent 19b11eb9a8
commit 64fb1a9f52
16 changed files with 80 additions and 33 deletions
@@ -38,7 +38,6 @@ static void setBacklightBrightness(uint8_t brightness) {
if (device_get_first_active_by_type(&DISPLAY_TYPE, &display) == ERROR_NONE) {
::Device* backlight;
if (display_get_backlight(display, &backlight) == ERROR_NONE) {
device_get(backlight);
backlight_set_brightness(backlight, brightness);
device_put(backlight);
}
@@ -53,6 +52,7 @@ static bool hasDisplayWithBacklight() {
::Device* backlight;
if (display_get_backlight(display, &backlight) == ERROR_NONE) {
result = true;
device_put(backlight);
}
device_put(display);
}