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

全部博文(19)

文章存档

2016年(1)

2015年(1)

2014年(4)

2013年(10)

2012年(3)

我的朋友

发布时间: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)

发布时间:2013-11-03 13:25:45

Linux线程同步的三种方式,附代码示例。......【阅读全文】

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

发布时间:2013-10-31 22:22:15

    SPI系统分析    SPI简介     SPI总线是Motorola公司推出的三线同步接口,是英语Serial Peripheral Interface的缩写,顾名思义就是串行外围设备接口,是一种高速的,全双工,同步的通信总线,应用也比较广泛,个人碰到的有用于平板上的ISDBT.........【阅读全文】

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

登录 注册