This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: questions about port and timer functions


Hi Armin,


herzer@rz-nov5.rz.fh-weingarten.de wrote:
> I have written a data acquisation program with DJGPP. Now I want to
> port it to Windows NT and give him a fancy outfit (with Tcl/TK). But
> yesterday in the evening these questions appeared:
> 
> 1. How can I do port I/O with gnu-win32 (like in-, outportb in
>    DJGPP).

You can not use the hardware ports in a WinNT 32 bit program. You can do
it in Win95, but there are no guarantees that this will work in future
versions. You're supposed to write device drivers for this, or use
existing facilities like the serial ports.

>    I didn't find any include file which contains a definition
>    for these functions. What libraries do I need?

You would probably have to write them yourself in inline assembly.

> 2. Is there a function which returns a time signal with precision of
>    0.001 s or better?

Look at the Win32 multimedia timers. They are the only thing that
actually comes near that precision. The standard Win32 functions like
GetSystemTime() have the resolution but not the actual granularity.


so long, benny
======================================
Benjamin Riefenstahl (benny@crocodial.de)
Crocodial Communications EntwicklungsGmbH
Ophagen 16a, D-20257 Hamburg, Germany
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]