timer.c

来自「WinCE 3.0 BSP, 包含Inter SA1110, Intel_815」· C语言 代码 · 共 41 行

C
41
字号
/* -*-C-*-
 *
 * $Revision: 1.4 $
 *   $Author: kwelton $
 *     $Date: 2000/08/08 21:45:52 $
 *
 * timer.c - ARM Timer interface routines: convert from Windows CE to uHAL
 *
 * Copyright (c) ARM Limited 1999.
 * All Rights Reserved.
 */

#if defined(FORCE_ARM720) || defined(FORCE_ARM920)
#include "timex20t.c"
#endif

#include "win_plat.h"

extern void  uHALr_InitTimers(void);
extern DWORD uHALr_RequestTimer(DWORD timer, const BYTE *string);
extern void  pHALr_EnableTimer(DWORD timer);
extern DWORD uHALr_SetTimerInterval(DWORD timer, DWORD interval);

DWORD SetTimerInterval(DWORD interval)
{
    return uHALr_SetTimerInterval(OS_TIMER, interval);
}

void InitClock(void)
{
    uHALr_InitTimers();

    if (uHALr_RequestTimer(OS_TIMER, (const BYTE *)"tick") == 0)
        lpWriteDebugStringFunc(TEXT("Timer/IRQ busy\r\n"));

    /* Start system timer & enable the interrupt. */
    pHALr_EnableTimer(OS_TIMER);
}

/* EOF timer.c */

⌨️ 快捷键说明

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