248ae5e7fbfbb91dc19cf08e962a4d6734c63030
[reactos.git] / reactos / drivers / video / videoprt / interrupt.c
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 Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 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 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; see the file COPYING.LIB.
18 * If not, write to the Free Software Foundation,
19 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 *
21 * $Id: interrupt.c,v 1.1 2004/03/04 18:51:58 navaraf Exp $
22 */
23
24 #include "videoprt.h"
25
26 /*
27 * @implemented
28 */
29
30 VP_STATUS STDCALL
31 VideoPortEnableInterrupt(IN PVOID HwDeviceExtension)
32 {
33 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
34 BOOLEAN Status;
35
36 DPRINT("VideoPortEnableInterrupt\n");
37
38 DeviceExtension = CONTAINING_RECORD(
39 HwDeviceExtension,
40 VIDEO_PORT_DEVICE_EXTENSION,
41 MiniPortDeviceExtension);
42
43 Status = HalEnableSystemInterrupt(
44 DeviceExtension->InterruptVector,
45 0,
46 DeviceExtension->InterruptLevel);
47
48 return Status ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL;
49 }
50
51 /*
52 * @implemented
53 */
54
55 VP_STATUS STDCALL
56 VideoPortDisableInterrupt(IN PVOID HwDeviceExtension)
57 {
58 PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
59 BOOLEAN Status;
60
61 DPRINT("VideoPortDisableInterrupt\n");
62
63 DeviceExtension = CONTAINING_RECORD(
64 HwDeviceExtension,
65 VIDEO_PORT_DEVICE_EXTENSION,
66 MiniPortDeviceExtension);
67
68 Status = HalDisableSystemInterrupt(
69 DeviceExtension->InterruptVector,
70 0);
71
72 return Status ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL;
73 }