Using GPIO... and including kernel headers

May 07, 2008 0 Replies

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/

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required