📄 time.h
字号:
/******************************************************************************
* Filename : time.h *
* Program : loader. *
* Copyright : Copyright (C) 2001, Young-Su, Ahn. *
* Author : Young-Su, Ahn <nurie@dreamwiz.com> *
* Description : Header file for time.c. *
* Created at : Wed Mar 13 2001. *
* Based on : blob-1.0.8-pre2 (http://www.lart.tudelft.nl) *
* Modified by : *
* Modified at : *
******************************************************************************/
/* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _TIME_H_416463482947123749237434
#define _TIME_H_416463482947123749237434
#include "types.h"
#define HZ (32768)
#define TICKS_PER_SECOND (3686400)
#define RCNR (*((volatile ulong *)(0x90010004)))
#define PCFR (*((volatile ulong *)(0x90020010)))
#define RTSR (*((volatile ulong *)(0x90010010)))
#define PCFR_FO (0x00000008)
#define RTSR_AL (0x00000001)
#define RTSR_HZ (0x00000002)
#define RTSR_ALE (0x00000004)
#define RTSR_HZE (0x00000008)
// Prototypes.
void TimerInit(void);
void TimerInit2(void);
/* returns the time in 1/TICKS_PER_SECOND seconds */
ulong GetTime(void);
ulong TimerGetTime(void);
int TimerDetectOverflow(void);
void TimerClearOverflow(void);
/* suspend execution for interval of milliseconds */
void msleep(unsigned int msec);
#endif // end _TIME_H_416463482947123749237434.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -