On Wed, 12 May 2010, Mindaugas Kavaliauskas wrote: Hi,
> I has a code that seems does not fit under the new code. I have a > simple button (well, there is a RS-latch to avoid contact bouncing) > and I need to record time when the button is pressed. Button is > connected to DSR (or CTS), so I need some way to monitor this > register and obtain some kind of "interrupt" on delta DSR (or CTS). > I do this using SetCommMask() and WaitCommEvent() under Win32. Is it > possible to have some multiplatform way to get this functionality? I'm afraid it will be hard to implement it for all platforms. It needs direct hardware access to set interrupt on DSR (or CTS) line modification or at least method to access delta DSR (or CTS) bit from MSR. In the code I sent only in OS2 builds DELTA MSR bits are supported. In *nixes there is no portable way to access them. I haven't implemented ir for windows too because WaitCommEvent() is blocking function (at least in the documentation) for non overlapped handles and I do not know any other method to read all MSR bits. I can add some type of wrapper for WaitCommEvent() to new code but it will work only in MS-Windows, in DOS builds if we have it and maybe in OS2 ones but I had to read OS2 documentation to give precise answer. I do not see any way to make implement it for POSIX systems using termios. Such extension had to be implemented in non standard way sometimes even using root privileges. best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour