MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / init_hid_manager

Function init_hid_manager

lib/hidapi/mac/hid.c:437–449  ·  view source on GitHub ↗

Initialize the IOHIDManager. Return 0 for success and -1 for failure. */

Source from the content-addressed store, hash-verified

435
436/* Initialize the IOHIDManager. Return 0 for success and -1 for failure. */
437static int init_hid_manager(void)
438{
439 /* Initialize all the HID Manager Objects */
440 hid_mgr = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone);
441 if (hid_mgr) {
442 IOHIDManagerSetDeviceMatching(hid_mgr, NULL);
443 IOHIDManagerScheduleWithRunLoop(hid_mgr, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
444 return 0;
445 }
446
447 register_global_error("Failed to create IOHIDManager");
448 return -1;
449}
450
451HID_API_EXPORT const struct hid_api_version* HID_API_CALL hid_version(void)
452{

Callers 1

hid.cFile · 0.85

Calls 1

register_global_errorFunction · 0.70

Tested by

no test coverage detected