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
27 /* PRIVATE FUNCTIONS **********************************************************/
30 IntVideoPortTimerRoutine(
31 IN PDEVICE_OBJECT DeviceObject
,
32 IN PVOID ServiceContext
)
34 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension
= ServiceContext
;
36 ASSERT(DeviceExtension
->DriverExtension
->InitializationData
.HwTimer
!= NULL
);
38 DeviceExtension
->DriverExtension
->InitializationData
.HwTimer(
39 &DeviceExtension
->MiniPortDeviceExtension
);
43 IntVideoPortSetupTimer(
44 IN PDEVICE_OBJECT DeviceObject
,
45 IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension
)
48 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension
;
50 DeviceExtension
= (PVIDEO_PORT_DEVICE_EXTENSION
)DeviceObject
->DeviceExtension
;
52 if (DriverExtension
->InitializationData
.HwTimer
!= NULL
)
54 INFO_(VIDEOPRT
, "Initializing timer\n");
56 Status
= IoInitializeTimer(
58 IntVideoPortTimerRoutine
,
61 if (!NT_SUCCESS(Status
))
63 ERR_(VIDEOPRT
, "IoInitializeTimer failed with status 0x%08x\n", Status
);
71 /* PUBLIC FUNCTIONS ***********************************************************/
78 VideoPortStartTimer(IN PVOID HwDeviceExtension
)
80 TRACE_(VIDEOPRT
, "VideoPortStartTimer\n");
81 IoStartTimer(VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension
)->FunctionalDeviceObject
);
89 VideoPortStopTimer(IN PVOID HwDeviceExtension
)
91 TRACE_(VIDEOPRT
, "VideoPortStopTimer\n");
92 IoStopTimer(VIDEO_PORT_GET_DEVICE_EXTENSION(HwDeviceExtension
)->FunctionalDeviceObject
);