If there is any working example on how to setup control request using USB Host provided with ASF4?
I know how to do that in ASF3 framework, but i'm tempted to go with ASF4 due to compactness of code produced
anyways, what would be equivalent code to this:
</p> <p> req.bmRequestType = USB_REQ_DIR_IN | USB_REQ_TYPE_STANDARD | USB_REQ_RECIP_INTERFACE;<br /> req.bRequest = USB_REQ_GET_DESCRIPTOR;<br /> req.wValue = USB_DT_HID_REPORT <<8;<br /> req.wIndex = (uint16_t)uhi_hid_generic_dev.iface_no;<br /> req.wLength = sizeof(hid_dsc);<br /> <br /> uhd_setup_request(dev->address, &req, hid_dsc, sizeof(hid_dsc), NULL, uhi_hid_generic_get_descriptor_complete_cb);<br /> </p> <p>
so far i've tried what i've found in msc examples - and it didn't work, and in driver_example.c provided within framework generated code (using host hid mouse as an example):
</p> <p> usb_fill_GetReport_req(req,USB_DT_HID_REPORT,0,(uint8_t)HID_MOUSE_inst.iface,USB_HOST_CORE_0_inst.ctrl_buf_size-USBHC_CTRL_DATA_OFFSET);<br /> usbhc_request(&USB_HOST_CORE_0_inst,(uint8_t *) req,data);<br />
i'm either getting error ERR_DENIED or ERR_NONE, but nothing gets transferred
i wish documentation was existing...