Lines Matching refs:gUsbCmd
27 S_HSUSBD_CMD_T gUsbCmd; variable
118 gUsbCmd.bmRequestType = (uint8_t)(HSUSBD->SETUP1_0 & 0xfful); in HSUSBD_ProcessSetupPacket()
119 gUsbCmd.bRequest = (uint8_t)((HSUSBD->SETUP1_0 >> 8) & 0xfful); in HSUSBD_ProcessSetupPacket()
120 gUsbCmd.wValue = (uint16_t)HSUSBD->SETUP3_2; in HSUSBD_ProcessSetupPacket()
121 gUsbCmd.wIndex = (uint16_t)HSUSBD->SETUP5_4; in HSUSBD_ProcessSetupPacket()
122 gUsbCmd.wLength = (uint16_t)HSUSBD->SETUP7_6; in HSUSBD_ProcessSetupPacket()
125 switch (gUsbCmd.bmRequestType & 0x60ul) in HSUSBD_ProcessSetupPacket()
171 u32Len = gUsbCmd.wLength; in HSUSBD_GetDescriptor()
174 switch ((gUsbCmd.wValue & 0xff00ul) >> 8) in HSUSBD_GetDescriptor()
269 u32ConfigDescOffset = g_hsusbd_sInfo->gu32ConfigHidDescIdx[gUsbCmd.wIndex & 0xfful]; in HSUSBD_GetDescriptor()
276 if (u32Len > g_hsusbd_sInfo->gu32HidReportSize[gUsbCmd.wIndex & 0xfful]) in HSUSBD_GetDescriptor()
278 u32Len = g_hsusbd_sInfo->gu32HidReportSize[gUsbCmd.wIndex & 0xfful]; in HSUSBD_GetDescriptor()
284 …HSUSBD_PrepareCtrlIn((uint8_t *)g_hsusbd_sInfo->gu8HidReportDesc[gUsbCmd.wIndex & 0xfful], u32Len); in HSUSBD_GetDescriptor()
290 if((gUsbCmd.wValue & 0xfful) < 8ul) in HSUSBD_GetDescriptor()
292 if (u32Len > g_hsusbd_sInfo->gu8StringDesc[gUsbCmd.wValue & 0xfful][0]) in HSUSBD_GetDescriptor()
294 u32Len = g_hsusbd_sInfo->gu8StringDesc[gUsbCmd.wValue & 0xfful][0]; in HSUSBD_GetDescriptor()
300 … HSUSBD_PrepareCtrlIn((uint8_t *)g_hsusbd_sInfo->gu8StringDesc[gUsbCmd.wValue & 0xfful], u32Len); in HSUSBD_GetDescriptor()
334 if ((gUsbCmd.bmRequestType & 0x80ul) == 0x80ul) /* request data transfer direction */ in HSUSBD_StandardRequest()
337 switch (gUsbCmd.bRequest) in HSUSBD_StandardRequest()
369 if (gUsbCmd.bmRequestType == 0x80ul) in HSUSBD_StandardRequest()
381 else if (gUsbCmd.bmRequestType == 0x81ul) in HSUSBD_StandardRequest()
386 else if (gUsbCmd.bmRequestType == 0x82ul) in HSUSBD_StandardRequest()
388 uint8_t ep = (uint8_t)(gUsbCmd.wIndex & 0xFul); in HSUSBD_StandardRequest()
408 switch (gUsbCmd.bRequest) in HSUSBD_StandardRequest()
412 if((gUsbCmd.wValue & 0xfful) == FEATURE_ENDPOINT_HALT) in HSUSBD_StandardRequest()
419 epNum = (uint32_t)(gUsbCmd.wIndex & 0xFul); in HSUSBD_StandardRequest()
436 g_hsusbd_UsbAddr = (uint8_t)gUsbCmd.wValue; in HSUSBD_StandardRequest()
445 g_hsusbd_UsbConfig = (uint8_t)gUsbCmd.wValue; in HSUSBD_StandardRequest()
455 if ((gUsbCmd.wValue & 0x3ul) == 2ul) /* TEST_MODE */ in HSUSBD_StandardRequest()
458 g_hsusbd_TestSelector = (uint8_t)(gUsbCmd.wIndex >> 8); in HSUSBD_StandardRequest()
460 if ((gUsbCmd.wValue & 0x3ul) == 3ul) /* HNP ebable */ in HSUSBD_StandardRequest()
473 g_hsusbd_UsbAltInterface = (uint8_t)gUsbCmd.wValue; in HSUSBD_StandardRequest()
513 switch (gUsbCmd.bRequest) in HSUSBD_UpdateDeviceState()
538 if(gUsbCmd.wValue == FEATURE_ENDPOINT_HALT) in HSUSBD_UpdateDeviceState()
541 idx = (uint32_t)(gUsbCmd.wIndex & 0xFul); in HSUSBD_UpdateDeviceState()
572 if(gUsbCmd.wValue == FEATURE_ENDPOINT_HALT) in HSUSBD_UpdateDeviceState()
575 idx = (uint32_t)(gUsbCmd.wIndex & 0xFul); in HSUSBD_UpdateDeviceState()