I am working with into the 'device manager' and I have defined the basic functions:
dev_open()
dev_read()
dev_write()
dev_close()
But I have read that exist another function named IOCTL().
What this function do?
Is important?
Thank you,
pepito
IOCTL function
RE:IOCTL function
IOCTL=input output contorl
This function is used for streams(sockets). For instance, if you need to write to a com port, you would open it as a stream and write to it as if it is a file.
Anton.
This function is used for streams(sockets). For instance, if you need to write to a com port, you would open it as a stream and write to it as if it is a file.
Anton.
RE:IOCTL function
Yes, but I do it using the 'dev_open()' and 'dev_write()' functions.
Do the IOCTL() the same?
pepito
Do the IOCTL() the same?
pepito
RE:IOCTL function
Check out:
http://www.die.net/doc/linux/man/man2/ioctl.2.html
Essentially IOCTL is used on open files (which, of course, can be devices in Unix) to further control their attributes -- in a device dependant way.
they can be used to set the baud rate of a modem attach to com2, for example.
Jeff
http://www.die.net/doc/linux/man/man2/ioctl.2.html
Essentially IOCTL is used on open files (which, of course, can be devices in Unix) to further control their attributes -- in a device dependant way.
they can be used to set the baud rate of a modem attach to com2, for example.
Jeff
RE:IOCTL function
Works for me!
Just try a google search on 'ioctl man page' that's what I searched for.
Jeff
Just try a google search on 'ioctl man page' that's what I searched for.
Jeff