Re: pci memory access in user mode?
- From: Mike <michael.h.williamson@xxxxxxxxx>
- Date: Sat, 29 Mar 2008 07:23:11 -0700 (PDT)
On Mar 28, 10:04 am, mich1985 <florian.harm...@xxxxxxxxxxxxxx> wrote:
if (val[0x0C]!=0xa511)
printf("Bitte Version pruefen! (0x%x != 0xA511)\n",val[0x0C]);
/* gives me 0xc001 instead of 0x1 or 0xc004 instead of 0x4 */
printf("Read: 0x%x\n", val[0x0]);
/* set io enable bit */
*(val+0x18)= (unsigned int) 0x200;
/* turn on my led */
*val = (unsigned int) 0x1;
I would suggest perhaps
*val = 0xFFFF;
since the bytes might be reversed, judging from your "read" comment.
Also, you might try using a voltmeter instead of an LED.
What is this device name?
-Mike
.
- Follow-Ups:
- Re: pci memory access in user mode?
- From: mich1985
- Re: pci memory access in user mode?
- References:
- pci memory access in user mode?
- From: mich1985
- pci memory access in user mode?
- Prev by Date: Re: physical memory allocated to a program
- Next by Date: Re: pci memory access in user mode?
- Previous by thread: pci memory access in user mode?
- Next by thread: Re: pci memory access in user mode?
- Index(es):