Lines Matching refs:req
63 static void usb_core_get_desc(struct usb_handle *pdev, struct usb_setup_req *req) in usb_core_get_desc() argument
67 uint8_t desc_type = HIBYTE(req->value); in usb_core_get_desc()
68 uint8_t desc_idx = LOBYTE(req->value); in usb_core_get_desc()
131 if ((len != 0U) && (req->length != 0U)) { in usb_core_get_desc()
132 len = MIN(len, req->length); in usb_core_get_desc()
145 static void usb_core_set_config(struct usb_handle *pdev, struct usb_setup_req *req) in usb_core_set_config() argument
149 cfgidx = LOBYTE(req->value); in usb_core_set_config()
211 struct usb_setup_req *req) in usb_core_get_status() argument
236 struct usb_setup_req *req) in usb_core_set_address() argument
240 if ((req->index != 0U) || (req->length != 0U)) { in usb_core_set_address()
245 dev_addr = req->value & ADDRESS_MASK; in usb_core_set_address()
272 struct usb_setup_req *req) in usb_core_dev_req() argument
274 VERBOSE("receive request %i\n", req->b_request); in usb_core_dev_req()
275 switch (req->b_request) { in usb_core_dev_req()
277 usb_core_get_desc(pdev, req); in usb_core_dev_req()
281 usb_core_set_config(pdev, req); in usb_core_dev_req()
285 usb_core_get_status(pdev, req); in usb_core_dev_req()
289 usb_core_set_address(pdev, req); in usb_core_dev_req()
296 ERROR("NOT SUPPORTED %i\n", req->b_request); in usb_core_dev_req()
312 struct usb_setup_req *req) in usb_core_itf_req() argument
319 if (LOBYTE(req->index) <= USBD_MAX_NUM_INTERFACES) { in usb_core_itf_req()
320 pdev->class->setup(pdev, req); in usb_core_itf_req()
322 if (req->length == 0U) { in usb_core_itf_req()
342 struct usb_setup_req *req = &pdev->request; in usb_core_setup_stage() local
345 req->bm_request = psetup[0]; in usb_core_setup_stage()
346 req->b_request = psetup[1]; in usb_core_setup_stage()
347 req->value = psetup[2] + (psetup[3] << 8); in usb_core_setup_stage()
348 req->index = psetup[4] + (psetup[5] << 8); in usb_core_setup_stage()
349 req->length = psetup[6] + (psetup[7] << 8); in usb_core_setup_stage()