oemboot.c
来自「WinCE 3.0 BSP, 包含Inter SA1110, Intel_815」· C语言 代码 · 共 45 行
C
45 行
#include <windows.h>
#include <blcommon.h>
#include "bootldr.h"
#define BOOT_LOADER
#include "..\..\kernel\hal\debug.c"
CHAR FwGetChar(void)
{
int nVal;
while((nVal = OEMReadDebugByte()) == OEM_DEBUG_READ_NODATA)
{
;
}
if (nVal == OEM_DEBUG_COM_ERROR)
nVal = 0;
return((CHAR)nVal);
}
void FwPutChar(CHAR c)
{
OEMWriteDebugByte(c);
}
BOOL InitCounter(VOID)
{
PVRC5074_CONTROL pVrc5074 = (PVRC5074_CONTROL) (KSEG1_BASE | VRC5074_BASE);
pVrc5074->T1CTRL.Lo = 0x00989680;
pVrc5074->T1CTRL.Hi = 0x00000001;
pVrc5074->T2CTRL.Lo = 0xFFFFFFFF;
pVrc5074->T2CTRL.Hi = 0x00000007;
pVrc5074->T2CNTR.Lo = 0xFFFFFFFF;
return TRUE;
}
DWORD GetCounter(VOID)
{
PVRC5074_CONTROL pVrc5074 = (PVRC5074_CONTROL) (KSEG1_BASE | VRC5074_BASE);
return ((DWORD)((0xFFFFFFFF - pVrc5074->T2CNTR.Lo)/10));
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?