Skip to content

Commit

Permalink
usbdriver.c
Browse files Browse the repository at this point in the history
  • Loading branch information
DediprogEvy committed Jul 14, 2023
1 parent 1f0f32c commit e5cab4c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dpcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ int main(int argc, char* argv[])
unsigned long r;
char* env;

printf("\nDpCmd Linux 1.14.11.%02d Engine Version:\nLast Built on %s\n\n", GetConfigVer(), __DATE__); // 1. new feature.bug.configS
printf("\nDpCmd Linux 1.14.12.%02d Engine Version:\nLast Built on %s\n\n", GetConfigVer(), __DATE__); // 1. new feature.bug.configS

g_ucOperation = 0;
GetLogPath(g_LogPath);
Expand Down
13 changes: 8 additions & 5 deletions usbdriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,11 @@ int InCtrlRequest(CNTRPIPE_RQ* rq, unsigned char* buf, unsigned long buf_size, i
unsigned int requesttype;
unsigned int ret = 0;


if ((rq->Function != URB_FUNCTION_VENDOR_ENDPOINT) && ((g_bIsSF600[Index] == true) || is_SF700_Or_SF600PG2(Index) == true))
return true;


if (Index == -1)
Index = DevIndex;

Expand All @@ -216,10 +218,11 @@ int InCtrlRequest(CNTRPIPE_RQ* rq, unsigned char* buf, unsigned long buf_size, i
}

if (ret != 0 /*!= buf_size*/)
{
return ret;
else
{

}
else
{
#if 0

printf("InCtrlRequest ---ret=%X\n",ret);
Expand Down Expand Up @@ -506,8 +509,8 @@ int usb_driver_init(void)
return 0;
}

AssignSF600orSF700var(i);
dediprog_start_appli(i);
AssignSF600orSF700var(i);
result = (dediprog_handle[i] != NULL);
}
} else {
Expand All @@ -534,9 +537,9 @@ int usb_driver_init(void)
return 0;
}

dediprog_start_appli(g_uiDevNum - 1);

AssignSF600orSF700var(g_uiDevNum - 1);
dediprog_start_appli(g_uiDevNum - 1);

result = (dediprog_handle[g_uiDevNum - 1] != NULL);
}
Expand Down

0 comments on commit e5cab4c

Please sign in to comment.