[APPHELP_APITEST] Add tests for SdbGetMatchingExe, to test matching on version resour...
[reactos.git] / reactos / drivers / multimedia / audio / sndblst.old / irq.c
1 #include <ntddk.h>
2 #include "sndblst.h"
3
4 #if 0
5 BOOLEAN CheckIRQ(PDEVICE_EXTENSION Parameters)
6 {
7 static CONST ULONG ValidIRQs[] = VALID_IRQS;
8 int i;
9
10 return TRUE; // for now...
11
12 // Check for Compaq!
13 // if ...
14
15 for (i = 0; ValidIRQs[i] != 0xffff; i ++)
16 {
17 // Consult the card
18
19 // OUTPORT(pHw, BOARD_CONFIG, bConfig);
20 // if (INPORT(pHEW, BOARD_ID) & 0x40)
21 // pHW->ValidInterrupts |= (1 << ThisIRQ);
22
23 // return (BOOLEAN)((pHw->ValidInterrupts & (1 << Interrupt)) &&
24 // (! ((INPORT(pHw, BOARD_ID) & 0x80) &&
25 // (Interrupt == 10 || Interrupt == 11)));
26
27 }
28
29 // else
30 // Compaq stuff?
31 {
32 UCHAR Expected;
33
34 switch (Parameters->IRQ)
35 {
36 case 10 : Expected = 0x10;
37 case 11 : Expected = 0x20;
38 case 7 : Expected = 0x30;
39 default : return FALSE;
40 }
41
42 // CompaqPIDR = READ_PORT_UCHAR( ... )
43 // ...
44 }
45 }
46
47
48
49 BOOLEAN ISR(
50 IN PKINTERRUPT pInterrupt,
51 IN PVOID Context)
52 {
53 DPRINT("*** Processing ISR ***\n");
54
55 // What do we do here then?
56
57 return FALSE;
58 }
59
60
61
62 NTSTATUS EnableIRQ(PDEVICE_OBJECT DeviceObject)
63 {
64 PDEVICE_EXTENSION Parameters = DeviceObject->DeviceExtension;
65 ULONG Vector;
66 KIRQL IRQ_Level;
67 KAFFINITY Affinity;
68 NTSTATUS Status = STATUS_SUCCESS;
69
70 Vector = HalGetInterruptVector(Isa, // FIX THIS
71 0, // FIX THIS
72 Parameters->IRQ,
73 Parameters->IRQ,
74 &IRQ_Level,
75 &Affinity);
76
77 // Status = IoConnectInterrupt(Parameters->Interrupt, // Object
78 // ISR, // Function
79 // DeviceObject, // Context
80 // (PKSPIN_LOCK) NULL,
81 // Vector,
82 // IRQ_Level,
83 // IRQ_Level,
84 // mode - Latched or Level sensitive?
85 // share - if irq can be shared
86 // Affinity,
87 // FALSE);
88
89 return Status == STATUS_INVALID_PARAMETER ?
90 STATUS_DEVICE_CONFIGURATION_ERROR : Status;
91 }
92 #endif
93