[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: /dev/gpiog ???? one bit??

I think you must make sure that the data_oe bit is correct as well.
It's on g5 (see chapter 20).
I think you should set it high, although I'm not sure.
You must also make sure that those pins are set as outputs,
use the new IO_GETSET_OUTPUT ioctl with &mask as argument
and check that the updated mask is what you expect.

Something like this:
unsigned long data, mask;
data = mask = 0xFF << 8;
if ((mask & data) != data)
  printf("Check your kernel config\n");


----- Original Message ----- 
From: "Antonio Redondo Mozos" <aredondomozos@xxxxxxx.com>
To: <dev-etrax@xxxxxxx.com>
Sent: den 21 november 2002 13:56
Subject: /dev/gpiog ???? one bit??

> Hi,
> I'm using /dev/gpiog, but I'm having problems.
> When i test:
> mask = 0xff << 8;
> ioctl(devfd, _IO(ETRAXGPIO_IOCTYPE, IO_CLRBITS),mask);
> sleep(1);
> ioctl(devfd, _IO(ETRAXGPIO_IOCTYPE, IO_SETBITS),mask);
> I don't see change in my lp0 ( i have connected led's).
> How can I change one bit of lp0?
> I'm using kernel 2.4.19.
> Thank.
> Antonio Redondo.