EnTech Taiwan EnTech Taiwan
January 23, 2018, 01:10:34 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
   Home   Help Search Login Register  
Pages: [1]
Author Topic: IRQClearRec and IrqShareRec structure RapidDriver  (Read 3588 times)

Posts: 1

« on: May 24, 2010, 07:46:39 AM »


I'm currently building an application which will handle an interrupt from a custom PCI device.
To do that I install a device (RapidPCI.sys Driver) and I test (Handle) the interrupt function with the RapidDriver Interface and I see the counter increasing each time the interrupt is generate.
I configure my application to do the same.... and I look at the c# example given.

When the interrupt is generated, I got a BOD with "IRQL_NOT_LESS_OR_EQUAL" message.
Maybe I made a mistake..... but when I execute and configure your c# example to handle this interrupt, I got the same result.... BOD.

I suspect the structure of IRQClearRec and IrqShareRec to be not correct in the example....
in c# example

      [StructLayout(LayoutKind.Explicit)] public struct IrqClearRec
         [FieldOffset(0)] public byte ClearIrq;  // 1 - Irq must be cleared, 0 - not
         [FieldOffset(1)] public byte BarNumber;  // Memory or port i/o register base address to clear
         [FieldOffset(2)] public byte WideOfRegister;  // 1 - Byte, 2 - Word, 4 - Double Word
         [FieldOffset(3)] public byte ReadOrWrite;  // 0 - read register to clear Irq, 1 - write
         [FieldOffset(4)] public uint  RegOffset;  // Register offset
         [FieldOffset(Cool] public uint  ValueToWrite;  // Value to write (if ReadOrWrite=1)

in the rapiddriver.pdf

                 typedef struct _IRQ_CLEAR_REC
                      UCHAR ClearIrq; // 1 - Irq must be cleared, 0 - not
                      UCHAR TypeOfRegister; // 0 - memory-mapped register, 1 - port
                      UCHAR WideOfRegister; // wide of register: 1-Byte,2-Word,4-Double Word
                      UCHAR ReadOrWrite; // 0 - read register to clear Irq, 1 - write
                      ULONG RegBaseAddress; // register base address
                      ULONG RegOffset; // register offset (in bytes)
                      ULONG ValueToWrite; // value to write (if ReadOrWrite=1)
                  } IRQ_CLEAR_REC, * PIRQ_CLEAR_REC;

Thanks a lot for any reply.
Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.15 | SMF © 2006-2008, Simple Machines Valid XHTML 1.0! Valid CSS!