写完UCLINUX的 驱动之后,用应用程序来测试。但write没输出(write函数中有printk输出函数),也 不报错。但open函数中的 printk能够输出,请高人指点一 下。谢谢了。 write函数: static ssize_t s3c44b0_DbLed_write(struct inode *inode, struct file *file, const char *buffer, size_t count,loff_t *ppos)
{
printk("the begin!
") ; copy_from_user(&ledstatus, buffer, count) ; printk("the first!
") ;
//Updateled() ; printk("the second!
") ; if(ledstatus) { printk(KERN_EMERG "the led is TRUE!
"); //ledstatus = 100 ; } else { printk(KERN_EMERG "the led is FALSE!
") ; ledstatus = 200 ; }
return count ;
}
|