[BLUE] Perform size/rectangle boundary checks on read/write operations. CORE-15108
[reactos.git] / drivers / multimedia / audio / sb16_nt4.old / interrupt.c
1 /*
2 */
3
4 #include <sndblst.h>
5
6 BOOLEAN
7 CheckIrq(
8 PDEVICE_OBJECT DeviceObject)
9 {
10 /* PSOUND_BLASTER_PARAMETERS parameters = DeviceObject->DriverExtension;*/
11
12 /* TODO */
13
14 return TRUE;
15 }
16
17 BOOLEAN NTAPI
18 ServiceSoundBlasterInterrupt(
19 IN PKINTERRUPT Interrupt,
20 IN PVOID Context)
21 {
22 DPRINT("* Processing ISR *\n");
23 return FALSE;
24 }
25
26 NTSTATUS
27 EnableIrq(
28 PDEVICE_OBJECT DeviceObject)
29 {
30 PSOUND_BLASTER_PARAMETERS parameters = DeviceObject->DeviceExtension;
31 ULONG vector;
32 KIRQL irq_level;
33 KAFFINITY affinity;
34 NTSTATUS status = STATUS_SUCCESS;
35
36 vector = HalGetInterruptVector(Isa,
37 0,
38 parameters->irq,
39 parameters->irq,
40 &irq_level,
41 &affinity);
42
43 DPRINT("Vector is 0x%x\n", vector);
44
45 status = IoConnectInterrupt(&parameters->interrupt,
46 ServiceSoundBlasterInterrupt,
47 DeviceObject,
48 (PKSPIN_LOCK) NULL,
49 vector,
50 irq_level,
51 irq_level,
52 Latched, /* Latched / LevelSensitive */
53 FALSE, /* shareable */
54 affinity,
55 FALSE);
56
57 if ( status == STATUS_INVALID_PARAMETER )
58 status = STATUS_DEVICE_CONFIGURATION_ERROR;
59
60 return status;
61 }