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

📄 tmrtest.c

📁 nxp的LPC2888处理器的示例代码.
💻 C
字号:
/*****************************************************************************
 *   tmrtest.c:  main C entry file for NXP LPC2xxx Family Microprocessors
 *
 *   Copyright(C) 2006, NXP Semiconductor
 *   All rights reserved.
 *
 *   History
 *   2006.09.01  ver 1.00    Prelimnary version, first Release
 *
******************************************************************************/
#include "LPC288x.h"                        /* LPC2xxx definitions */
#include "type.h"
#include "target.h"
#include "irq.h"
#include "timer.h"

extern DWORD timer_counter;

/*****************************************************************************
**   Main Function  main()
*****************************************************************************/
int main (void)
{	    		
  TargetResetInit();
  init_timer( TIMER_1SECS );

  MODE1S_2=0xF;
  while(1)			/* Loop forever */ 
  {				
	if ( timer_counter & 0x01 ) {
	  MODE0S_2 = 0x1<<1;
	}
	else {
	  MODE0C_2 = 0x1<<1;
	}
  }
  return 0;
}

/*****************************************************************************
**                            End Of File
******************************************************************************/

⌨️ 快捷键说明

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