Device cleanup (#592)
- Replaced device_find_\* usage by device_get_\* variants. - Removed deprecated device_find_\* functions. - Improved reliability of Bluetooth scanning, pairing, connection, and HID host lifecycle behavior, including peer auto-connect handling. - Improved Bluetooth/USB status indicators and clarified “Eject failed” alerts with the affected mount path.
This commit is contained in:
committed by
GitHub
parent
3354924359
commit
d1f06cb774
@@ -28,9 +28,10 @@ static uint32_t timeoutMsToIndex(uint32_t ms) {
|
||||
|
||||
static void applyKeyboardBacklight(bool enabled, uint8_t brightness) {
|
||||
// TODO: Get keyboard backlight from (optional) keyboard child device
|
||||
Device* backlight = device_find_by_name("keyboard_backlight");
|
||||
if (backlight != nullptr) {
|
||||
Device* backlight;
|
||||
if (device_get_by_name("keyboard_backlight", &backlight) == ERROR_NONE) {
|
||||
backlight_set_brightness(backlight, enabled ? brightness : 0);
|
||||
device_put(backlight);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user