OpenCBM
Macros | Functions
setrelease.c File Reference

Set a specific line on the IEC bus. More...

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

Go to the source code of this file.

Macros

#define SET_RELEASE_LINE(_LineName, _PPName)
 set and release line More...
 

Functions

NTSTATUS cbmiec_iec_setrelease (IN PDEVICE_EXTENSION Pdx, IN USHORT Set, IN USHORT Release)
 Activate and deactive a line on the IEC serial bus. More...
 

Detailed Description

Set a specific line on the IEC bus.



Author
Spiro Trikaliotis
Authors
Based on code from Michael Klein <michael(dot)klein(at)puffin(dot)lb(dot)shuttle(dot)de>

Definition in file setrelease.c.

Macro Definition Documentation

#define SET_RELEASE_LINE (   _LineName,
  _PPName 
)
Value:
if (Set & IEC_LINE_##_LineName) { set_mask |= PP_##_PPName##_OUT; } \
if (Release & IEC_LINE_##_LineName) { release_mask |= PP_##_PPName##_OUT; }

set and release line

This macro only makes sense in the context of cbmiec_iec_setrelease().

Definition at line 30 of file setrelease.c.

Referenced by cbmiec_iec_setrelease().

Function Documentation

NTSTATUS cbmiec_iec_setrelease ( IN PDEVICE_EXTENSION  Pdx,
IN USHORT  Set,
IN USHORT  Release 
)

Activate and deactive a line on the IEC serial bus.

This function activates (sets to 0V, L) and deactivates (set to 5V, H) lines on the IEC serial bus.

Parameters
PdxPointer to the device extension.
SetThe mask of which lines should be set. This has to be a bitwise OR between the constants IEC_DATA, IEC_CLOCK, IEC_ATN, and IEC_RESET
ReleaseThe mask of which lines should be released. This has to be a bitwise OR between the constants IEC_DATA, IEC_CLOCK, IEC_ATN, and IEC_RESET
Returns
If the routine succeeds, it returns STATUS_SUCCESS. Otherwise, it returns one of the error status values.
Remarks
If a bit is specified in the Set as well as in the Release mask, the effect is undefined.

Definition at line 59 of file setrelease.c.

References CBMIEC_SET_RELEASE, DBG_ASSERT, DBG_PREFIX, FUNC_ENTER, FUNC_PARAM, IEC_LINE_ATN, IEC_LINE_CLOCK, IEC_LINE_DATA, IEC_LINE_RESET, and SET_RELEASE_LINE.

Referenced by cbm_execute_devicecontrol(), cbmiec_iec_release(), and cbmiec_iec_set().