会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
一枚小苦工
博客园
首页
新随笔
联系
管理
订阅
2019年4月4日
Linux内核-平台设备-platform
摘要: 一、注册一个平台设备 方法1:platform_device_register 核心数据结构: 1 struct platform_device { 2 const char *name; 3 int id; 4 bool id_auto; 5 struct device dev; 6 u32 nu
阅读全文
posted @ 2019-04-04 20:21 一枚小苦工
阅读(1379)
评论(0)
推荐(0)
2019年3月19日
Linux内核超时检测
摘要: printk("HZ is %d\n",HZ); timeout = jiffies + 5*HZ/100; printk(KERN_INFO"time_after test\r\n"); while(1) { if(time_after(jiffies,timeout)) { printk("ti
阅读全文
posted @ 2019-03-19 11:12 一枚小苦工
阅读(678)
评论(0)
推荐(0)
2019年3月16日
Linux内核定时器
摘要: 一、Linux定时器主要调用接口 1、定时器数据结构 1 struct timer_list { 2 /* 3 * All fields that change during normal runtime grouped to 4 * the same cacheline 5 */ 6 struct
阅读全文
posted @ 2019-03-16 14:41 一枚小苦工
阅读(3634)
评论(0)
推荐(1)
2017年11月22日
Linux 字符驱动
摘要: char_driver.c 1 #include <linux/module.h> 2 #include <linux/slab.h> //kmalloc 3 #include <linux/cdev.h> //cdev 4 #include <linux/fs.h> //register_chrd
阅读全文
posted @ 2017-11-22 19:54 一枚小苦工
阅读(359)
评论(0)
推荐(0)
公告