Thank you very much , It helped me :d maybe an option to put in on the website?
Ernst Mayerhofer schreef: > > you have to set the IOG24 as an output, because default it is set as > input. > search some examples / the foxgroup for SETGET. > greets,ernst > > 2007/2/12, Daniel Boone <[EMAIL PROTECTED] > <mailto:daniel.boone%40kahosl.be>>: > > > > Hi > > > > I am trying to set iog24 as an output line. > > I have also the sx18 expansionboard. > > A led call d2 is on input/output line iog24. > > I'm trying to make it work. > > I tried this source code > > > > #include "stdio.h" > > #include "stdlib.h" > > #include "unistd.h" > > #include "sys/ioctl.h" > > #include "fcntl.h" > > #include "asm/etraxgpio.h" > > > > int main(void){ > > int fd; > > int iomask; > > > > if ((fd = open("/dev/gpiog", O_RDWR))<0) { > > printf("Open error on /dev/gpiog\n"); > > exit(0); > > } > > else{ > > printf("open ok \n"); > > } > > > > iomask= 1<<24; > > > > printf("try to set iog24 as output \n"); > > ioctl(fd,_IO(ETRAXGPIO_IOCTYPE,IO_SETBITS),iomask); > > > > close(fd); > > } > > > > Did I do something wrong or have I forgotten something? > > > > thanks > > > > > > [Non-text portions of this message have been removed] > > > > __________ NOD32 2072 (20070220) Information __________ > > This message was checked by NOD32 antivirus system. > http://www.eset.com
