⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ledblink.c

📁 arm嵌入式常用模块的程序源代码
💻 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 )
{
/* 在insmod中开启LED */
clps_writel(0x01, PDDR);
return 0;
}
void cleanup_module( void )
{
/* 在rmmod关闭LED*/
clps_writel(~0x01,PDDR);
}
#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 )
{
																							/* 在insmod中开启LED */
	clps_writel(0x01, PDDR);
	return 0;
}
void cleanup_module( void )
{
																							/* 在rmmod关闭LED*/
	clps_writel(~0x01,PDDR);
}

⌨️ 快捷键说明

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