用混杂设备变的驱动,设备结构体的赋值为:
#define LED_MINOR 256
#define DeviceName "myleds"
static struct miscdevice misc={
.minor = LED_MINOR,
.name = DeviceName,
.fops = dev_fops
};
把驱动程序编译成内核模块,加载到开发板上,便手动的创建了设备文件
crw-rw---- 1 root root 10, 256 Jul 7 16:36 /dev/myleds
为什么应用程序打开该设备文件的时候,打不开啊。用cat指令也打不开
cat: can't open '/dev/myleds': No such device or address
新手,遇到这些问题一点办法都没,希望各位高手解答!!!
[ 此帖被0o龙i魂o0在2010-08-12 19:46重新编辑 ]