optional WINDOWS2000 Patch und comments
svn path=/trunk/externals/iem/comport/; revision=3767
This commit is contained in:
parent
e301bd9261
commit
f9ff2a75c2
1 changed files with 19 additions and 11 deletions
|
|
@ -325,7 +325,11 @@ static HANDLE open_serial(int com_nr, t_comport *x)
|
|||
0,
|
||||
0,
|
||||
OPEN_EXISTING,
|
||||
#ifdef WIN2000
|
||||
0,
|
||||
#elif
|
||||
FILE_FLAG_OVERLAPPED,
|
||||
#endif
|
||||
0);
|
||||
|
||||
if(fd == INVALID_HANDLE_VALUE)
|
||||
|
|
@ -682,11 +686,13 @@ static void comport_tick(t_comport *x)
|
|||
|
||||
err = 0;
|
||||
|
||||
// if (!SetCommMask(x->comhandle, EV_RXCHAR))
|
||||
// post(" Error setting communications event mask for serial device");
|
||||
/*
|
||||
if (!SetCommMask(x->comhandle, EV_RXCHAR))
|
||||
post(" Error setting communications event mask for serial device");
|
||||
|
||||
// for ( ; ; ) {
|
||||
// if (WaitCommEvent(x->comhandle, &dwCommEvent,NULL)) {
|
||||
for ( ; ; ) {
|
||||
if (WaitCommEvent(x->comhandle, &dwCommEvent,NULL)) {
|
||||
*/
|
||||
do {
|
||||
|
||||
if(ReadFile(x->comhandle, &chr, 1, &dwRead, NULL))
|
||||
|
|
@ -697,13 +703,15 @@ static void comport_tick(t_comport *x)
|
|||
break;
|
||||
}
|
||||
} while (dwRead);
|
||||
// }
|
||||
// else{
|
||||
// post("serial dev: Error in WaitCommEvent");
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
/*
|
||||
}
|
||||
else{
|
||||
post("serial dev: Error in WaitCommEvent");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
#else
|
||||
{
|
||||
fd_set com_rfds;
|
||||
|
|
|
|||
Loading…
Reference in a new issue