Skip to content
Snippets Groups Projects
Commit 027184cd authored by Micah Elizabeth Scott's avatar Micah Elizabeth Scott
Browse files

Device arrival/departure stubs

parent 4873e46a
No related branches found
No related tags found
No related merge requests found
......@@ -117,9 +117,22 @@ int FCServer::cbHotplug(libusb_context *ctx, libusb_device *device, libusb_hotpl
{
FCServer *self = static_cast<FCServer*>(user_data);
printf("Hotplug %d\n", event);
if (event & LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED) {
self->usbDeviceArrived(device);
}
if (event & LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT) {
self->usbDeviceLeft(device);
}
return false;
}
void FCServer::usbDeviceArrived(libusb_device *device)
{
// New USB device. Is this a device we recognize?
}
void FCServer::usbDeviceLeft(libusb_device *device)
{
}
......@@ -62,4 +62,6 @@ private:
static int cbHotplug(libusb_context *ctx, libusb_device *device, libusb_hotplug_event event, void *user_data);
void startUSB(struct ev_loop *loop);
void usbDeviceArrived(libusb_device *device);
void usbDeviceLeft(libusb_device *device);
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment