?? general.c
字號:
/*********************************************************************************
* *
* FileName: General.c *
* Function: General function *
* SystemName: NDS18000-BSC *
* CPU: ATMEL AT89C52 *
* Startup: 14/Oct/2002 *
* Author: XuYiBo *
* *
*********************************************************************************/
#include <intrins.h>
#include "NDSBSCUI.H"
#include "General.h"
////////////////////////////////////////////////////////////////////////////////////
/***********************************************************
* *
* delay 8*ucDelayCycle CYCLE *
* *
***********************************************************/
void DelayCycle(unsigned char ucCycle)
{
for(;ucCycle!=0;ucCycle--)
{
_nop_();
_nop_();
}
}
/***********************************************************
* *
* delay ucTime(ms) *
* *
***********************************************************/
void DelayTime(unsigned char ucTime)
{
unsigned char ucTmp;
for(;ucTime!=0;ucTime--)
{
#ifdef SYSTEMCRYSTAL
#if SYSTEMCRYSTAL == 11059200
for(ucTmp=0;ucTmp<135;ucTmp++)
#elif SYSTEMCRYSTAL == 12000000
for(ucTmp=0;ucTmp<124;ucTmp++)
#elif SYSTEMCRYSTAL == 18432000
for(ucTmp=0;ucTmp<80;ucTmp++)
#endif
#else
for(ucTmp=0;ucTmp<135;ucTmp++)
#endif
{
_nop_();
_nop_();
_nop_();
_nop_();
_nop_();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -