硬件信息: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
*/
struct list_head entry;
unsigned long expires;
struct tvec_base *base; void (*function)(unsigned long);
unsigned long data; int slack; #ifdef CONFIG_TIMER_STATS
int start_pid;
void *start_site;
char start_comm[];
#endif
#ifdef CONFIG_LOCKDEP
struct lockdep_map lockdep_map;
#endif
};

详细参考:linux-2.4.18内核定时器的使用

2,设置GPIO函数有中,linux-3.8.0和linux-3.0.0有所不同,具体可以参考Documentation/arm/Samsung-S3C24XX/GPIO.txt中的说明,只列出遇到变换:

  linux-3.8.0 linux-3.0.0 参数是否变化
设置GPIO高或低 gpio_set_value() s3c2410_gpio_setpin() 不变
设置GPIO工作方式 s3c_gpio_cfgpin() s3c2410_gpio_cfgpin() 不变

3,Linux核心几个重要跟时间有关的名词或变数,HZ、tick和jiffies之间关系。

HZ:Linux核心每隔固定周期会发出timer interrupt ,HZ是用来定义每一秒有几次timer interrupts,我的机器为100 timer interrupts。

tick:就是HZ的倒数,以秒表示

jiffies:Jiffies为Linux核心变数(32位元变数,unsigned long),它被用来纪录系统自开机以来的tick数,每发生一次timer interrupt,Jiffies变数会被加一。

4,设备节点自动创建函数:class_create()和device_create()

从linux 内核2.6.24的某个版本之后,devfs不复存在,udev成为devfs的替代。udev处于应用层;加入对udev的支持很简单,以一个字符设备驱动led为例,在驱动初始化的代码里调用class_create为该设备创建一个class,再为每个设备调用 device_create创建对应的设备。

大致用法如下:
struct class *class = class_create(THIS_MODULE, “led”);
device_create(class, NULL, MKDEV(major_num, 0), NULL, “led”);
这样的module被加载时,udev daemon就会自动在/dev下创建led设备文件。
led驱动代码plat_led.c:

