Re: pci memory access in user mode?
- From: mich1985 <florian.harmuth@xxxxxxxxxxxxxx>
- Date: Sat, 29 Mar 2008 11:25:30 -0700 (PDT)
On 29 Mrz., 15:23, Mike <michael.h.william...@xxxxxxxxx> wrote:
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
Hello Mike,
thx for your answer. The device is an I/O panel. It's custom-made and
works under dos with simple memory access functions. I will try your
suggestion on monday.
Best regards,
flo
.
- References:
- pci memory access in user mode?
- From: mich1985
- Re: pci memory access in user mode?
- From: Mike
- pci memory access in user mode?
- Prev by Date: Re: pci memory access in user mode?
- Next by Date: [Commercial] Linux System and Kernel Programming: Hands-On Training from Experts
- Previous by thread: Re: pci memory access in user mode?
- Next by thread: determine cpu count from module.ko
- Index(es):
Relevant Pages
|