Lines Matching refs:event
353 static void CollectEventHandle(struct UsbFnEventAll *event, struct UsbFnDeviceMgr *devMgr) in CollectEventHandle() argument
359 event->ep0Num = 0; in CollectEventHandle()
360 event->epNum = 0; in CollectEventHandle()
365 event->ep0[event->ep0Num] = funcMgr->fd; in CollectEventHandle()
366 event->ep0Event[event->ep0Num].type = USB_EP0_INVALID; in CollectEventHandle()
367 event->ep0Num++; in CollectEventHandle()
380 event->epx[event->epNum] = handle->fds[j]; in CollectEventHandle()
381 event->reqEvent[event->epNum] = handle->reqEvent[j]; in CollectEventHandle()
382 event->numEvent[event->epNum] = 0; in CollectEventHandle()
383 event->epNum++; in CollectEventHandle()
487 static void HandleEp0Event(const struct UsbFnDeviceMgr *devMgr, struct UsbFnEventAll event) in HandleEp0Event() argument
491 for (i = 0; i < event.ep0Num; i++) { in HandleEp0Event()
492 funcMgr = GetFuncMgr(devMgr, event.ep0[i]); in HandleEp0Event()
497 if (event.ep0Event[i].type == USB_EP0_CTRL_EVENT) { in HandleEp0Event()
498 HandleEp0CtrlEvent(funcMgr, &event.ep0Event[i].ctrlEvent); in HandleEp0Event()
499 } else if (event.ep0Event[i].type == USB_EP0_IO_COMPLETED) { in HandleEp0Event()
500 HandleEp0IoEvent(funcMgr, &event.ep0Event[i].reqEvent); in HandleEp0Event()
509 struct UsbFnEventAll event; in UsbFnEventProcess() local
517 if (memset_s(&event, sizeof(event), 0, sizeof(event)) != EOK) { in UsbFnEventProcess()
522 CollectEventHandle(&event, devMgr); in UsbFnEventProcess()
523 if (event.ep0Num + event.epNum == 0) { in UsbFnEventProcess()
526 int32_t ret = fnOps->pollEvent(&event, timeout); in UsbFnEventProcess()
534 HandleEp0Event(devMgr, event); in UsbFnEventProcess()
535 for (uint8_t i = 0; i < event.epNum; i++) { in UsbFnEventProcess()
536 handle = GetHandleMgr(devMgr, event.epx[i]); in UsbFnEventProcess()
540 for (uint8_t j = 0; j < event.numEvent[i]; j++) { in UsbFnEventProcess()
541 HandleEpsIoEvent(&event.reqEvent[i][j], handle); in UsbFnEventProcess()