MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / device_find_by_name

Function device_find_by_name

TactilityKernel/source/device.cpp:364–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364Device* device_find_by_name(const char* name) {
365 Device* found = nullptr;
366 ledger_lock();
367 for (auto* device : ledger.devices) {
368 if (device->name != nullptr && std::strcmp(device->name, name) == 0) {
369 found = device;
370 break;
371 }
372 }
373 ledger_unlock();
374 return found;
375}
376
377Device* device_find_first_active_by_type(const DeviceType* type) {
378 Device* found = nullptr;

Callers 15

createTouchFunction · 0.85
unPhonePowerOnFunction · 0.85
initBootFunction · 0.85
setBacklightDutyFunction · 0.85
createTouchFunction · 0.85
createTouchFunction · 0.85
createAxp192Function · 0.85
createTouchFunction · 0.85
createTouchFunction · 0.85
createDevicesFunction · 0.85
createTouchFunction · 0.85
initBootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected