OpenCBM
|
Functions for locking und unlocking the driver onto the parallel port. More...
Go to the source code of this file.
Functions | |
NTSTATUS | cbm_lock_parport (IN PDEVICE_EXTENSION Pdx) |
Lock the parallel port for the driver. More... | |
NTSTATUS | cbm_unlock_parport (IN PDEVICE_EXTENSION Pdx) |
Unlock the parallel port for the driver. More... | |
NTSTATUS | cbm_lock (IN PDEVICE_EXTENSION Pdx) |
Lock the parallel port for the driver. More... | |
NTSTATUS | cbm_unlock (IN PDEVICE_EXTENSION Pdx) |
Unlock the parallel port for the driver. More... | |
Functions for locking und unlocking the driver onto the parallel port.
Definition in file lockunlock.c.
NTSTATUS cbm_lock | ( | IN PDEVICE_EXTENSION | Pdx | ) |
Lock the parallel port for the driver.
This function locks the driver onto the parallel port. This way, no other program or driver can allocate the parallel port and interfere with the communication.
Pdx | Pointer to the device extension. |
Note that it is not necessary to call this function (or cbm_unlock()) when all communication is done with the handle to opencbm open (that is, between cbm_driver_open() and cbm_driver_close(). You only need this function to pin the driver to the port even when cbm_driver_close() is to be executed (for example, because the program terminates).
Definition at line 179 of file lockunlock.c.
References DBG_PREFIX, DBG_PRINT, and FUNC_ENTER.
NTSTATUS cbm_lock_parport | ( | IN PDEVICE_EXTENSION | Pdx | ) |
Lock the parallel port for the driver.
This function locks the driver onto the parallel port, so we can use the port afterwards.
Pdx | Pointer to the device extension. |
Definition at line 39 of file lockunlock.c.
References cbm_init_registry(), cbm_isr(), cbmiec_init(), cbmiec_release_bus(), DBG_ASSERT, DBG_PREFIX, DBG_PRINT, FUNC_ENTER, ParPortAllocate(), ParPortAllocInterrupt(), ParPortFree(), ParPortFreeInterrupt(), ParPortSetMode(), and ParPortUnsetMode().
Referenced by cbm_execute_createopen(), and cbm_execute_devicecontrol().
NTSTATUS cbm_unlock | ( | IN PDEVICE_EXTENSION | Pdx | ) |
Unlock the parallel port for the driver.
This function unlocks the driver from the parallel port. This way, other programs and drivers can allocate the parallel port and do their own communication with whatever device they use.
Pdx | Pointer to the device extension. |
Definition at line 208 of file lockunlock.c.
References DBG_PREFIX, DBG_PRINT, and FUNC_ENTER.
NTSTATUS cbm_unlock_parport | ( | IN PDEVICE_EXTENSION | Pdx | ) |
Unlock the parallel port for the driver.
This function unlocks the driver from the parallel port after the port has been used.
Pdx | Pointer to the device extension. |
Definition at line 128 of file lockunlock.c.
References cbmiec_release_bus(), DBG_ASSERT, DBG_PREFIX, DBG_PRINT, FUNC_ENTER, ParPortFree(), ParPortFreeInterrupt(), and ParPortUnsetMode().
Referenced by cbm_execute_close(), cbm_execute_createopen(), and DriverUnload().