[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PCI mmap - How do I access a PCI board address space?
- Date: 25 Sep 2003 12:58:20 +0100
- From: hv at uninova.pt (Hugo)
- Subject: PCI mmap - How do I access a PCI board address space?
Hi!
I am using RTEMS for an i386 target architecture.
I am trying to communicate with a PCI board.
I have tryed the board outside RTEMS and it works fine.
I was able to read the base address where the board should be mapped
into memory.
The Board should be mapped into memory at address 0x1400, unfortunately
I am unable to operate the board properly.
I am guessing that I have been unable to access the board space
properly.
Since there is no mmap function in RTEMS could anyone please tell me how
do I access the board address space?
If I could use the memcpy function I would want to do something like:
/* This is very simplified */
unsigned short data[4];
unsigned short status;
...
for( index=0; index<4; index++ ) {
memcpy( 0x1400 + index*2, &(data[index]), 2 );
do {
/* I should sleep a bit here */
memcpy( &status, 0x1400, 2 );
} while ( status & 0x0001 );
}