I would like to know about interfacing an embedded system with QNX OS.
I have a Data acquisition card and a motion controller card. I would like to interface it with QNX 6 RTOS.
I understand that to access the resources I have to use the function
ThreadCtl(_NTO_TCTL_IO,NULL)
and map the I/O by using mmap_device_io(iobase,… )
How do you specify the address of the mmap_device_io for the two different cards in your PC?
Hi…
I have seen the documentation for pci_attach_device(). It will basically give me a structure that will give me the cpubaseaddress like you have mentioned before. But how could I know about which device is which… Because I have two devices attached at once…
run “pci” and see this addreses.
Or about pci_attach_device(), in struct “pci_dev_info” you must see DEV ID, VENDOR ID over this members you must know that is your device.
If these two devices are the same, there is no safe way to know. It’s trial and error. Sometime it the slots going left to right, right to left, or in groups ( if there are pci bridges ). The only think you are sure is that it will stay the same if you keep the same BIOS
Not the address, but rather the order of the devices. Each devices (with exactly the same give device id) are given an index number ( 0 for first device, 1 for second etc). What I’m saying is the index number will stay the same. If you add another type of device the address may or may not change, but as long as you don’t move these same devices around the index number is the same.