Re: PCI Interrupts
- From: "Maxim S. Shatskih" <maxim@xxxxxxxxxxxxxxxx>
- Date: Thu, 27 Apr 2006 23:43:55 +0400
Why not patch the driver source to use IoConnectInterrupt in
MN_START_DEVICE using the "coordinates" from the provided CM_RESOURCE_LIST?
Also do not forget to disable the interrupts on the device using
device-specific register on a) MN_REMOVE_DEVICE and b) powering down. The
power-up path must re-enable them.
After you will do so, you will be able to write your own
IOCTL_WAIT_FOR_INTERRUPT and such.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com
"Tony" <Tony@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:167A70F2-BC6F-492F-9CEB-221410D8CFF0@xxxxxxxxxxxxxxxx
The board comes with a device driver and I have the source for that. But ita
didn't provide anything nice to support interrupts. For example, I would love
to have an API that lets me register a callback for that device driver's PCI
interrupt, making all the PCI interrupt handling transparent. I don't care
about the details, just the fact that the interrupt occurred. That's it.
I obviously don't know much about device drivers for windows. This is WDM by
the way. Any pointers for this inverted call model you speak of?
Thanks,
Tony
"Don Burn" wrote:
Are you asking how to write a device driver that supports PCI interrupts?
If so look at almost any of the hardware samples in the DDK, in particular
good starting point might be PCIDRV.
Or are you asking how to let the application know the interrupt occurred?
There many approaches but the simplest and safest is the Inverted Call
model, where you send an IOCTL to the driver, and it is pended until the
interrupt occurs.
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
"Tony" <Tony@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5A7AA950-AD18-4400-AD80-9DDFFF923019@xxxxxxxxxxxxxxxx
I have a piece of hardware that generates a PCI interrupt.
On the PC I have a simple Win32 application running.
The application has to know when this PCI interrupt occurs.
The PCI driver I am using does not have any support for PCI interrupts.
How do I write code to detect that this interrupt occurred?
Thanks for any help.
Tony
.
- References:
- Re: PCI Interrupts
- From: Don Burn
- Re: PCI Interrupts
- Prev by Date: Re: MmAllocateContiguousMemory in x64
- Next by Date: Re: login on 1394
- Previous by thread: Re: PCI Interrupts
- Next by thread: How to create a WDM Virtual Device
- Index(es):
Relevant Pages
|