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

📄 arm.c

📁 英培特嵌入式开发系统IDE软件包
💻 C
字号:
/*********************************************************************************************
* File:	arm.c
* Author:	G.F.XU   2002.5.15
* Desc:	arm instruction ,c program
* History:	
*********************************************************************************************/

/*------------------------------------------------------------------------------------------*/
/*	 								extern 	 variable					 				    */
/*------------------------------------------------------------------------------------------*/
extern char szArm[20];

/*********************************************************************************************
* name:		delaya
* func:		delay function of arm instructon
* para:		nTime---input
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
static void delaya(int nTime)
{
	int i, j, k;
	k = 0;
	
	for(i = 0; i < nTime; i++)
	{
		for(j = 0; j < 10; j++)
			k++;
	}
}

/*********************************************************************************************
* name:		arm_function
* func:		example
* para:	    none
* ret:		none
* modify:
* comment:		
*********************************************************************************************/
void arm_function(void)
{
	int i;
	int nLoop;
	unsigned int unRandom;
	char *p = "Hello from ARM world";
	
	for(i =0; i < 20; i++)
		szArm[i] = (*p++);
		
	delaya(2);

	for( nLoop = 0; nLoop < 10; nLoop++ )
	{ 
		unRandom = randomnumber();
	}
}

⌨️ 快捷键说明

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