Cosmetics, consistency fixes, fix compiler warnings.
This commit is contained in:
@@ -46,7 +46,7 @@ int usbd_init(const usbd_driver *driver,
|
||||
const struct usb_device_descriptor *dev,
|
||||
const struct usb_config_descriptor *conf, const char **strings)
|
||||
{
|
||||
_usbd_device.driver = driver;
|
||||
_usbd_device.driver = (usbd_driver *)driver;
|
||||
_usbd_device.desc = dev;
|
||||
_usbd_device.config = conf;
|
||||
_usbd_device.strings = strings;
|
||||
@@ -127,4 +127,3 @@ u8 usbd_ep_stall_get(u8 addr)
|
||||
{
|
||||
return _usbd_device.driver->ep_stall_get(addr);
|
||||
}
|
||||
|
||||
|
||||
@@ -137,6 +137,8 @@ static int usb_standard_set_address(struct usb_setup_data *req, u8 **buf,
|
||||
static int usb_standard_set_configuration(struct usb_setup_data *req,
|
||||
u8 **buf, u16 *len)
|
||||
{
|
||||
int i;
|
||||
|
||||
(void)req;
|
||||
(void)buf;
|
||||
(void)len;
|
||||
@@ -151,10 +153,11 @@ static int usb_standard_set_configuration(struct usb_setup_data *req,
|
||||
_usbd_hw_endpoints_reset();
|
||||
|
||||
if (_usbd_device.user_callback_set_config) {
|
||||
/* Flush control callbacks. These will be reregistered
|
||||
* by the user handler. */
|
||||
int i;
|
||||
for(i = 0; i < MAX_USER_CONTROL_CALLBACK; i++)
|
||||
/*
|
||||
* Flush control callbacks. These will be reregistered
|
||||
* by the user handler.
|
||||
*/
|
||||
for (i = 0; i < MAX_USER_CONTROL_CALLBACK; i++)
|
||||
_usbd_device.user_control_callback[i].cb = NULL;
|
||||
|
||||
_usbd_device.user_callback_set_config(req->wValue);
|
||||
|
||||
Reference in New Issue
Block a user