/*********************************************************************************
* Copyright: (C) 2011 Guo Wenxue<guowenxue@gmail.com>
* All rights reserved.
*
* Filename: s3c_led.c
* Description: This is the common LED driver runs on S3C24XX.
*
* Version: 1.0.0(10/27/2011~)
* Author: Guo Wenxue <guowenxue@gmail.com>
* ChangeLog: 1, Release initial version on "10/27/2011 11:39:10 AM"
*
********************************************************************************/
#include "s3c_driver.h" #define DRV_AUTHOR "Guo Wenxue <guowenxue@gmail.com>"
#define DRV_DESC "S3C24XX LED driver" /* Driver version*/
#define DRV_MAJOR_VER 1
#define DRV_MINOR_VER 0
#define DRV_REVER_VER 0 #define DEV_NAME DEV_LED_NAME //#define DEV_MAJOR DEV_LED_MAJOR
#ifndef DEV_MAJOR
#define DEV_MAJOR 0 /* dynamic major by default */ #define TIMER_TIMEOUT 40 static int debug = DISABLE;
static int dev_major = DEV_MAJOR;
static int dev_minor = ; /* ============================ Platform Device part ===============================*/
/* LED hardware informtation structure*/
struct s3c_led_info
{
unsigned char num; /* The LED number */
unsigned int gpio; /* Which GPIO the LED used */
unsigned char active_level; /* The GPIO pin level(HIGHLEVEL or LOWLEVEL) to turn on or off */
unsigned char status; /* Current LED status: OFF/ON */
unsigned char blink; /* Blink or not */
}; /* The LED platform device private data structure */
struct s3c_led_platform_data
{
struct s3c_led_info *leds;
int nleds;
}; /* LED hardware informtation data*/
static struct s3c_led_info s3c_leds[] = {
[] = {
.num = ,
.gpio = S3C2410_GPB(),
.active_level = LOWLEVEL,
.status = ON,
.blink = DISABLE,
},
[] = {
.num = ,
.gpio = S3C2410_GPB(),
.active_level = LOWLEVEL,
.status = OFF,
.blink = DISABLE,
},
[] = {
.num = ,
.gpio = S3C2410_GPB(),
.active_level = LOWLEVEL,
.status = OFF,
.blink = DISABLE,
},
[] = {
.num = ,
.gpio = S3C2410_GPB(), .active_level = LOWLEVEL,
.status = OFF,
.blink = DISABLE,
},
}; /* The LED platform device private data */
static struct s3c_led_platform_data s3c_led_data = {
.leds = s3c_leds,
.nleds = ARRAY_SIZE(s3c_leds),
}; struct led_device
{
struct s3c_led_platform_data *data;
struct cdev cdev;
struct class *dev_class;
struct timer_list blink_timer;
} led_device; static void platform_led_release(struct device * dev)
{
int i;
struct s3c_led_platform_data *pdata = dev->platform_data; dbg_print("%s():%d\n", __FUNCTION__,__LINE__); /* Turn all LED off */
for(i=; i<pdata->nleds; i++)
{
/* for linux-3.8.0 */
gpio_set_value(pdata->leds[i].gpio, ~pdata->leds[i].active_level); #if 0
/* for linux-3.0.0 check in s3c2410_gpio_setpin() in Documentation/arm/Samsung-S3C24XX/GPIO.txt*/
s3c2410_gpio_setpin(pdata->leds[i].gpio, ~pdata->leds[i].active_level);
#endif
}
} static struct platform_device s3c_led_device = {
.name = "s3c_led",
.id = ,
.dev =
{
.platform_data = &s3c_led_data,
.release = platform_led_release,
},
}; /* ===================== led device driver part ===========================*/ void led_timer_handler(unsigned long data)
{
int i;
struct s3c_led_platform_data *pdata = (struct s3c_led_platform_data *)data; for(i=; i<pdata->nleds; i++)
{
if(ON == pdata->leds[i].status)
{
gpio_set_value(pdata->leds[i].gpio, pdata->leds[i].active_level);
}
else
{
gpio_set_value(pdata->leds[i].gpio, ~pdata->leds[i].active_level);
} if(ENABLE == pdata->leds[i].blink ) /* LED should blink */
{
/* Switch status between 0 and 1 to turn LED ON or off */
pdata->leds[i].status = pdata->leds[i].status ^ 0x01;
} /* time clock */
mod_timer(&(led_device.blink_timer), jiffies + TIMER_TIMEOUT);
}
} static int led_open(struct inode *inode, struct file *file)
{
struct led_device *pdev ;
struct s3c_led_platform_data *pdata; pdev = container_of(inode->i_cdev, struct led_device, cdev);
pdata = pdev->data; file->private_data = pdata; return ;
} static int led_release(struct inode *inode, struct file *file)
{
return ;
} static void print_led_help(void)
{
printk("Follow is the ioctl() command for LED driver:\n");
printk("Enable Driver debug command: %u\n", SET_DRV_DEBUG);
printk("Get Driver verion command : %u\n", GET_DRV_VER);
printk("Turn LED on command : %u\n", LED_ON);
printk("Turn LED off command : %u\n", LED_OFF);
printk("Turn LED blink command : %u\n", LED_BLINK);
} /* compatible with kernel version >=2.6.38*/
static long led_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct s3c_led_platform_data *pdata = file->private_data; switch (cmd)
{
case SET_DRV_DEBUG:
dbg_print("%s driver debug now.\n", DISABLE == arg ? "Disable" : "Enable");
debug = (==arg) ? DISABLE : ENABLE;
break;
case GET_DRV_VER:
print_version(DRV_VERSION);
return DRV_VERSION; case LED_OFF:
if(pdata->nleds <= arg)
{
printk("LED%ld doesn't exist\n", arg);
return -ENOTTY;
}
pdata->leds[arg].status = OFF;
pdata->leds[arg].blink = DISABLE;
break; case LED_ON:
if(pdata->nleds <= arg)
{
printk("LED%ld doesn't exist\n", arg);
return -ENOTTY;
}
pdata->leds[arg].status = ON;
pdata->leds[arg].blink = DISABLE;
break; case LED_BLINK:
if(pdata->nleds <= arg)
{
printk("LED%ld doesn't exist\n", arg);
return -ENOTTY;
}
pdata->leds[arg].blink = ENABLE;
pdata->leds[arg].status = ON;
break; default:
dbg_print("%s driver don't support ioctl command=%d\n", DEV_NAME, cmd);
print_led_help();
return -EINVAL; }
return ;
} static struct file_operations led_fops = {
.owner = THIS_MODULE,
.open = led_open,
.release = led_release,
.unlocked_ioctl = led_ioctl, /* compatible with kernel version >=2.6.38*/
}; static int s3c_led_probe(struct platform_device *dev)
{
struct s3c_led_platform_data *pdata = dev->dev.platform_data;
int result = ;
int i;
dev_t devno; /* Initialize the LED status */
for(i=; i<pdata->nleds; i++)
{
s3c_gpio_cfgpin(pdata->leds[i].gpio, S3C2410_GPIO_OUTPUT);
if(ON == pdata->leds[i].status)
{
gpio_set_value(pdata->leds[i].gpio, pdata->leds[i].active_level);
}
else
{
gpio_set_value(pdata->leds[i].gpio, ~pdata->leds[i].active_level);
}
}
/* Alloc the device for driver */
if ( != dev_major)
{
devno = MKDEV(dev_major, dev_minor);
result = register_chrdev_region(devno, , DEV_NAME);
}
else
{
result = alloc_chrdev_region(&devno, dev_minor, , DEV_NAME);
dev_major = MAJOR(devno);
} /* Alloc for device major failure */
if (result < )
{
printk("%s driver can't get major %d\n", DEV_NAME, dev_major);
return result;
} /* Initialize button structure and register cdev*/
memset(&led_device, , sizeof(led_device));
led_device.data = dev->dev.platform_data;
cdev_init (&(led_device.cdev), &led_fops);
led_device.cdev.owner = THIS_MODULE; result = cdev_add (&(led_device.cdev), devno , );
if (result)
{
printk (KERN_NOTICE "error %d add %s device", result, DEV_NAME);
goto ERROR;
} led_device.dev_class = class_create(THIS_MODULE, DEV_NAME);
if(IS_ERR(led_device.dev_class))
{
printk("%s driver create class failture\n",DEV_NAME);
result = -ENOMEM;
goto ERROR;
} #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
device_create(led_device.dev_class, NULL, devno, NULL, DEV_NAME);
#else
device_create(led_device.dev_class, NULL, devno, DEV_NAME);
#endif /* Initial the LED blink timer */
init_timer(&(led_device.blink_timer));
led_device.blink_timer.function = led_timer_handler;
led_device.blink_timer.data = (unsigned long)pdata; //pass to led_timer_handler()
led_device.blink_timer.expires = jiffies + TIMER_TIMEOUT;
add_timer(&(led_device.blink_timer)); printk("S3C %s driver version %d.%d.%d initiliazed.\n", DEV_NAME, DRV_MAJOR_VER, DRV_MINOR_VER, DRV_REVER_VER); return ; ERROR:
printk("S3C %s driver version %d.%d.%d install failure.\n", DEV_NAME, DRV_MAJOR_VER, DRV_MINOR_VER, DRV_REVER_VER);
cdev_del(&(led_device.cdev)); unregister_chrdev_region(devno, );
return result; } static int s3c_led_remove(struct platform_device *dev)
{
dev_t devno = MKDEV(dev_major, dev_minor); del_timer(&(led_device.blink_timer)); cdev_del(&(led_device.cdev));
device_destroy(led_device.dev_class, devno);
class_destroy(led_device.dev_class); unregister_chrdev_region(devno, );
printk("S3C %s driver removed\n", DEV_NAME); return ;
} static struct platform_driver s3c_led_driver = {
.probe = s3c_led_probe,
.remove = s3c_led_remove,
.driver = {
.name = "s3c_led",
.owner = THIS_MODULE,
},
}; static int __init s3c_led_init(void)
{
int ret = ; ret = platform_device_register(&s3c_led_device);
if(ret)
{
printk(KERN_ERR "%s:%d: Can't register platform device %d\n", __FUNCTION__,__LINE__, ret);
goto fail_reg_plat_dev;
}
dbg_print("Regist S3C LED Platform Device successfully.\n"); ret = platform_driver_register(&s3c_led_driver);
if(ret)
{
printk(KERN_ERR "%s:%d: Can't register platform driver %d\n", __FUNCTION__,__LINE__, ret);
goto fail_reg_plat_drv;
}
dbg_print("Regist S3C LED Platform Driver successfully.\n"); return ; fail_reg_plat_drv:
platform_driver_unregister(&s3c_led_driver);
fail_reg_plat_dev:
return ret;
} static void s3c_led_exit(void)
{
dbg_print("%s():%d remove LED platform drvier\n", __FUNCTION__,__LINE__);
platform_driver_unregister(&s3c_led_driver);
dbg_print("%s():%d remove LED platform device\n", __FUNCTION__,__LINE__);
platform_device_unregister(&s3c_led_device);
} module_init(s3c_led_init);
module_exit(s3c_led_exit); module_param(debug, int, S_IRUGO);
module_param(dev_major, int, S_IRUGO);
module_param(dev_minor, int, S_IRUGO); MODULE_AUTHOR(DRV_AUTHOR);
MODULE_DESCRIPTION(DRV_DESC);
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:S3C24XX_led"); s3c_driver.h头文件:

