tmrtest.c
来自「nxp的LPC2888处理器的示例代码.」· C语言 代码 · 共 43 行
C
43 行
/*****************************************************************************
* 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 + =
减小字号Ctrl + -
显示快捷键?