欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Android程序操控LED

程序员文章站 2024-03-15 14:06:35
...

Android程序操控LED

v1:
放入内核 drivers/char
修改 drivers/char/Makefile,添加:
obj-y += leds_4412.o

重新编译内核

v2:
把 leds_4412.c 放到drivers/leds
修改 drivers/leds/Makefile:
obj-y += leds_4412.o

重新配置内核
make menuconfig

CONFIG_LEDS_CLASS
CONFIG_LEDS_TRIGGERS
CONFIG_LEDS_TRIGGER_TIMER

-> Device Drivers
  -> LED Support
   [*]   LED Class Support    
   [*]   LED Trigger support
   <*>   LED Timer Trigger
   
重新编译内核

 

Android程序操控LED

 

 

aaa@qq.com:/work/linux-3.0.86/drivers/char# vi leds_4412.c
aaa@qq.com:/work/linux-3.0.86/drivers/char# vi Makefile
aaa@qq.com:/work/linux-3.0.86/drivers/char# vi Makefile
aaa@qq.com:/work/linux-3.0.86# make zImage
 

Android程序操控LED

 

 

 

 

 

相关标签: framework