Using GPIO... and including kernel headers

Hello all, this is a question about GPIO, but I believe it is also more general.

I'm using an embedded Xilinx card (PPC processor), which I cross compile for from a Linux PC.

I would like to make use of the GPIO lines in a usermode program (or is that wrong and I need to use a kernel module ?!?)

$ grep GPIO .config CONFIG_XILINX_GPIO=y

$ cat include/linux/gpio.h #ifdef CONFIG_GENERIC_GPIO #include #else ... empty statements ... #endif

So I guess it means I must use what's in: $ ls drivers/char/xilinx_gpio/ adapter.c adapter.o built-in.o Makefile modules.order xgpio.c xgpio.h xgpio_ioctl.h xgpio_l.h xgpio.o xilinx_gpio.o

Now I'm no kernel expert and I'm not sure what's the correct way to include and link against this xgpio.h/o ? Do I need to explicitely give gcc the -Ifullpath or is there some compilation trick I don't know about ?

--
Guillaume Dargaud
http://www.gdargaud.net/
Reply to
Guillaume Dargaud
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.