📄 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 + -