?? delay_loop.c
字號:
/*---------------------------------------------------------------*-
Delay_Loop.C(v1.00)
Author:06_Digital_Media
All Right Reserved
----------------------------------------------------------------
Create a simple software delay using a loop
-*--------------------------------------------------------------*/
#include "Main.H"
#include "Port.H"
#include "Delay_Loop.H"
/*---------------------------------------------------------------*-
Delay_Loop_Wait()
Delay duration varies with parameter
Parameter is *ROUGHLY* ,the delay , in milliseconds
on 12MHZ 8051(12 osc cycles)
You need to adjust the timing for your application
-*-------------------------------------------------------------*/
void DELAY_LOOP_Wait(const tWord DELAY_MS){
tWord x,y;
for(x=0;x<= DELAY_MS;x++)
for(y = 0;y<=120;y++);
}
/*------------------------------------------------------------*-
----------END OF FILE-------------------------------------------
-*---------------------------------------------------------------*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -