How to talk to device drivers?

Hey guys. I have a PCI-X card and I have drivers for it however I am wondering how I would communicate with these drivers from within a c++ program for example in order to perform actions with the device.

I have done a lot of poking around on google but its a mess.

I read that device drivers provide a way for applications to access a device but hoooooooow?!

Thanks in advance :)
What API does the device driver expose to the user? What kind of device are we talking about?
Applications can talk with device drivers using IO Control. You must open file descriptor for a device which you want to access. use one of file open functions. You need to find device name to pass to the function.

After creating file descriptor, use ioctl() available in ioctl.h. pass file descriptor and IOCTL code. Each device have its own IOCTLs, some may be common. You must know each IOCTL code of the device and its usage.

I hope this helps you.


thanks richardforc thats helped me a lot :)

FYI PanGalactic it is a sata raid card :)
Topic archived. No new replies allowed.