基于ok6410: led驱动程序: vim led.c #include<linux/kernel.h>#include<linux/module.h>#include<linux/init.h>#include<linux/io.h>#include<linux/fs.h>#include<linux/cdev.h>#include"led.h"#include<mach/gpio-bank-k.h>…
硬件信息:FL2440板子,s3c2440CPU带四个LED,分别在链接GPB5,GPB6,GPB8,GPB10 内核版本:linux-3.8.0 led驱动代码如下: 值得注意地方地方: 1,定时器的使用:在include/linux/timer.h下定义struct timer_list struct timer_list { /* * All fields that change during normal runtime grouped to the * same cacheline *…