Hello Word驱动程序

1302阅读 0评论2011-09-26 luozhiyong131
分类:嵌入式

/*

 * Hello Word驱动程序

 * Lzy 2011-9-26

 */

 

#include   /* 模块加载函数和模块释放函数的宏定义*/

#include    /* 加载模块需要使用的大量符号和函数定义*/

 

static int __init hello_init(void)

{

    printk("Hello Word\n");

    return 0;

}

 

static void __exit hello_exit(void)

{

    printk("GoodBye Word\n");

    return ;

}

 

module_init(hello_init); /* 指定模块加载函数*/

module_exit(hello_exit); /* 指定模块卸载函数*/

MODULE_LICENSE("GPL");      /* 指定许可权为GPL*/

 

源代码: hello.rar   

 

上一篇:Source Insight代码阅读器
下一篇:模块函数与模块之间通信