ZYNQ7020_Linux_Hello_World

ZYNQ7020_Linux_Hello_World

一、程序

#include <linux/init.h>
#include <linux/module.h>

static int __init hello_init(void)
{
	printk("Hello World! \n");
	return 0;
}

static void __exit hello_exit(void)
{
	printk("Module exit! \n");
}

module_init(hello_init);
module_exit(hello_exit);

MODULE_AUTHOR("chi_hong");
MODULE_DESCRIPTION("Hello Linux Driver");
MODULE_ALIAS("It's only for fun");
MODULE_VERSION("v1.0");
MODULE_LICENSE("GPL");

二、结果

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Chi_Hong/article/details/84564795
今日推荐