31 #define READ_TIMEOUT_VALUE(_what_, _default_) \
33 libiec_global_timeouts._what_ = _default_; \
34 if (HKey) cbm_registry_read_ulong(*HKey, L#_what_, &libiec_global_timeouts._what_); \
47 cbmiec_timeouts_init(IN PHANDLE HKey)
101 #undef READ_TIMEOUT_VALUE
120 if (!Pdx->DoNotReleaseBus)
125 FUNC_LEAVE_NTSTATUS_CONST(STATUS_SUCCESS);
145 Pdx->IecCableUserSet = CableType;
153 cbm_check_irq_availability(IN PDEVICE_EXTENSION Pdx)
163 if (Pdx->ParallelPortAllocatedInterrupt)
165 DBG_IRQ((
DBG_PREFIX "* Allocated interrupt"));
208 DBG_IRQL( == PASSIVE_LEVEL);
209 KeInitializeEvent(&Pdx->EventWaitForListener, SynchronizationEvent, FALSE);
216 DBG_IRQL( == PASSIVE_LEVEL)
217 IoInitializeDpcRequest(Pdx->Fdo, cbmiec_dpc);
219 #endif // #ifdef USE_DPC
223 if (!NT_SUCCESS(ntStatus)) {
224 FUNC_LEAVE_NTSTATUS(ntStatus);
227 Pdx->IecBusy = FALSE;
229 if (!Pdx->DoNotReleaseBus)
232 cbm_check_irq_availability(Pdx);
235 FUNC_LEAVE_NTSTATUS_CONST(STATUS_SUCCESS);
257 cbmiec_timeouts_init(HKey);
259 FUNC_LEAVE_NTSTATUS_CONST(STATUS_SUCCESS);
#define PP_ATN_OUT
The ATN OUT bit.
#define PP_DATA_OUT
The DATA OUT bit.
IEC_TIMEOUTS libiec_global_timeouts
enum iec_cabletype IEC_CABLETYPE
#define PP_RESET_OUT
The RESET OUT bit.
Internal functions and definitions of the libiec library.
#define PP_LP_BIDIR
Bit for setting set bidirectional mode of the LPT.
NTSTATUS cbmiec_cleanup(IN PDEVICE_EXTENSION Pdx)
Cleanup the IEC bus.
VOID cbmiec_release_bus(IN PDEVICE_EXTENSION Pdx)
Release the IEC bus.
#define PP_LP_IRQ
Bit for allowing interrupts of the LPT.
#define READ_TIMEOUT_VALUE(_what_, _default_)
NTSTATUS cbmiec_global_init(IN PHANDLE HKey)
Initialization for libiec which are global in nature.
VOID cbmiec_setcablestate(PDEVICE_EXTENSION Pdx, CABLESTATE State)
Set the current state of the cable detection.
NTSTATUS cbmiec_test_irq(IN PDEVICE_EXTENSION Pdx, OUT PVOID Buffer, IN ULONG BufferLength)
Test for IRQ capabilities.
VOID cbmiec_set_cabletype(IN PDEVICE_EXTENSION Pdx, IN IEC_CABLETYPE CableType)
Set the type of the IEC cable.
#define CBMIEC_RELEASE(_rel)
#define PP_CLK_OUT
The CLOCK OUT bit.
NTSTATUS cbmiec_checkcable(PDEVICE_EXTENSION Pdx)
Determine the type of cable (XA1541/XM1541) on the IEC bus.
Definitions for the opencbm driver.
#define LogErrorOnly(_Fdo_, _UniqueErrorValue_)
NTSTATUS cbmiec_init(IN PDEVICE_EXTENSION Pdx)
Initialize the IEC bus.