MCPcopy Create free account
hub / github.com/kiibohd/controller / detach_callback

Function detach_callback

LoadFile/teensy_loader_cli.c:390–410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390void detach_callback(void *context, IOReturn r, void *hid_mgr, IOHIDDeviceRef dev)
391{
392 struct usb_list_struct *p, *tmp, *prev=NULL;
393
394 p = usb_list;
395 while (p) {
396 if (p->ref == dev) {
397 if (prev) {
398 prev->next = p->next;
399 } else {
400 usb_list = p->next;
401 }
402 tmp = p;
403 p = p->next;
404 free(tmp);
405 } else {
406 prev = p;
407 p = p->next;
408 }
409 }
410}
411
412void init_hid_manager(void)
413{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…