ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

irq.c
Go to the documentation of this file.
00001 #include <ntddk.h>
00002 #include "sndblst.h"
00003 
00004 #if 0
00005 BOOLEAN CheckIRQ(PDEVICE_EXTENSION Parameters)
00006 {
00007     static CONST ULONG ValidIRQs[] = VALID_IRQS;
00008     int i;
00009 
00010     return TRUE;    // for now...
00011 
00012     // Check for Compaq!
00013     // if ...
00014 
00015     for (i = 0; ValidIRQs[i] != 0xffff; i ++)
00016     {
00017         // Consult the card
00018 
00019 //        OUTPORT(pHw, BOARD_CONFIG, bConfig);
00020 //        if (INPORT(pHEW, BOARD_ID) & 0x40)
00021 //            pHW->ValidInterrupts |= (1 << ThisIRQ);
00022 
00023 //        return (BOOLEAN)((pHw->ValidInterrupts & (1 << Interrupt)) &&
00024 //                        (! ((INPORT(pHw, BOARD_ID) & 0x80) &&
00025 //                        (Interrupt == 10 || Interrupt == 11)));
00026 
00027     }
00028 
00029     // else
00030     // Compaq stuff?
00031     {
00032         UCHAR Expected;
00033 
00034         switch (Parameters->IRQ)
00035         {
00036             case 10 :   Expected = 0x10;
00037             case 11 :   Expected = 0x20;
00038             case 7 :    Expected = 0x30;
00039             default :   return FALSE;
00040         }
00041 
00042 //        CompaqPIDR = READ_PORT_UCHAR( ... )
00043         // ...
00044     }
00045 }
00046 
00047 
00048 
00049 BOOLEAN ISR(
00050     IN PKINTERRUPT pInterrupt,
00051     IN PVOID Context)
00052 {
00053     DPRINT("*** Processing ISR ***\n");
00054 
00055     // What do we do here then?
00056 
00057     return FALSE;
00058 }
00059 
00060 
00061 
00062 NTSTATUS EnableIRQ(PDEVICE_OBJECT DeviceObject)
00063 {
00064     PDEVICE_EXTENSION Parameters = DeviceObject->DeviceExtension;
00065     ULONG Vector;
00066     KIRQL IRQ_Level;
00067     KAFFINITY Affinity;
00068     NTSTATUS Status = STATUS_SUCCESS;
00069 
00070     Vector = HalGetInterruptVector(Isa,     // FIX THIS
00071                                    0,       // FIX THIS
00072                                    Parameters->IRQ,
00073                                    Parameters->IRQ,
00074                                    &IRQ_Level,
00075                                    &Affinity);
00076 
00077 //    Status = IoConnectInterrupt(Parameters->Interrupt,  // Object
00078 //                                ISR,    // Function
00079 //                                DeviceObject,   // Context
00080 //                                (PKSPIN_LOCK) NULL,
00081 //                                Vector,
00082 //                                IRQ_Level,
00083 //                                IRQ_Level,
00084                                 // mode - Latched or Level sensitive?
00085                                 // share - if irq can be shared
00086 //                                Affinity,
00087 //                                FALSE);
00088 
00089     return Status == STATUS_INVALID_PARAMETER ?
00090                      STATUS_DEVICE_CONFIGURATION_ERROR : Status;
00091 }
00092 #endif
00093 

Generated on Sun May 27 2012 04:28:00 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.