USB host support (#527)

This commit is contained in:
Shadowtrance
2026-06-04 07:10:37 +10:00
committed by GitHub
parent a59fbf4ed5
commit 3dcc95f6f3
46 changed files with 2409 additions and 121 deletions
+12
View File
@@ -370,4 +370,16 @@ Device* device_find_by_name(const char* name) {
return found;
}
Device* device_find_first_active_by_type(const DeviceType* type) {
Device* found = nullptr;
device_for_each_of_type(type, &found, [](Device* dev, void* ctx) -> bool {
if (device_is_ready(dev)) {
*static_cast<Device**>(ctx) = dev;
return false;
}
return true;
});
return found;
}
} // extern "C"