Resource manager for pci ADC card

I need to write a resource manager for a pci ADC card. Is this the right
way to go about it:

  1. Modify the /dev/null resource manager example and override io_read to
    receive data from the card

  2. Use pci_attach() and pci_attach_device() to connect the resource manager
    to the device (Does this go in the resource manager or the program that uses
    it?)

  3. Write a program that uses open() to connect to the card (via the resource
    manager) and read() to get data from the card.

Paul.

ddk.input is designed for comments re input devices for photon (like mice,
touch screens etc.)

if you are looking for details on writing a resmgr for neutrino (qnx rtp)
then the qdn.public.qnxrtp.os is probably a better group.

as a side note to your question… your approach is correct. if you look at
the resource manager section of the docs you will see how to override
io_read/io_write/… functions for your device driver.
and then in the startup of your driver you would peek in with the pci_
calls to find where your card is sitting.

Paul Jones <paul.jones@bnc.ox.ac.uk> wrote:

I need to write a resource manager for a pci ADC card. Is this the right
way to go about it:

  1. Modify the /dev/null resource manager example and override io_read to
    receive data from the card

  2. Use pci_attach() and pci_attach_device() to connect the resource manager
    to the device (Does this go in the resource manager or the program that uses
    it?)

  3. Write a program that uses open() to connect to the card (via the resource
    manager) and read() to get data from the card.

Paul.


Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579