Skip to content
Snippets Groups Projects
Commit 8f97d210 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files
parent 995c0cf8
No related branches found
No related tags found
No related merge requests found
......@@ -50,11 +50,20 @@ char* comVersion(char* str, size_t len)
COM_HANDLE comOpen(const char* device)
{
char *dp = device'
COM_HANDLE handle;
COMMTIMEOUTS timeouts;
DCB dcb;
if((handle=CreateFile(device
// https://support.microsoft.com/en-us/topic/howto-specify-serial-ports-larger-than-com9-db9078a5-b7b6-bf00-240f-f749ebfd913e
if (device[0] != '\\') {
dp = alloca(strlen(device) + 5);
if (dp == NULL)
return COM_HANDLE_INVALID;
sprintf(dp, "\\\\.\\%s", device);
}
if((handle=CreateFile(dp
,GENERIC_READ|GENERIC_WRITE /* Access */
,0 /* Share mode */
,NULL /* Security attributes */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment