打印

uclinux驱动的write

[复制链接]
1448|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
nsnwz|  楼主 | 2007-6-26 22:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
写完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 ;

}



相关帖子

沙发
high| | 2007-7-4 00:27 | 只看该作者

...

使用特权

评论回复
板凳
fly_172| | 2007-7-19 13:31 | 只看该作者

遇到同样的问题

我也遇到了这个问题,不知道怎么解决
你现在解决了吗?

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

11

主题

13

帖子

1

粉丝