hal_wait.c

来自「ucos在NEC平台下的移植」· C语言 代码 · 共 27 行

C
27
字号
#include "mac_headers.h"
//#include <ctime>
//-------------------------------------------------------------------------------------------------------
//  void halWait(UINT16 timeout)
//
//  DESCRIPTION:
//      Runs an idle loop for [timeout] microseconds.
//      Note: The time spent in interruptions will be added to the timeout!
//
//  ARGUMENTS:
//      UINT16 timeout
//          The timeout in microseconds
//-------------------------------------------------------------------------------------------------------

//other macros
void halWait(UINT16 timeout) {

    //// This sequence uses exactly 8 clock cycle for each round
    //do {
    //    NOP();
    //    NOP();
    //    NOP();
    //    NOP();
    //} while (--timeout);
	//Sleep(timeout);

} // halWait

⌨️ 快捷键说明

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