remove intf malloc
This commit is contained in:
@@ -477,14 +477,8 @@ static void dfu_notify_handler(uint8_t event, void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
struct usbd_interface *usbd_dfu_alloc_intf(void)
|
||||
struct usbd_interface *usbd_dfu_init_intf(struct usbd_interface *intf)
|
||||
{
|
||||
struct usbd_interface *intf = usb_malloc(sizeof(struct usbd_interface));
|
||||
if (intf == NULL) {
|
||||
USB_LOG_ERR("no mem to alloc intf\r\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
intf->class_interface_handler = dfu_class_interface_request_handler;
|
||||
intf->class_endpoint_handler = NULL;
|
||||
intf->vendor_handler = NULL;
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Alloc dfu interface driver */
|
||||
struct usbd_interface *usbd_dfu_alloc_intf(void);
|
||||
/* Init dfu interface driver */
|
||||
struct usbd_interface *usbd_dfu_init_intf(struct usbd_interface *intf);
|
||||
|
||||
/* Interface functions that need to be implemented by the user */
|
||||
uint8_t *dfu_read_flash(uint8_t *src, uint8_t *dest, uint32_t len);
|
||||
|
||||
Reference in New Issue
Block a user