OpenCBM
Functions
checkdevice.c File Reference

Fast IEC drive detection: Check if there is some device attached, and the bus is not blocked. More...

#include <wdm.h>
#include "cbm_driver.h"
#include "i_iec.h"

Go to the source code of this file.

Functions

NTSTATUS cbmiec_check_device (IN PDEVICE_EXTENSION Pdx, OUT IEC_CHECKDEVICE *CheckDevice)
 Fast IEC drive detection. More...
 

Detailed Description

Fast IEC drive detection: Check if there is some device attached, and the bus is not blocked.



Author
Spiro Trikaliotis
Authors
Based on code from SC written by Joe Forster & Wolfgang Moser

Definition in file checkdevice.c.

Function Documentation

NTSTATUS cbmiec_check_device ( IN PDEVICE_EXTENSION  Pdx,
OUT IEC_CHECKDEVICE CheckDevice 
)

Fast IEC drive detection.

This function has two purposes: First of all, it tries to find out if there are devices responding on the IEC bus. Secondly, it finds out if the bus is blocked by a device, for example, because the device is busy.

Parameters
PdxPointer to the device extension.
CheckDevicePointer to a IEC_CHECKDEVICE variable which will contain the status of the bus: IEC_CHECKDEVICE_NODEVICE indicates that there is no device attached, IEC_CHECKDEVICE_BUSBUSY indicates that the bus is still busy, and IEC_CHECKDEVICE_BUSFREE indicates we are free to use the bus.
Returns
If the routine succeeds, it returns STATUS_SUCCESS. Otherwise, it returns one of the error status values.

Definition at line 49 of file checkdevice.c.

References CBMIEC_GET, CBMIEC_RELEASE, cbmiec_schedule_timeout(), CBMIEC_SET, DBG_ASSERT, FUNC_ENTER, IEC_CHECKDEVICE_BUSBUSY, IEC_CHECKDEVICE_BUSFREE, IEC_CHECKDEVICE_NODEVICE, PP_ATN_OUT, PP_CLK_OUT, PP_DATA_IN, PP_DATA_OUT, and PP_RESET_OUT.

Referenced by cbmiec_wait_for_drives_ready().