FIX: usbd_init compatibility fix
Updated compatibility with libopencm3 commit 113e5c22e6390ba072148315e83a5faa5ff7ce86
This commit is contained in:
parent
c857165c12
commit
e67192348f
|
@ -536,8 +536,10 @@ void cdcacm_init(void)
|
|||
|
||||
get_dev_unique_id(serial_no);
|
||||
|
||||
usbdev = usbd_init(&USB_DRIVER, &dev, &config, usb_strings, sizeof(usb_strings)/sizeof(char *));
|
||||
usbd_set_control_buffer_size(usbdev, sizeof(usbd_control_buffer));
|
||||
usbdev = usbd_init(&USB_DRIVER, &dev, &config, usb_strings,
|
||||
sizeof(usb_strings)/sizeof(char *),
|
||||
usbd_control_buffer, sizeof(usbd_control_buffer));
|
||||
|
||||
usbd_register_set_config_callback(usbdev, cdcacm_set_config);
|
||||
|
||||
nvic_set_priority(USB_IRQ, IRQ_PRI_USB);
|
||||
|
|
|
@ -255,8 +255,9 @@ void dfu_init(const usbd_driver *driver)
|
|||
{
|
||||
get_dev_unique_id(serial_no);
|
||||
|
||||
usbdev = usbd_init(driver, &dev, &config, usb_strings, 4);
|
||||
usbd_set_control_buffer_size(usbdev, sizeof(usbd_control_buffer));
|
||||
usbdev = usbd_init(driver, &dev, &config, usb_strings, 4,
|
||||
usbd_control_buffer, sizeof(usbd_control_buffer));
|
||||
|
||||
usbd_register_control_callback(usbdev,
|
||||
USB_REQ_TYPE_CLASS | USB_REQ_TYPE_INTERFACE,
|
||||
USB_REQ_TYPE_TYPE | USB_REQ_TYPE_RECIPIENT,
|
||||
|
|
Loading…
Reference in New Issue