📄 tmr2.c
字号:
//-----------------------------------------------------------------------------
// File: tmr2.c
// Contents: ISR for timer2, used to write characters to the lcd
// EZUSB FX LCDIO firmware
// Copyright (c) 2001 Cypress Semiconductor All rights reserved
//-----------------------------------------------------------------------------
#include "ezusb.h"
#include "ezregs.h"
#include "Fx.h"
extern BOOL tmr_kd;
void tmr2_isr( void ) interrupt 5 using 1
{ // fires every Xmsec ( where X=10, in this example )...
static BYTE loopcnt = 0x00;
if( loopcnt++ > 3 )
{ // 10msec * 3 = 30msec event timer
TR2 = 0; // ...stop timer2 ticking
loopcnt = 0x00; // (re)start forground timer event
}
else
{
}
TF2 = 0; // T2CON.7 must be cleared by software
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -