mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 20:43:25 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
93
win32ss/drivers/videoprt/timer.c
Normal file
93
win32ss/drivers/videoprt/timer.c
Normal file
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
* VideoPort driver
|
||||
*
|
||||
* Copyright (C) 2002, 2003, 2004 ReactOS Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include "videoprt.h"
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* PRIVATE FUNCTIONS **********************************************************/
|
||||
|
||||
VOID NTAPI
|
||||
IntVideoPortTimerRoutine(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PVOID ServiceContext)
|
||||
{
|
||||
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension = ServiceContext;
|
||||
|
||||
ASSERT(DeviceExtension->DriverExtension->InitializationData.HwTimer != NULL);
|
||||
|
||||
DeviceExtension->DriverExtension->InitializationData.HwTimer(
|
||||
&DeviceExtension->MiniPortDeviceExtension);
|
||||
}
|
||||
|
||||
BOOLEAN NTAPI
|
||||
IntVideoPortSetupTimer(
|
||||
IN PDEVICE_OBJECT DeviceObject,
|
||||
IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
|
||||
|
||||
DeviceExtension = (PVIDEO_PORT_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||
|
||||
if (DriverExtension->InitializationData.HwTimer != NULL)
|
||||
{
|
||||
INFO_(VIDEOPRT, "Initializing timer\n");
|
||||
|
||||
Status = IoInitializeTimer(
|
||||
DeviceObject,
|
||||
IntVideoPortTimerRoutine,
|
||||
DeviceExtension);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ERR_(VIDEOPRT, "IoInitializeTimer failed with status 0x%08x\n", Status);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* PUBLIC FUNCTIONS ***********************************************************/
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
||||
VOID NTAPI
|
||||
VideoPortStartTimer(IN PVOID HwDeviceExtension)
|
||||
{
|
||||
TRACE_(VIDEOPRT, "VideoPortStartTimer\n");
|
||||
IoStartTimer(VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension)->FunctionalDeviceObject);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
||||
VOID NTAPI
|
||||
VideoPortStopTimer(IN PVOID HwDeviceExtension)
|
||||
{
|
||||
TRACE_(VIDEOPRT, "VideoPortStopTimer\n");
|
||||
IoStopTimer(VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension)->FunctionalDeviceObject);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue