📄 wdogtest.cpp
字号:
//------------------------------------------------------------------------------
//
// Copyright (C) 2006, Freescale Semiconductor, Inc. All Rights Reserved.
// THIS SOURCE CODE, AND ITS USE AND DISTRIBUTION, IS SUBJECT TO THE TERMS
// AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT
//
//------------------------------------------------------------------------------
//
// File: WDogTest.cpp
//
// This file contains test code for the Watchdog driver
//
//-----------------------------------------------------------------------------
#include <windows.h>
#include <Devload.h>
#include <ceddk.h>
#include "main.h"
#include "globals.h"
#include <Pkfuncs.h>
//-----------------------------------------------------------------------------
// External Functions
//-----------------------------------------------------------------------------
// External Variables
//-----------------------------------------------------------------------------
// Defines
//-----------------------------------------------------------------------------
// Local Functions
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Local Variables
//------------------------------------------------------------------------------
//
// Function: WDogSystemResetTest
//
// This function will cause watchdog to timout and a system reset
//
// Parameters:
// uiMsg
// [in] to determine if the shell wants to execute the test.
// tpParam
// [in] Ignored.
// lpFTE
// [in] Ignored.
//
// Returns:
// Specifies if the test passed (TPR_PASS), failed (TPR_NOT_HANDLED)
//
//------------------------------------------------------------------------------
TESTPROCAPI WDogSystemResetTest(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
int RetVal = IDNO;
// The shell doesn't necessarily want us to execute the test. Make sure first.
if(uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
g_pKato->Log(LOG_COMMENT, TEXT("Watchdog will timeout in 0.5 secs and reset the system\r\n"));
KernelIoControl(IOCTL_HAL_REBOOT, NULL, 0, NULL, 0, 0);
return TPR_PASS;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -