AnsweredAssumed Answered

A GPIO Programming problem

Question asked by on May 9, 2013
Latest reply on Jul 3, 2013 by

Hi, all

     I've got a bf518f-ezbrd.Now I write a simple prog to test GPIO, the source code is shown below.



#include <asm/gpio.h>
static __init int sample_module_init(void)
    int ret;

    ret = gpio_request(GPIO_PH7, "Sample Driver");
    if (ret) {
        printk(KERN_WARNING "sample_driver: unable to request GPIO_PH7\n");
        return ret;

    return 0;
static __exit void sample_module_exit(void)
void main(bool inp)
    gpio_direction_output(GPIO_PH7, 1);
    gpio_set_value(GPIO_PH7, inp);



but when i want to compile the prog the error is occuer.


root@debian:/adf518/systools# bfin-uclinux-gcc gpio.c -o gpio

gpio.c:1:22: error:asm/gpio.h:no such file or directory


what should  i do to test my gpio?