📄 ioctl.c.svn-base
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
//------------------------------------------------------------------------------
//
// File: ioctl.c
//
// This file implements the OEM's IO Control (IOCTL) functions and declares
// global variables used by the IOCTL component.
//
#include <bsp.h>
//------------------------------------------------------------------------------
//
// Global: g_oalIoctlPlatformType/OEM
//
// Platform Type/OEM
//
LPCWSTR g_oalIoCtlPlatformType = L"SMDK2443 Board";
LPCWSTR g_oalIoCtlPlatformOEM = L"Samsung Electronics";
//------------------------------------------------------------------------------
//
// Global: g_oalIoctlProcessorVendor/Name/Core
//
// Processor information
//
LPCWSTR g_oalIoCtlProcessorVendor = L"Smasung Electronics";
LPCWSTR g_oalIoCtlProcessorName = L"S3C2443";
LPCWSTR g_oalIoCtlProcessorCore = L"ARM920T";
//------------------------------------------------------------------------------
//
// Global: g_oalIoctlInstructionSet
//
// Processor instruction set identifier
//
UINT32 g_oalIoCtlInstructionSet = 0; //IOCTL_PROCESSOR_INSTRUCTION_SET;
extern UINT32 g_oalIoCtlClockSpeed;// = 0;//IOCTL_PROCESSOR_CLOCK_SPEED;
BOOL OALIoCtlHalQueryDisplaySettings (UINT32 dwIoControlCode, VOID *lpInBuf, UINT32 nInBufSize, VOID *lpOutBuf, UINT32 nOutBufSize, UINT32* lpBytesReturned)
{
DWORD dwErr = 0;
RETAILMSG(0, (TEXT("In OALIoCtlHalQueryDisplaySettings^^^^^\r\n")));
if (lpBytesReturned) {
*lpBytesReturned = 0;
}
if (!lpOutBuf) {
dwErr = ERROR_INVALID_PARAMETER;
} else if (sizeof(DWORD)*3 > nOutBufSize) {
dwErr = ERROR_INSUFFICIENT_BUFFER;
} else {
// Check the boot arg structure for the default display settings.
__try {
((PDWORD)lpOutBuf)[0] = (DWORD)320;
((PDWORD)lpOutBuf)[1] = (DWORD)240;
((PDWORD)lpOutBuf)[2] = (DWORD)16;
if (lpBytesReturned) {
*lpBytesReturned = sizeof (DWORD) * 3;
}
} __except (EXCEPTION_EXECUTE_HANDLER) {
dwErr = ERROR_INVALID_PARAMETER;
}
}
if (dwErr) {
NKSetLastError (dwErr);
}
return !dwErr;
}
//------------------------------------------------------------------------------
//
// Global: g_oalIoCtlTable[]
//
// IOCTL handler table. This table includes the IOCTL code/handler pairs
// defined in the IOCTL configuration file. This global array is exported
// via oal_ioctl.h and is used by the OAL IOCTL component.
//
const OAL_IOCTL_HANDLER g_oalIoCtlTable[] = {
#include "ioctl_tab.h"
};
//------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -