[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

accessing device driver from user space



Hallo,

is there any simple way to access an RT device driver from user space?

My problem is that we have a C library that has to access a serial ports
/dev/ttyS0 through the "rt_com" driver.

I use rtlinux-2.2, kernel-2.2.14/i386 and the rt_com-0.4. The kernel,
modules and examples work fine, even the examples in rt_com do work
(open the port, send bytes etc.). The device driver uses char-major-60
and the serial driver of the linux kernel is removed. 
I did "rm /dev/ttyS0" and "mknod /dev/ttyS0 c 60 0".

The example modules are able to call open("/dev/ttyS0", O_RDWR), 
but if I copy this line to a sample program I always get -1 as return
value?

can anybody explain me why???

thanks,
   Thomas.
-- 
________________________________________________________________________
Thomas Eschenbacher                           Thomas.Eschenbacher@gmx.de