usb: make usb_disconnect() weak
usb_disconnect() is board/platform specific for chips that don't have built-in handling for this. Allow the application to provide its own version of usb_disconnect() to handle this. See https://github.com/libopencm3/libopencm3/pull/924
This commit is contained in:
committed by
Karl Palsson
parent
343cff4675
commit
ebcf197810
@@ -112,7 +112,8 @@ void usbd_poll(usbd_device *usbd_dev)
|
||||
usbd_dev->driver->poll(usbd_dev);
|
||||
}
|
||||
|
||||
void usbd_disconnect(usbd_device *usbd_dev, bool disconnected)
|
||||
__attribute__((weak)) void usbd_disconnect(usbd_device *usbd_dev,
|
||||
bool disconnected)
|
||||
{
|
||||
/* not all drivers support disconnection */
|
||||
if (usbd_dev->driver->disconnect) {
|
||||
|
||||
Reference in New Issue
Block a user