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:
Ken Van Hoeylandt
2026-07-27 17:29:12 +02:00
committed by GitHub
parent 3354924359
commit d1f06cb774
20 changed files with 328 additions and 204 deletions
@@ -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);
}
}