driver层定时器开发

来源:互联网 发布:python入门新手项目 编辑:程序博客网 时间:2024/05/22 14:42

static struct timer_list buttons_timer; //定义一个定时器init_timer(&buttons_timer);  //定时器初始化buttons_timer.function=buttons_timer_function;  //定时器两大要素之一之定时器处理函数,另一个是超时时间mod_timer(&buttons_timer, jiffies+HZ/100); //设置定时器时间

add_timer(&buttons_timer);




0 0
原创粉丝点击