文件名称:led_linux2.4.18
- 所属分类:
- 嵌入式Linux
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 5kb
- 下载次数:
- 0次
- 提 供 者:
- Jia-Ya*******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
Linux 2.4.18 s3c2440 led driver
使用dev-C++撰寫,需要linux 2.4.18 kernel include,編譯完成後產生led module。
insmod main.o //安裝模組
mknod /dev/leds c 221 0
使用方法:
int main(int argc, char *argv[])
{
int testdev
//led test...
testdev = open("/dev/QuickMarkLed",O_RDWR)
ioctl(testdev, 2, 1) //ioctl(device, led number, open/close) open=1
ioctl(testdev, argv[1][0]- 0 , argv[2][0]- 0 ) //ioctl(device, led number, open/close) open=1
close(testdev)
return 0
}
-Linux 2.4.18 s3c2440 led driver to use dev-C++ Writing, the need for linux 2.4.18 kernel include, compiled after the completion of led module. insmod main.o// install the module mknod/dev/leds c 221 0 to use: int main (int argc, char* argv []) (int testdev// led test ... testdev = open (/ dev/QuickMarkLed , O_RDWR) ioctl (testdev, 2, 1)// ioctl (device, led number, open/close) open = 1 ioctl (testdev, argv [1] [0]- 0, argv [2] [0]- 0 )// ioctl (device, led number, open/close) open = 1 close (testdev) return 0)
使用dev-C++撰寫,需要linux 2.4.18 kernel include,編譯完成後產生led module。
insmod main.o //安裝模組
mknod /dev/leds c 221 0
使用方法:
int main(int argc, char *argv[])
{
int testdev
//led test...
testdev = open("/dev/QuickMarkLed",O_RDWR)
ioctl(testdev, 2, 1) //ioctl(device, led number, open/close) open=1
ioctl(testdev, argv[1][0]- 0 , argv[2][0]- 0 ) //ioctl(device, led number, open/close) open=1
close(testdev)
return 0
}
-Linux 2.4.18 s3c2440 led driver to use dev-C++ Writing, the need for linux 2.4.18 kernel include, compiled after the completion of led module. insmod main.o// install the module mknod/dev/leds c 221 0 to use: int main (int argc, char* argv []) (int testdev// led test ... testdev = open (/ dev/QuickMarkLed , O_RDWR) ioctl (testdev, 2, 1)// ioctl (device, led number, open/close) open = 1 ioctl (testdev, argv [1] [0]- 0, argv [2] [0]- 0 )// ioctl (device, led number, open/close) open = 1 close (testdev) return 0)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
led
...\build
...\.....\led.a
...\.....\main.o
...\.....\QuickMarkLed.o
...\led.dev
...\main.c
...\Makefile.win
...\build
...\.....\led.a
...\.....\main.o
...\.....\QuickMarkLed.o
...\led.dev
...\main.c
...\Makefile.win