Holger Bruns wrote:
Under the bottom line, the result is just the same. You need to become a superuser on a linux system, if you want to compile source code for accessing ports directly, regardless of the compiler or any other tool.
All modern OS's have this restriction. Even on Windows, after ME (NT, XP and beyond) you cannot directly access ports anymore, like in the good old days with TP (and even those programs won't run on modern Windows machines). To do so under Linux, you need to write a device driver that then exposes an interface to the userland application. This is usually done in C. There are several books available about writing device drivers under Linux. If your device is simple, like a UART, you can probably easily adapt one of the examples to your use. However, it sounds like your device is already supported (as /dev/ttyS2), so you shouldn't need to do this, unless you are doing non-standard things with the UART (maybe using the control signals for I/O that needs more precise timing than you can get through the ioctl mechanism, or something similar). Yes, it is much harder than in the old days of DOS or Win98, but it is the proper way to do things.

Jeff.

--
I haven't smoked for 3 years, 2 months and 2 weeks, saving $5,284.87 and not smoking 35,232.49 cigarettes.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to