文件名称:smart210_led_driver
介绍说明--下载内容均来自于网络,请自行研究使用
1.首先加载驱动 insmod smart210_led.ko
2.open( /dev/设备文件名 ,O_RDWR)
3.用ioctl(fd,LED_ON,value) 操作led
第二个参数可以为LED_ON,LED_OFF,LED_ALL
当为LED_ON时第三个参数只能取值1-4 (说明点亮固定led,若第三个参数为3表示点亮第三个led)
当为LED_OFF时第三个参数只能取值1-4 (说明熄灭固定led,若第三个参数为3表示熄灭第三个led)
当为LED_OFF时第三个参数取值0-15 第三个参数的值化为四位二进制,每一位对应一个led,点亮为1,熄灭为0.
-1 first load the driver of insmod smart210_led.ko
2.open (" /dev/ device file name, " O_RDWR)
3 with IOCTL (FD, LED_ON, value) LED operation
The second parameter can be LED_ON, LED_OFF, LED_ALL
When LED_ON third parameters only value of 1-4 (light fixed led, that if the third parameters for the 3 said light third LED)
When LED_OFF third parameters only value of 1-4 (that goes out the fixed led, if the third parameters for the 3 represent the third led out)
When LED_OFF third parameter 0-15 values of third parameters into four bit binary, each corresponding to a LED, light is 1, out of 0
2.open( /dev/设备文件名 ,O_RDWR)
3.用ioctl(fd,LED_ON,value) 操作led
第二个参数可以为LED_ON,LED_OFF,LED_ALL
当为LED_ON时第三个参数只能取值1-4 (说明点亮固定led,若第三个参数为3表示点亮第三个led)
当为LED_OFF时第三个参数只能取值1-4 (说明熄灭固定led,若第三个参数为3表示熄灭第三个led)
当为LED_OFF时第三个参数取值0-15 第三个参数的值化为四位二进制,每一位对应一个led,点亮为1,熄灭为0.
-1 first load the driver of insmod smart210_led.ko
2.open (" /dev/ device file name, " O_RDWR)
3 with IOCTL (FD, LED_ON, value) LED operation
The second parameter can be LED_ON, LED_OFF, LED_ALL
When LED_ON third parameters only value of 1-4 (light fixed led, that if the third parameters for the 3 said light third LED)
When LED_OFF third parameters only value of 1-4 (that goes out the fixed led, if the third parameters for the 3 represent the third led out)
When LED_OFF third parameter 0-15 values of third parameters into four bit binary, each corresponding to a LED, light is 1, out of 0
(系统自动生成,下载前可以参看下载内容)
下载文件列表
led可自动生成设备文件
.....................\.smart210_led.ko.cmd
.....................\.smart210_led.mod.o.cmd
.....................\.smart210_led.o.cmd
.....................\.tmp_versions
.....................\.............\smart210_led.mod
.....................\Makefile
.....................\Makefile~
.....................\Module.symvers
.....................\led_app.c
.....................\led_app.c~
.....................\ledapp
.....................\led使用手册
.....................\modules.order
.....................\smart210_led.c
.....................\smart210_led.c~
.....................\smart210_led.h
.....................\smart210_led.h~
.....................\smart210_led.ko
.....................\smart210_led.mod.c
.....................\smart210_led.mod.o
.....................\smart210_led.o