I try to re-integrate a legacy parallel port device into our current product family.
This device still ships with an old Compuware Driver::Works Driver.
Drivers for our other devices are all KMDF-based and share a common code base.
This parallel port device uses a non-standard interface,
which requires special signal line toggeling under program control.
I already
- allocated the parallel port,
- can access the device registers
- connected an WDM-style ISR with IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT
- got a PKINTERRUPT handle, and verified the ISR gets called
- can query the CM_RESOURCE_LIST of the parallel port.
Now for WDF-style ISR and Locking with WdfInterruptAcquireLock(), I’d require a WDFINTERRUPT object instead of WDM-style PKINTERRUPT.
Any chance? What would you do?
thanks for reading,
Joerg Hoppe
Wdf didn’t support this scenario. Wdf expects to create and destroy the underlying interrupt object so it can maintain state properly
d
Bent from my phone
From: xxxxx@t-online.demailto:xxxxx
Sent: ?3/?20/?2015 3:10 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Parallel port: Create WDFINTERRUPT from PKINTERRUPT?
I try to re-integrate a legacy parallel port device into our current product family.
This device still ships with an old Compuware Driver::Works Driver.
Drivers for our other devices are all KMDF-based and share a common code base.
This parallel port device uses a non-standard interface,
which requires special signal line toggeling under program control.
I already
- allocated the parallel port,
- can access the device registers
- connected an WDM-style ISR with IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT
- got a PKINTERRUPT handle, and verified the ISR gets called
- can query the CM_RESOURCE_LIST of the parallel port.
Now for WDF-style ISR and Locking with WdfInterruptAcquireLock(), I’d require a WDFINTERRUPT object instead of WDM-style PKINTERRUPT.
Any chance? What would you do?
thanks for reading,
Joerg Hoppe
—
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>
It’s not unusual for KMDF drivers to escape to WDM for odd things that KMDF does not support. What WDF-specific interrupt abstractions were you hoping to use?
For example, WdfInterruptAcquireLock is just a wrapper for KeAcquireInterruptSpinLock (assuming non-passive interrupts). Similarly, EVT_WDF_INTERRUPT_ISR is not much different than KSERVICE_ROUTINE.