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

wrong read : readbits


after setting some bits with

    ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_CLRBITS ), 1 << bit);
    ioctl(fd, _IO(ETRAXGPIO_IOCTYPE, IO_SETBITS ), 1 << bit);

(where "bit" is 1,2,3,4 or 5) ,

the "readbits" command seems to be locked  : "0" bits can change to "1" 
but never return to "0" (i forced the pins to GND but no effects)

after reset , the command seems to rework  perfectly

I don't understand, because i have used only the IO_CLRBITS or IO_SETBITS
with 1 to 5 for writting

and i looked for bits 8-15  , i don't touch them

i've also tried to place :

data = mask = 0xFF << 8;

but nothing

thanks for help