ledblink.c

来自「花高价买来的arm的配套代码」· C语言 代码 · 共 22 行

C
22
字号
/*ledblink.c*/
#define MODULE
#include <Linux/module.h>
#include <asm/system.h>                                           /* 汇编头文件 */ 
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/bitops.h>
#include <asm/hardware.h>
#include <asm/hardware/clps7111.h>
int init_module( void )
{
/* Turn on the Led on insmod */
	clps_writel(0x01, PDDR);
	return 0;
}
void cleanup_module( void )
{
/* Turn off the led on rmmod*/
	clps_writel(~0x01,PDDR);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?