文件名称:mini2440按键驱动
文件大小:285KB
文件格式:DOC
更新时间:2015-09-27 07:02:06
嵌入式,驱动
mini2440按键驱动,static const struct file_operations button_s3c2440={ .owner =THIS_MODULE, .open =lg_button_open, .read =lg_button_read, .poll =lg_button_poll, .release =lg_button_close; } static __init int init_button_lg() { int ret; if(ret=register_chrdev(0,DEVICE_NAME,≶_button)<0) { printk(DEVICE_NAME"can`t register\n"); return ret; } Return ret; } static __exit void exit_button_lg() { unregister_chrdev(0,DEVICE_NAME); } module_init(init_button_lg); module_exit(exit_button_lg)