mirror of
https://github.com/opencardev/aasdk.git
synced 2024-07-01 16:21:57 +02:00
Fix compilation for GCC 7
This commit is contained in:
parent
257c63e06d
commit
59400c6a72
|
@ -50,7 +50,7 @@ void USBEndpoint::controlTransfer(common::DataBuffer buffer, uint32_t timeout, P
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
usbWrapper_.fillControlTransfer(transfer, handle_, buffer.data, &USBEndpoint::transferHandler, this, timeout);
|
usbWrapper_.fillControlTransfer(transfer, handle_, buffer.data, reinterpret_cast<libusb_transfer_cb_fn>(&USBEndpoint::transferHandler), this, timeout);
|
||||||
this->transfer(transfer, std::move(promise));
|
this->transfer(transfer, std::move(promise));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ void USBEndpoint::interruptTransfer(common::DataBuffer buffer, uint32_t timeout,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
usbWrapper_.fillInterruptTransfer(transfer, handle_, endpointAddress_, buffer.data, buffer.size, &USBEndpoint::transferHandler, this, timeout);
|
usbWrapper_.fillInterruptTransfer(transfer, handle_, endpointAddress_, buffer.data, buffer.size, reinterpret_cast<libusb_transfer_cb_fn>(&USBEndpoint::transferHandler), this, timeout);
|
||||||
this->transfer(transfer, std::move(promise));
|
this->transfer(transfer, std::move(promise));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ void USBEndpoint::bulkTransfer(common::DataBuffer buffer, uint32_t timeout, Prom
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
usbWrapper_.fillBulkTransfer(transfer, handle_, endpointAddress_, buffer.data, buffer.size, &USBEndpoint::transferHandler, this, timeout);
|
usbWrapper_.fillBulkTransfer(transfer, handle_, endpointAddress_, buffer.data, buffer.size, reinterpret_cast<libusb_transfer_cb_fn>(&USBEndpoint::transferHandler), this, timeout);
|
||||||
this->transfer(transfer, std::move(promise));
|
this->transfer(transfer, std::move(promise));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ void USBHub::start(Promise::Pointer promise)
|
||||||
{
|
{
|
||||||
self_ = this->shared_from_this();
|
self_ = this->shared_from_this();
|
||||||
hotplugHandle_ = usbWrapper_.hotplugRegisterCallback(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED, LIBUSB_HOTPLUG_NO_FLAGS, LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY,
|
hotplugHandle_ = usbWrapper_.hotplugRegisterCallback(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED, LIBUSB_HOTPLUG_NO_FLAGS, LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY,
|
||||||
LIBUSB_HOTPLUG_MATCH_ANY, &USBHub::hotplugEventsHandler, reinterpret_cast<void*>(this));
|
LIBUSB_HOTPLUG_MATCH_ANY, reinterpret_cast<libusb_hotplug_callback_fn>(&USBHub::hotplugEventsHandler), reinterpret_cast<void*>(this));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue