4 * Copyright (C) 2002, 2003, 2004 ReactOS Team
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 /* PRIVATE FUNCTIONS **********************************************************/
27 IntVideoPortTimerRoutine(
28 IN PDEVICE_OBJECT DeviceObject
,
29 IN PVOID ServiceContext
)
31 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension
= ServiceContext
;
33 ASSERT(DeviceExtension
->DriverExtension
->InitializationData
.HwTimer
!= NULL
);
35 DeviceExtension
->DriverExtension
->InitializationData
.HwTimer(
36 &DeviceExtension
->MiniPortDeviceExtension
);
40 IntVideoPortSetupTimer(
41 IN PDEVICE_OBJECT DeviceObject
,
42 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
)
45 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension
;
47 DeviceExtension
= (PVIDEO_PORT_DEVICE_EXTENSION
)DeviceObject
->DeviceExtension
;
49 if (DriverExtension
->InitializationData
.HwTimer
!= NULL
)
51 INFO_(VIDEOPRT
, "Initializing timer\n");
53 Status
= IoInitializeTimer(
55 IntVideoPortTimerRoutine
,
58 if (!NT_SUCCESS(Status
))
60 WARN_(VIDEOPRT
, "IoInitializeTimer failed with status 0x%08x\n", Status
);
68 /* PUBLIC FUNCTIONS ***********************************************************/
75 VideoPortStartTimer(IN PVOID HwDeviceExtension
)
77 TRACE_(VIDEOPRT
, "VideoPortStartTimer\n");
78 IoStartTimer(VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension
)->FunctionalDeviceObject
);
86 VideoPortStopTimer(IN PVOID HwDeviceExtension
)
88 TRACE_(VIDEOPRT
, "VideoPortStopTimer\n");
89 IoStopTimer(VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension
)->FunctionalDeviceObject
);