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?!
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.