ReactOS  0.4.14-dev-1233-gf5658fd
timer.c
Go to the documentation of this file.
1 /*
2  * VideoPort driver
3  *
4  * Copyright (C) 2002, 2003, 2004 ReactOS Team
5  *
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.
10  *
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.
15  *
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
19  *
20  */
21 
22 #include "videoprt.h"
23 
24 #define NDEBUG
25 #include <debug.h>
26 
27 /* PRIVATE FUNCTIONS **********************************************************/
28 
29 VOID NTAPI
33 {
35 
37 
38  DeviceExtension->DriverExtension->InitializationData.HwTimer(
39  &DeviceExtension->MiniPortDeviceExtension);
40 }
41 
46 {
48  PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
49 
51 
52  if (DriverExtension->InitializationData.HwTimer != NULL)
53  {
54  INFO_(VIDEOPRT, "Initializing timer\n");
55 
59  DeviceExtension);
60 
61  if (!NT_SUCCESS(Status))
62  {
63  ERR_(VIDEOPRT, "IoInitializeTimer failed with status 0x%08x\n", Status);
64  return FALSE;
65  }
66  }
67 
68  return TRUE;
69 }
70 
71 /* PUBLIC FUNCTIONS ***********************************************************/
72 
73 /*
74  * @implemented
75  */
76 
77 VOID NTAPI
78 VideoPortStartTimer(IN PVOID HwDeviceExtension)
79 {
80  TRACE_(VIDEOPRT, "VideoPortStartTimer\n");
82 }
83 
84 /*
85  * @implemented
86  */
87 
88 VOID NTAPI
89 VideoPortStopTimer(IN PVOID HwDeviceExtension)
90 {
91  TRACE_(VIDEOPRT, "VideoPortStopTimer\n");
93 }
#define IN
Definition: typedefs.h:39
#define TRUE
Definition: types.h:120
#define INFO_(ch,...)
Definition: debug.h:159
VOID NTAPI IoStartTimer(IN PDEVICE_OBJECT DeviceObject)
Definition: iotimer.c:133
VIDEO_PORT_DRIVER_EXTENSION * DriverExtension
Definition: videoprt.h:103
VIDEO_HW_INITIALIZATION_DATA InitializationData
Definition: videoprt.h:72
BOOLEAN NTAPI IntVideoPortSetupTimer(IN PDEVICE_OBJECT DeviceObject, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension)
Definition: timer.c:43
#define ERR_(ch,...)
Definition: debug.h:156
LONG NTSTATUS
Definition: precomp.h:26
struct _VIDEO_PORT_DEVICE_EXTENSTION * PVIDEO_PORT_DEVICE_EXTENSION
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:137
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
VOID NTAPI IoStopTimer(PDEVICE_OBJECT DeviceObject)
Definition: iotimer.c:166
PVOID DeviceExtension
Definition: env_spec_w32.h:418
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
#define TRACE_(x)
Definition: compat.h:66
VOID NTAPI IntVideoPortTimerRoutine(IN PDEVICE_OBJECT DeviceObject, IN PVOID ServiceContext)
Definition: timer.c:30
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
NTSTATUS NTAPI IoInitializeTimer(IN PDEVICE_OBJECT DeviceObject, IN PIO_TIMER_ROUTINE TimerRoutine, IN PVOID Context)
Definition: iotimer.c:92
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID ServiceContext
Definition: iofuncs.h:798
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
PPCI_DRIVER_EXTENSION DriverExtension
Definition: pci.c:41
Status
Definition: gdiplustypes.h:24
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT * FunctionalDeviceObject
Definition: ndis.h:4640
VOID NTAPI VideoPortStartTimer(IN PVOID HwDeviceExtension)
Definition: timer.c:78
PVIDEO_HW_TIMER HwTimer
Definition: video.h:673
VOID NTAPI VideoPortStopTimer(IN PVOID HwDeviceExtension)
Definition: timer.c:89