判断程序在这边。
void mouse_usb_re_result_mouse_IC(void)
{
if(gMouse_otg_test_status.otg_standard_enum_status == HID_HOST_CTRL_XFER_ERROR)
{
printf("\r\n DP DM error\r\n");
gMouse_HOST_CTRL_XFER_error_count ++;
USB_OTG_DriveVbus_ResetTest(&USB_OTG_FS_dev, 0);
Systick_delay_ms(5);
USB_OTG_DriveVbus_ResetTest(&USB_OTG_FS_dev, 1);
if(gMouse_HOST_CTRL_XFER_error_count >= HOST_CTRL_XFER_ERROR_ALLOW_COUNT)
{
gMouse_HOST_CTRL_XFER_error_count = MOUSE_CLEAR;
g_mouse_test_recorder.hard = MOUSE_FALSE; //硬件错误
g_mouse_test_recorder.current_status = MOUSE_FALSE; //错误
gMouse_Test_Process.Mouse_test_process = MOUSE_RESULT_OUT;
}
else
{
gMouse_enum_time_count = MOUSE_CLEAR;
gMouse_Test_Process.Mouse_test_process = MOUSE_PROTOCOL_TEST;
}
}
}
|