//粗略延时毫秒函数(系统时钟:72MHz)
void DelayMs(uint32_t t)
{
volatile uint32_t MsDelayCnt;
while(t--)
for(MsDelayCnt=0;MsDelayCnt<10280;MsDelayCnt++);
}
//粗略延时微秒函数(系统时钟:72MHz)
void DelayUs(uint32_t t)
{
volatile uint32_t UsDelayCnt;
while(t--)
for(UsDelayCnt=0;UsDelayCnt<10;UsDelayCnt++);
}
|
|