OpenCBM
|
Check and test the cable type. More...
Go to the source code of this file.
Functions | |
NTSTATUS | cbmiec_checkcable (PDEVICE_EXTENSION Pdx) |
Determine the type of cable (XA1541/XM1541) on the IEC bus. More... | |
VOID | cbmiec_setcablestate (PDEVICE_EXTENSION Pdx, CABLESTATE State) |
Set the current state of the cable detection. | |
BOOLEAN | cbmiec_is_cable_state_wrong (PDEVICE_EXTENSION Pdx) |
@@@ More... | |
#define PP_XA_ATN_IN 0x10 |
#define PP_XA_ATN_OUT 0x01 |
#define PP_XA_CLK_IN 0x20 |
#define PP_XA_CLK_OUT 0x02 |
#define PP_XA_DATA_IN 0x40 |
#define PP_XA_DATA_OUT 0x04 |
#define PP_XA_EOR_IN 0x80 |
#define PP_XA_EOR_OUT 0xcb |
#define PP_XA_RESET_IN 0x80 |
#define PP_XA_RESET_OUT 0x08 |
#define PP_XE_ATN_IN PP_XM_ATN_IN |
#define PP_XE_ATN_OUT PP_XM_ATN_OUT |
#define PP_XE_CLK_IN PP_XM_CLK_IN |
#define PP_XE_CLK_OUT PP_XM_CLK_OUT |
#define PP_XE_DATA_IN PP_XM_RESET_IN |
#define PP_XE_DATA_OUT PP_XM_RESET_OUT |
#define PP_XE_EOR_IN PP_XM_EOR_IN |
#define PP_XE_EOR_OUT PP_XM_EOR_OUT |
#define PP_XE_RESET_IN PP_XM_DATA_IN |
#define PP_XE_RESET_OUT PP_XM_DATA_OUT |
#define PP_XM_ATN_IN PP_XA_ATN_IN |
#define PP_XM_ATN_OUT PP_XA_ATN_OUT |
#define PP_XM_CLK_IN PP_XA_CLK_IN |
#define PP_XM_CLK_OUT PP_XA_CLK_OUT |
#define PP_XM_DATA_IN PP_XA_DATA_IN |
#define PP_XM_DATA_OUT PP_XA_DATA_OUT |
#define PP_XM_EOR_IN PP_XA_EOR_IN |
#define PP_XM_EOR_OUT 0xc4 |
#define PP_XM_RESET_IN PP_XA_RESET_IN |
#define PP_XM_RESET_OUT PP_XA_RESET_OUT |
#define READ | ( | _x | ) | ((((READ_PORT_UCHAR(OUT_PORT) ^ Pdx->IecOutEor)) & (_x)) ? 1 : 0) |
#define SHOW | ( | _x, | |
_y | |||
) |
#define SHOW1 | ( | ) |
@@@
Definition at line 169 of file checkcable.c.
NTSTATUS cbmiec_checkcable | ( | PDEVICE_EXTENSION | Pdx | ) |
Determine the type of cable (XA1541/XM1541) on the IEC bus.
This function tries to determine the type of cable with which the IEC bus is connected to the PC's parallel port. Afterwards, some variables in the device extension are initialized to reflect the type.
Pdx | Pointer to the device extension. |
Definition at line 334 of file checkcable.c.
References CABLESTATE_TESTED, CABLESTATE_UNKNOWN, CBMIEC_GET, cbmiec_setcablestate(), DBG_ERROR, DBG_PREFIX, DBG_SUCCESS, FUNC_ENTER, LogErrorString, OUT_PORT, PP_XA_ATN_IN, PP_XA_ATN_OUT, and READ_PORT_UCHAR.
Referenced by cbmiec_i_raw_read(), cbmiec_i_raw_write(), cbmiec_init(), and cbmiec_release_bus().
BOOLEAN cbmiec_is_cable_state_wrong | ( | PDEVICE_EXTENSION | Pdx | ) |
@@@
Pdx |
Definition at line 511 of file checkcable.c.
References CBMIEC_ARE_OUTPUT_LINES_CORRECT.
Referenced by cbm_execute_createopen().