驱动程序
#include <linux/init.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/device.h>
#include <asm/uaccess.h>
#include <asm/io.h>
static unsigned int major;
static struct device * led_dev;
static struct class * led_class;
static volatile unsigned long * GPC0_CON;
static volatile unsigned long * GPC0_DAT;
int led_open (struct inode * node, struct file * filp)
{
printk("----------%s------------\n",__FUNCTION__);
return 0;
}
int led_release (struct inode *node, struct file * filp)
{
printk("----------%s------------\n",__FUNCTION__);
return 0;
}
ssize_t led_write(struct file * filp, const char __user * buff, size_t count, loff_t * offset)
{
ssize_t ret;
int led_cmd;
printk("----------%s------------\n",__FUNCTION__);