Chinaunix首页 | 论坛 | 博客
  • 博客访问: 117586
  • 博文数量: 19
  • 博客积分: 50
  • 博客等级: 民兵
  • 技术积分: 140
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-08 23:04
文章分类

全部博文(19)

文章存档

2016年(1)

2015年(1)

2014年(4)

2013年(10)

2012年(3)

我的朋友

发布时间:2013-11-23 09:51:22

......【阅读全文】

阅读(1473) | 评论(0) | 转发(0)

发布时间:2013-11-18 21:12:32

sem......【阅读全文】

阅读(1828) | 评论(0) | 转发(0)

发布时间:2013-11-04 22:26:00

拿到一个设备驱动,首先要看的是设备初始化函数。static int __init mcp251x_init(void)   {       int ret;       can_class = class_create(THIS_MODULE, "can");       if (IS_ERR(can_class))    &nb.........【阅读全文】

阅读(3096) | 评论(0) | 转发(0)

发布时间:2013-11-04 22:10:00

    2.4内核注册驱动要用:int register_chrdev (unsigned int major, const char *name, struct file_operations *fops);2.4内核注销驱动要用:int unregister_chrdev( unsigned int major, const char *name );2.4内核驱动注册完后,要.........【阅读全文】

阅读(1583) | 评论(0) | 转发(0)

发布时间:2013-11-04 22:02:00

linux内核中已经有gpio驱动函数,我们只需调用这些函数就可以。头文件:#include <mach/gpio.h>函数实现文件: arch/arm/mach-at91/gpio.c管脚命名规则:如果是PB20 为AT91_PIN_PB20,一次类推。函数介绍: at91_set_gpio_input(unsigned pin, int use_pullup)设置管脚pin为输入,use_pullup为1使用内部上拉,.........【阅读全文】

阅读(6032) | 评论(0) | 转发(1)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册