ReactOS 0.4.15-dev-8058-ga7cbb60
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
33{
35
37
39 &DeviceExtension->MiniPortDeviceExtension);
40}
41
46{
48 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
49
50 DeviceExtension = (PVIDEO_PORT_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
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
78VideoPortStartTimer(IN PVOID HwDeviceExtension)
79{
80 TRACE_(VIDEOPRT, "VideoPortStartTimer\n");
82}
83
84/*
85 * @implemented
86 */
87
89VideoPortStopTimer(IN PVOID HwDeviceExtension)
90{
91 TRACE_(VIDEOPRT, "VideoPortStopTimer\n");
93}
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define TRACE_(x)
Definition: compat.h:76
Status
Definition: gdiplustypes.h:25
NTSTATUS NTAPI IoInitializeTimer(IN PDEVICE_OBJECT DeviceObject, IN PIO_TIMER_ROUTINE TimerRoutine, IN PVOID Context)
Definition: iotimer.c:92
VOID NTAPI IoStartTimer(IN PDEVICE_OBJECT DeviceObject)
Definition: iotimer.c:133
VOID NTAPI IoStopTimer(PDEVICE_OBJECT DeviceObject)
Definition: iotimer.c:166
if(dx< 0)
Definition: linetemp.h:194
#define ASSERT(a)
Definition: mode.c:44
_Inout_opt_ PDEVICE_OBJECT _Inout_opt_ PDEVICE_OBJECT * FunctionalDeviceObject
Definition: ndis.h:4641
PPCI_DRIVER_EXTENSION DriverExtension
Definition: pci.c:31
#define INFO_(ch,...)
Definition: debug.h:159
#define ERR_(ch,...)
Definition: debug.h:156
PVIDEO_HW_TIMER HwTimer
Definition: video.h:681
VIDEO_PORT_DRIVER_EXTENSION * DriverExtension
Definition: videoprt.h:103
CHAR POINTER_ALIGNMENT MiniPortDeviceExtension[1]
Definition: videoprt.h:113
VIDEO_HW_INITIALIZATION_DATA InitializationData
Definition: videoprt.h:72
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39
#define VIDEO_PORT_GET_DEVICE_EXTENSION(MiniportExtension)
Definition: videoprt.h:140
struct _VIDEO_PORT_DEVICE_EXTENSTION * PVIDEO_PORT_DEVICE_EXTENSION
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
VOID NTAPI IntVideoPortTimerRoutine(IN PDEVICE_OBJECT DeviceObject, IN PVOID ServiceContext)
Definition: timer.c:30
BOOLEAN NTAPI IntVideoPortSetupTimer(IN PDEVICE_OBJECT DeviceObject, IN PVIDEO_PORT_DRIVER_EXTENSION DriverExtension)
Definition: timer.c:43
VOID NTAPI VideoPortStartTimer(IN PVOID HwDeviceExtension)
Definition: timer.c:78
VOID NTAPI VideoPortStopTimer(IN PVOID HwDeviceExtension)
Definition: timer.c:89
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID ServiceContext
Definition: iofuncs.h:801