Skip to content
Permalink
Browse files

usb: webusb: Fix payload for vendor requests

Fixes payload and simplifies code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
  • Loading branch information...
finikorg authored and carlescufi committed Mar 28, 2019
1 parent 87b3c63 commit b0373fbd07b04f24705686700ca9b0f5dc5d15b9
Showing with 2 additions and 3 deletions.
  1. +2 −3 samples/subsys/usb/webusb/src/webusb.c
@@ -312,7 +312,8 @@ static struct usb_cfg_data webusb_config = {
.class_handler = NULL,
.custom_handler = webusb_custom_handle_req,
.vendor_handler = webusb_vendor_handle_req,
.payload_data = NULL,
.vendor_data = interface_data,
.payload_data = interface_data,
},
.num_endpoints = ARRAY_SIZE(webusb_ep_data),
.endpoint = webusb_ep_data
@@ -324,8 +325,6 @@ int webusb_init(void)

LOG_DBG("");

webusb_config.interface.payload_data = interface_data;

/* Initialize the WebUSB driver with the right configuration */
ret = usb_set_config(&webusb_config);
if (ret < 0) {

0 comments on commit b0373fb

Please sign in to comment.
You can’t perform that action at this time.