I am trying to write to a dio port on a dio card on the pci bus. I am not
having any luck. Any input would be greatly appreciated.
I ran the show_pci utility I downloaded from quics. I can detect the
dio card. I get the correct card id and vendor id. The show_pci utility
tells me an address in memory that the card maps to(0xf4002000). Here is a
summary of the code I am using.
volatile unsigned char *addr, *portc;
fd = shm_open(“Physical”, O_RDWR, 0777);
PROT_WRITE, MAP_SHARED, fd,
/* the port I am trying to write to is at an offset of 0x02 from the
begining of of the memory mapped area */
My program does the appropriate error checking to make sure that shm_open()
and mmap are working(). I am checking the bits on the port to see if they
change. Is there something I can do to make sure that the value is written
to that memory location? Any comments would be greatly appreciated.