?? delays.c
字號(hào):
/*****************************************************************************
*
* File: delays.c
*
* Copyright S. Brennen Ball, 2006-2007
*
* The author provides no guarantees, warantees, or promises, implied or
* otherwise. By using this software you agree to indemnify the author
* of any damages incurred by using it.
*
*****************************************************************************/
//This code depends on a clock frequency of 40 MHz.
#include "delays.h"
#include <delays.h>
void DelayUS(unsigned long microseconds)
{
unsigned long count;
for(count = 0; count < microseconds; count++)
Delay10TCY();
}
void DelayMS(unsigned long milliseconds)
{
unsigned long count;
for(count = 0; count < milliseconds; count++)
Delay10KTCYx(1);
}
void DelayS(unsigned long seconds)
{
unsigned long count;
for(count = 0; count < seconds; count++)
{
Delay10KTCYx(250);
Delay10KTCYx(250);
Delay10KTCYx(250);
Delay10KTCYx(250);
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -