FIX: usbd_init compatibility fix

Updated compatibility with libopencm3 commit 113e5c22e6390ba072148315e83a5faa5ff7ce86
This commit is contained in:
BuFran 2013-07-29 20:48:17 +02:00 committed by Gareth McMullin
parent c857165c12
commit e67192348f
2 changed files with 7 additions and 4 deletions

View File

@ -536,8 +536,10 @@ void cdcacm_init(void)
get_dev_unique_id(serial_no); get_dev_unique_id(serial_no);
usbdev = usbd_init(&USB_DRIVER, &dev, &config, usb_strings, sizeof(usb_strings)/sizeof(char *)); usbdev = usbd_init(&USB_DRIVER, &dev, &config, usb_strings,
usbd_set_control_buffer_size(usbdev, sizeof(usbd_control_buffer)); sizeof(usb_strings)/sizeof(char *),
usbd_control_buffer, sizeof(usbd_control_buffer));
usbd_register_set_config_callback(usbdev, cdcacm_set_config); usbd_register_set_config_callback(usbdev, cdcacm_set_config);
nvic_set_priority(USB_IRQ, IRQ_PRI_USB); nvic_set_priority(USB_IRQ, IRQ_PRI_USB);

View File

@ -255,8 +255,9 @@ void dfu_init(const usbd_driver *driver)
{ {
get_dev_unique_id(serial_no); get_dev_unique_id(serial_no);
usbdev = usbd_init(driver, &dev, &config, usb_strings, 4); usbdev = usbd_init(driver, &dev, &config, usb_strings, 4,
usbd_set_control_buffer_size(usbdev, sizeof(usbd_control_buffer)); usbd_control_buffer, sizeof(usbd_control_buffer));
usbd_register_control_callback(usbdev, usbd_register_control_callback(usbdev,
USB_REQ_TYPE_CLASS | USB_REQ_TYPE_INTERFACE, USB_REQ_TYPE_CLASS | USB_REQ_TYPE_INTERFACE,
USB_REQ_TYPE_TYPE | USB_REQ_TYPE_RECIPIENT, USB_REQ_TYPE_TYPE | USB_REQ_TYPE_RECIPIENT,