wait.c

来自「CC1110点对多点FDMA传输方式C源码」· C语言 代码 · 共 45 行

C
45
字号
/******************************************************************************
*                                                                             *
*    ****       ******       ****
*     ****     ********     ****
*      ****   ****  ****   ****
*       **** ****    **** ****              wxl
*        *******      *******
*         *****        *****                    成都无线龙通讯科技有限公司
*                                                                             *
*******************************************************************************
Target:       cc1110                          使用芯片:       cc1110
Author:       WXL                             程 序 员:      无线龙
data:         1/12-2007                       日    期:      1/12-2007
******************************************************************************/
/**********************************头文件**************************************/
#include "hal.h"


//-----------------------------------------------------------------------------
// See hal.h for a description of this function.
//-----------------------------------------------------------------------------

UINT32 Wait_Count(BYTE wait)
{
   UINT32 Wait;
   Wait = ((UINT16) (wait << 7));
   Wait += 59*Wait;
   return Wait;
}

void halWait(BYTE wait){
   UINT32 largeWait;

   if(wait == 0)
   {return;}

   largeWait = ((UINT16) (wait << 7));
   largeWait += 59*wait;

   largeWait = (largeWait >> CLKSPD);
   while(largeWait--);

   return;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?