/********************************************************************************
* Copyright: (C) GuoWenxue <guowenxue@gmail.com>
* All rights reserved.
*
* Filename: s3c_driver.h
* Description: This is the common head file for S3C24XX common driver
*
* Version: 1.0.0(10/29/2011~)
* Author: Guo Wenxue <guowenxue@gmail.com>
* ChangeLog: 1, Release initial version on "10/29/2011 11:27:50 AM"
*
********************************************************************************/

#ifndef __S3C_DRIVER_H
#define __S3C_DRIVER_H

#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/kref.h>
#include <linux/spinlock.h>
#include <asm/uaccess.h>
#include <linux/mutex.h>
#include <linux/delay.h>

#include <linux/fs.h>
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/string.h>
#include <linux/bcd.h>
#include <linux/miscdevice.h>
#include <linux/poll.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/sysfs.h>
#include <linux/proc_fs.h>
#include <linux/rtc.h>
#include <linux/spinlock.h>
#include <linux/usb.h>
#include <asm/uaccess.h>
#include <asm/delay.h>
#include <linux/syscalls.h> /* For sys_access*/
#include <linux/platform_device.h>
#include <linux/unistd.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/serial.h>
#include <linux/serial_core.h>
#include <linux/irq.h>
#include <mach/regs-gpio.h>
#include <linux/gpio.h> //linux-3.8.0的GPIO控制

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
#include <mach/hardware.h>
#include <mach/gpio.h>
#include <asm/irq.h>
#else
#include <asm-arm/irq.h>
#include <asm/arch/gpio.h>
#include <asm/arch/hardware.h>
#endif
#include "plat_ioctl.h"

/* ===========================================================================
* S3C24XX device driver common macro definition
*===========================================================================*/

#define ENPULLUP 1
#define DISPULLUP 0

#define HIGHLEVEL 1
#define LOWLEVEL 0

#define INPUT 1
#define OUTPUT 0

#define OFF 0
#define ON 1

#define ENABLE 1
#define DISABLE 0

#define TRUE 1
#define FALSE 0

/* ===========================================================================
* S3C24XX device driver name and Major number define
*===========================================================================*/

#define DEV_LED_NAME "led"
#define DEV_LED_MAJOR 203

#define DEV_BUTTON_NAME "button"
#define DEV_BUTTON_MAJOR "211"

#define DEV_ADC_NAME "adc"
#define DEV_ADC_MAJOR "212"

/* ***** Bit Operate Define *****/
#define SET_BIT(data, i) ((data) |= (1 << (i))) /* Set the bit "i" in "data" to 1 */
#define CLR_BIT(data, i) ((data) &= ~(1 << (i))) /* Clear the bit "i" in "data" to 0 */
#define NOT_BIT(data, i) ((data) ^= (1 << (i))) /* Inverse the bit "i" in "data" */
#define GET_BIT(data, i) ((data) >> (i) & 1) /* Get the value of bit "i" in "data" */
#define L_SHIFT(data, i) ((data) << (i)) /* Shift "data" left for "i" bit */
#define R_SHIFT(data, i) ((data) >> (i)) /* Shift "data" Right for "i" bit */

/* ===========================================================================
* S3C24XX device driver common function definition
*===========================================================================*/

#define SLEEP(x) {DECLARE_WAIT_QUEUE_HEAD (stSleep); if (10 > x) mdelay ((x * 1000)); \
else wait_event_interruptible_timeout (stSleep, 0, (x / 10));}

#define VERSION_CODE(a,b,c) ( ((a)<<16) + ((b)<<8) + (c))
#define DRV_VERSION VERSION_CODE(DRV_MAJOR_VER, DRV_MINOR_VER, DRV_REVER_VER)
#define MAJOR_VER(a) ((a)>>16&0xFF)
#define MINOR_VER(a) ((a)>>8&0xFF)
#define REVER_VER(a) ((a)&0xFF)

#define dbg_print(format,args...) if(DISABLE!=debug) \
{printk("[kernel] ");printk(format, ##args);}

static inline void print_version(int version)
{
#ifdef __KERNEL__
printk("%d.%d.%d\n", MAJOR_VER(version), MINOR_VER(version), REVER_VER(version));
#else
printf("%d.%d.%d\n", MAJOR_VER(version), MINOR_VER(version), REVER_VER(version));
#endif
}

#endif /* __S3C_DRIVER_H */

plat_ioctl.h头文件:

/*********************************************************************************
* Copyright(c) 2011, Guo Wenxue <guowenxue@gmail.com>
* All ringhts reserved.
*
* Filename: s3c_ioctl.h
* Description: ioctl() cmd argument definition here
*
* ChangLog:
* 1, Version: 1.0.0
* Date: 2011-08-10
* Author: guowenxue <guowenxue@gmail.com>
* Descrtipion: Initial first version
*
*
********************************************************************************/

#ifndef __PLAT_IOCTL_H
#define __PLAT_IOCTL_H

#include <asm/ioctl.h>

/*===========================================================================
* Common ioctl command definition
*===========================================================================*/

#define PLATDRV_MAGIC 0x60

/*===========================================================================
* ioctl command for all the drivers 0x01~0x0F
*===========================================================================*/

/*args is enable or disable*/
#define SET_DRV_DEBUG _IO (PLATDRV_MAGIC, 0x01)
#define GET_DRV_VER _IO (PLATDRV_MAGIC, 0x02)

/*===========================================================================
* ioctl command for few ioctl() cmd driver 0x10~0x2F
*===========================================================================*/

/* LED driver */
#define LED_OFF _IO (PLATDRV_MAGIC, 0x18)
#define LED_ON _IO (PLATDRV_MAGIC, 0x19)
#define LED_BLINK _IO (PLATDRV_MAGIC, 0x1A)
#define ADC_SET_CHANNEL _IO (PLATDRV_MAGIC, 0x1B)

/*===========================================================================
* ioctl command for GPRS driver 0x30~0x4F
*===========================================================================*/
#define GPRS_POWERDOWN _IO (PLATDRV_MAGIC, 0x30)
#define GPRS_POWERON _IO (PLATDRV_MAGIC, 0x31)
#define GPRS_RESET _IO (PLATDRV_MAGIC, 0x32)
#define GPRS_POWERMON _IO (PLATDRV_MAGIC, 0x33)
#define GPRS_CHK_SIMDOOR _IO (PLATDRV_MAGIC, 0x36)
#define GPRS_SET_DTR _IO (PLATDRV_MAGIC, 0x37)
#define GPRS_SET_RTS _IO (PLATDRV_MAGIC, 0x38)
#define GPRS_GET_RING _IO (PLATDRV_MAGIC, 0x39)
#define SET_PWUP_TIME _IO (PLATDRV_MAGIC, 0x3A)
#define SET_PWDOWN_TIME _IO (PLATDRV_MAGIC, 0x3B)
#define SET_RESET_TIME _IO (PLATDRV_MAGIC, 0x3C)
#define GPRS_CHK_MODEL _IO (PLATDRV_MAGIC, 0x3E)

/*===========================================================================
* ioctl command for EEPROM driver 0x50~0x5F
*===========================================================================*/

#define LL_POWEROFF _IO (PLATDRV_MAGIC, 0x50)
#define LL_POWERON _IO (PLATDRV_MAGIC, 0x51)
#define LL_STOP _IO (PLATDRV_MAGIC, 0x52)
#define LL_START _IO (PLATDRV_MAGIC, 0x53)
#define LL_READ _IO (PLATDRV_MAGIC, 0x54)
#define LL_WRITE _IO (PLATDRV_MAGIC, 0x55)
#define LL_DATALOW _IO (PLATDRV_MAGIC, 0x56)
#define LL_ACKNAK _IO (PLATDRV_MAGIC, 0x57)

#endif /* __PLAT_IOCTL_H */

Makefil文件:

ARCH=arm920t
PROJ=fl2440
PWD=$(shell pwd)

ifneq ("${ARCH}", "x86")
CROSS_COMPILE ?= /opt/buildroot-2011.11/${ARCH}/usr/bin/arm-linux-   /*指定交叉编译器*/
KERNEL_DIR = ../../kernel/linux-3.8/       /*指定内核路径*/
else
KERNEL_DIR = /lib/modules/$(shell uname -r)/build
endif

obj-m += plat_led.o

all:
make -C $(KERNEL_DIR) SUBDIRS=$(PWD) modules
@make clear

clear:
@rm -f *.o *.cmd *.mod.c
@rm -rf *~ core .depend .tmp_versions Module.symvers modules.order -f
@rm -f .*ko.* *ko.* .*.o.cmd

clean:
rm -f *.ko *.o

led测试程序:
/*********************************************************************************
* Copyright: (C) 2014 zhouguangfeng<zhouguangfeng91@gmail.com>
* All rights reserved.
*
* Filename: test_plat_led.c
* Description: This file is used to test led platform drvier
*
* Version: 1.0.0(08/25/2014)
* Author: zhouguangfeng <zhouguangfeng91@gmail.com>
* ChangeLog: 1, Release initial version on "08/25/2014 04:04:26 PM"
*
********************************************************************************/
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h> #define PLATDRV_MAGIC 0x60 #define LED_OFF _IO (PLATDRV_MAGIC, 0x18)
#define LED_ON _IO (PLATDRV_MAGIC, 0x19)
#define LED_BLINK _IO (PLATDRV_MAGIC, 0x1A) /********************************************************************************
* Description:
* Input Args:
* Output Args:
* Return Value:
********************************************************************************/
int main (int argc, char **argv)
{
int fd;
int i; fd = open("/dev/led", O_RDWR, );
if(fd<)
{
printf("cannot open.\n");
goto open_err;
} ioctl(fd, LED_BLINK, );
ioctl(fd, LED_OFF, );
ioctl(fd, LED_ON, );
ioctl(fd, LED_OFF, ); open_err:
close(fd);
return ;
} /* ----- End of main() ----- */

FL2440驱动添加(4)LED 驱动添加的更多相关文章

  1. Linux驱动开发之LED驱动

    首先讲下字符设备控制技术 : 大部分驱动程序除了需要提供读写设备的能力外,还需要具备控制设备的能力.比如: 改变波特率. 在用户空间,使用ioctl系统调用来控制设备,原型如下:int ioctl(i ...

  2. Android系统移植与驱动开发——第七章——LED驱动

    LED驱动的实现原理 编写LED驱动: 测试LED驱动之前需要用USB数据线连接开发板,然后打开电源,成功启动之后,执行build.sh脚本文件编译和安装LED驱动,顺利则会自动连接 如果有多个设备文 ...

  3. Linux驱动框架之framebuffer驱动框架

    1.什么是framebuffer? (1)framebuffer帧缓冲(一屏幕数据)(简称fb)是linux内核中虚拟出的一个设备,framebuffer向应用层提供一个统一标准接口的显示设备.帧缓冲 ...

  4. [驱动]内核添加USB转串口驱动支持

    转自:http://blog.csdn.net/gatieme/article/details/49491325 目录 1. 问题 2. 驱动源码 3. 内核配置 4. 编译内核和模块驱动 5. 加载 ...

  5. 给windows 7安装文件添加USB3.0驱动

    给Air安装win7进入语言与区域选择之后,发现键盘触摸板都失灵.   原因:新款的 Macbook Air 2013 因为使用了 USB3.0 端口键盘和触摸板设备,所以在安装 Windows 7 ...

  6. win7添加usb3.0驱动(错误代码1392,文件或目录损坏且无法读取)

    Win7添加usb3.0驱动 之前一直按照网上的方法执行dism命令挂载时,总是失败,错误代码1392,显示原因是文件或目录损坏且无法读取.这个错误以前在装机时老是出现导致系统安装不成功,在BIOS中 ...

  7. VMware ESXI添加第三方网卡驱动

    VMware ESXI有两种方法添加第三方网卡驱动: 1.使用第三方工具 ESXI-Customizer.cmd工具可以将已经下载好的VMware ESXI.ISO镜像文件把下载好的驱动添加到里面,缺 ...

  8. win10 管理工具中添加 oracle 10g驱动

    重装了系统,在应用oracle 10g时,一直在管理工具中没有添加成功ODBC驱动,今天找到解决方法了. 状态如下: 解决方法: c盘——windows——SysWOW64——odbcad32.exe ...

  9. 如何向 Windows 7 镜像中添加 USB3.0 驱动

    如何向 Windows 7 镜像中添加 USB3.0 驱动 1. Microsoft 在 Windows 7 的安装光盘并没有集成各个厂商的 USB3.0 驱动,可 以使用下面方法添加 USB3.0 ...

随机推荐

  1. 读Java 804 - Quick refresher

    Upcast永远是成功的,但Downcast不是,记得做instanceof判断 仅抛不同异常,而返回值相同的重载是不可以的 static import只会import静态类 static metho ...

  2. Hadoop-Drill深度剖析

    1.概述 在<Hadoop - 实时查询Drill>一文当中,笔者给大家介绍如何去处理实时查询这样的业务场景,也是简略的提了一下如何去实时查询HDFS,然起相关细节并未说明.今天给大家细说 ...

  3. thinkphp的伪静态化

    1. 设置默认的控制器和模块 // 绑定访问Admin模块 define('BIND_MODULE','Home'); // 绑定访问Index控制器 define('BIND_CONTROLLER' ...

  4. 记一次VNC远程连接Linux问题解决记录(5900端口测试、KDE桌面安装)

    最近几天,到一个项目上安装Linux部署环境.由于服务器在机房,而进机房又比较麻烦,于是选择VNC远程连接Linux就显得自然而然了.以前也用过VNC,而且还经常使用,由于各个项目环境不太一样,这次也 ...

  5. 针对 SQL Server 2008 在Windows Server 2008上的访问配置 Windows 防火墙

    现在Windows Server 2008 服务器用的越来越多,2008的防火墙比2003的有了很大的增强,安全性有了更大的提高. 甚至80端口的出站默认都是被关闭的.所以如果在2008Server上 ...

  6. Could not find the Visual SourceSafe Internet Web Service connection information for the specified database Would you like to launch the Visual sourceSafe connection wizard?

    今天同事遇到个奇怪问题,以前也遇到过,不过重新绑定一下就OK了,不知道为什么今天不行了. 错误提示:===============================================Cou ...

  7. PSAM卡与CPU(用户卡)的操作过程

    最近我一直在研究关于通过国密PSAM卡作为安全模块来读写cpu(用户卡)的问题 其实,两者都是卡片,或者说都是从设备.它们之间是无法相互访问的. 实际上,PSAM 卡是作为秘密密钥的载体,专门执行加密 ...

  8. C/C++/Qt 统计运行时间

    http://www.cnblogs.com/Romi/archive/2012/04/19/2457175.html 程序中经常需要统计时间,需要统计某项运算的运行时间时,需要计算时间差. 1. C ...

  9. 在Sharepoint2010中一种自定义调查列表的不允许再次答复提示的处理方法!

    在Sharepoint中默认创建的调查列表系统只允许答复一次,再次答复将报错误信息,这对最终用户而言是非常不友好的体验,当然你也可以在调查设置中的常规设置中设置允许多次答复,这样就会有错误提示信息,但 ...

  10. Django数据模型及操作

    转自:http://blog.sina.com.cn/s/blog_a73687bc0101cygy.html (一) 初始化测试运行环境 import os; import sys; sys.pat ...