Add an interface for soft disconnection, and hook it up in the F107 driver.

This commit is contained in:
Mike Smith
2012-01-02 21:06:48 -08:00
committed by Piotr Esden-Tempski
parent 5310cd1b57
commit 7da1967056
4 changed files with 20 additions and 0 deletions

View File

@@ -108,6 +108,13 @@ void usbd_poll(void)
_usbd_device.driver->poll();
}
void usbd_disconnect(bool disconnected)
{
/* not all drivers support disconnection */
if (_usbd_device.driver->disconnect)
_usbd_device.driver->disconnect(disconnected);
}
void usbd_ep_setup(u8 addr, u8 type, u16 max_size, void (*callback)(u8 ep))
{
_usbd_device.driver->ep_setup(addr, type, max_size, callback);