OpenCBM
Macros | Functions
dbgwrite.c File Reference

Write a RAW byte to the parallel port OUT port (Control Port) More...

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

Go to the source code of this file.

Macros

#define PARALLEL_CONTROL_PORT_MASK_VALUES   0x0F
 

Functions

NTSTATUS cbmiec_iec_dbg_write (IN PDEVICE_EXTENSION Pdx, IN UCHAR Value)
 Write a byte to the parallel port output register. More...
 

Detailed Description

Write a RAW byte to the parallel port OUT port (Control Port)



Author
Spiro Trikaliotis

Definition in file dbgwrite.c.

Macro Definition Documentation

#define PARALLEL_CONTROL_PORT_MASK_VALUES   0x0F

The bits not to be masked off for cbmiec_iec_dbg_write()

Definition at line 25 of file dbgwrite.c.

Referenced by cbmiec_iec_dbg_write().

Function Documentation

NTSTATUS cbmiec_iec_dbg_write ( IN PDEVICE_EXTENSION  Pdx,
IN UCHAR  Value 
)

Write a byte to the parallel port output register.

This function writes a byte to the parallel port output register. (CONTROL_PORT). It is a helper function for debugging the cable (i.e., for the XCDETECT tool) only!

Parameters
PdxPointer to the device extension.
ValueThe value to set the control port to
Returns
If the routine succeeds, it returns STATUS_SUCCESS. Otherwise, it returns one of the error status values.
Remarks
Do not use this function in anything but a debugging aid tool like XCDETECT!

After this function has been called, it is NOT safe to use the parallel port driver unless you close the driver and open it again!

This functions masks some bits off. That is, the bits not in the mask are not changed at all. The bits that are not masked off are defined in PARALLEL_CONTROL_PORT_MASK_VALUES.

Definition at line 56 of file dbgwrite.c.

References DBG_PREFIX, DBG_PRINT, FUNC_ENTER, OUT_PORT, PARALLEL_CONTROL_PORT_MASK_VALUES, and WRITE_PORT_UCHAR.

Referenced by cbm_execute_devicecontrol().