|
本帖最后由 yanghong21240 于 2009-12-23 00:23 编辑
本人需要利用GPIO接口来控制步进电机,gpio的驱动代码根据内核代码liux2.6.30.4 的源代码下的\drivers\char\EmbedSky_gpio.c的代码添加了我需要的管脚的控制。修改的地方如下。
static unsigned long gpio_table [] =
{
S3C2410_GPB5,
S3C2410_GPB6,
S3C2410_GPB7,
S3C2410_GPB8,
S3C2410_GPF3,
S3C2410_GPG5,
S3C2410_GPG7,
};
static unsigned int gpio_cfg_table [] =
{
S3C2410_GPB5_OUTP,
S3C2410_GPB6_OUTP,
S3C2410_GPB7_OUTP,
S3C2410_GPB8_OUTP,
S3C2410_GPF3_OUTP,
S3C2410_GPG5_OUTP,
S3C2410_GPG7_OUTP,
};
但在makefile 的编译时 出错:makfe 的内容是:
ifneq ($(KERNELRELEASE),)
obj-m :=gpio.o
else
KERNELDIR ?= /kernel/opt/EmbedSky/linux-2.6.30.4 (/*pc中内核的路径*/)
PWD := $(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c
endif
编译时出错:
no rule to make target '/home/mmx/gpio.c' ,needed by /home/mmx/gpio.o/ .stop |
|