Author |
Topic |
|
3935
16 Posts |
Posted - 14 Mar 2002 : 04:27:07
|
Hi, thanks for the reply on the previous post. I got the serial communications working on Bitsy's com1 & com3 now.
One strange thing is happening though: as soon as any com port is opened, the api function WaitCommEvent() (in the applications read thread) returns every 2000 millisec with the following events: EV_CTS, EV_DSR, EV_RLSD, EV_RING, regardless of whether something happened on the port or not.
On other platforms (using the same code), this function blocks until something really happens.
Note, I have the comm mask set to "everything":
SetCommMask(port,EV_RXCHAR|EV_CTS|EV_DSR|EV_RLSD|EV_RING|EV_BREAK|EV_ERR);
I could of course change my comm mask, but I'm just curious to know what causes this repetitive behaviour.
|
|
jbaik
22 Posts |
Posted - 14 Mar 2002 : 09:49:28
|
Bitsy, GCplus and Gmaster (Internal Serial Ports) does not have DSR, RING and RLSD signals on the ports. But Serial Driver will gerates Events (EV_DSR|EV_RING|EV_RLSD) by every 2 seconds (default), which you can change that time on registry key, "SerialEventGenerationPeriod"=dword:7D0 ; 2secs
So on ADS Platform, you can use SetCommMask as SetCommMask (port,EV_RXCHAR|EV_CTS|EV_BREAK|EV_ERR); Thanks
|
|
|
|
Topic |
|
|
|