📄 delay.c
字号:
#include "SPCE061V004.h"
//extern unsigned int goods_sign;//商品存在标志位,0为货物有存货,1代表货物无存货
//extern unsigned int sell_sign;//商品正常出货标志为,0为存在可以正常出货,1代表不能正常出货
//extern unsigned int sign;
//extern unsigned int money;
void DELAY(unsigned int Timers)//系统频率设置为49.152MHz,强振模式
{
unsigned int i;
while(Timers)
{
for(i=0;i<0x7fff;i++)//1ms
{
*P_Watchdog_Clear=C_WDTCLR;
}
Timers--;
}
}
void Delayus(unsigned int DelayTimes) //uS 微秒级延时
{
while(--DelayTimes); //12Mhz 下,延时DelayTimes*2+3 微秒
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -