Subject: Re: Outb() call
To: Sami Kantoluoto <sami.kantoluoto@embedtronics.fi>
From: Jean-Edouard BABIN <listes@jeb.com.fr>
List: port-i386
Date: 03/06/2004 23:31:58
on 6/03/04 23:19, =AB=A0Sami Kantoluoto=A0=BB <sami.kantoluoto@embedtronics.fi>
wrote:
> Hi,
>=20
> On Sat, Mar 06, 2004 at 11:11:44PM +0100, Jean-Edouard BABIN wrote:
>=20
>> I am trying to access // port using outb()
>> Using this simple code:
>>=20
>> #include <sys/types.h>
>> #include <fcntl.h>
>> #include "/usr/include/x86/pio.h"
>>=20
>> int main() {
>> int fHndl;
>> fHndl =3D open("/dev/io", O_RDONLY);
>> outb(0x378,255);
>> close(fHndl);
>> }
>=20
> Are you sure you have the permiossion to open the device? Check the retur=
n
> value (of open()) before doing anything else ;-).
Yes open() return 3, so i guess it's ok
--=20
Jean-Edouard BABIN
Mail: Jeb@jeb.com.fr
Web : www.Jeb.com.fr
IRC : Jeb @ Undernet