Home » Developing U++ » UppHub » Serial.h recommended nonblocking write
Serial.h recommended nonblocking write [message #49902] |
Sat, 02 June 2018 11:51 |
luoganda
Messages: 195 Registered: November 2016
|
Experienced Member |
|
|
on w7 Serial.Write timeout doesn't work! it blocks...
For Read it's not a problem, since there is Avail() func.
Using this does:
void SetWriteTimeout(dword ms){
COMMTIMEOUTS ct;memset(&ct,0,sizeof(ct));
ct.WriteTotalTimeoutConstant=ms;SetCommTimeouts(fd,&ct);
}
I don't know how about linux/mac,
but maybe that 'timeout' should be specified only by upper proposed func and thrown out from Write func for all platforms.
NOTE:
virtual com ports are being used from com0com, but i doubt that is an blocking issue...
[Updated on: Sat, 02 June 2018 11:56] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Apr 26 10:48:00 CEST 2024
Total time taken to generate the page: 3.04918 seconds
|