Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

cbmioctl.h File Reference

Define the IOCTL codes for the opencbm driver. More...

Go to the source code of this file.

Defines

#define CBM_REGKEY_SERVICE   "System\\CurrentControlSet\\Services\\opencbm"
#define CBM_REGKEY_SERVICE_DEFAULTLPT   "DefaultLpt"
#define CBM_REGKEY_SERVICE_IECCABLE   "IecCable"
#define CBM_REGKEY_SERVICE_PERMLOCK   "PermanentlyLock"
#define CBM_REGKEY_SERVICE_DEBUGFLAGS   "DebugFlags"
#define CBM_REGKEY_SERVICE_DLL_DEBUGFLAGS   "DllDebugFlags"
#define OPENCBM_DRIVERNAME   "opencbm"
#define CBMDEVICENAME_MAINPART   "\\\\.\\" OPENCBM_DRIVERNAME
#define IEC_LINE_DATA   0x01
#define IEC_LINE_CLOCK   0x02
#define IEC_LINE_ATN   0x04
#define IEC_LINE_RESET   0x08
#define CBMT_I_INSTALL_OUT_GET_VERSION_MAJOR(_x)   (((_x) >> 24) & 0xFF)
#define CBMT_I_INSTALL_OUT_GET_VERSION_MINOR(_x)   (((_x) >> 16) & 0xFF)
#define CBMT_I_INSTALL_OUT_GET_VERSION_SUBMINOR(_x)   (((_x) >> 8) & 0xFF)
#define CBMT_I_INSTALL_OUT_GET_VERSION_DEVEL(_x)   (((_x) >> 0) & 0xFF)
#define CBMT_I_INSTALL_OUT_MAKE_VERSION(_x, _y, _z, _w)   (((((_x) << 8 | (_y)) << 8 | (_z)) << 8 | (_w)))
#define CBMT_I_INSTALL_OUT_GET_VERSION_EX_BUGFIX(_x)   (((_x) >> 0) & 0xFF)
#define CBMT_I_INSTALL_OUT_MAKE_VERSION_EX(_w)   (_w)
#define CBMCTRL_BASE   0x0000A424
#define CBM4WIN_IOCTL_INDEX   0x823
#define _CBMIO(_a, _b)
#define CBMCTRL_TALK   _CBMIO(CBMCTRL_BASE, 0)
 IOCTL for sending a TALK command.
#define CBMCTRL_LISTEN   _CBMIO(CBMCTRL_BASE, 1)
 IOCTL for sending a LISTEN command.
#define CBMCTRL_UNTALK   _CBMIO(CBMCTRL_BASE, 2)
 IOCTL for sending an UNTALK command.
#define CBMCTRL_UNLISTEN   _CBMIO(CBMCTRL_BASE, 3)
 IOCTL for sending an UNLISTEN command.
#define CBMCTRL_OPEN   _CBMIO(CBMCTRL_BASE, 4)
 IOCTL for sending an OPEN command.
#define CBMCTRL_CLOSE   _CBMIO(CBMCTRL_BASE, 5)
 IOCTL for sending a CLOSE command.
#define CBMCTRL_RESET   _CBMIO(CBMCTRL_BASE, 6)
 IOCTL for sending a RESET.
#define CBMCTRL_GET_EOI   _CBMIO(CBMCTRL_BASE, 7)
 IOCTL for getting the EOI state.
#define CBMCTRL_CLEAR_EOI   _CBMIO(CBMCTRL_BASE, 8)
 IOCTL for resetting the EOI state.
#define CBMCTRL_PP_READ   _CBMIO(CBMCTRL_BASE, 10)
 IOCTL for reading the PP values.
#define CBMCTRL_PP_WRITE   _CBMIO(CBMCTRL_BASE, 11)
 IOCTL for setting the PP values.
#define CBMCTRL_IEC_POLL   _CBMIO(CBMCTRL_BASE, 12)
 IOCTL for polling an IEC line.
#define CBMCTRL_IEC_SET   _CBMIO(CBMCTRL_BASE, 13)
 IOCTL for setting an IEC line.
#define CBMCTRL_IEC_RELEASE   _CBMIO(CBMCTRL_BASE, 14)
 IOCTL for releasing an IEC line.
#define CBMCTRL_IEC_WAIT   _CBMIO(CBMCTRL_BASE, 15)
 IOCTL for waiting for an IEC line.
#define CBMCTRL_I_INSTALL   _CBMIO(CBMCTRL_BASE, 16)
 IOCTL for performing und checking the installation; ONLY FOR USE OF INSTCBM!
#define CBMCTRL_IEC_SETRELEASE   _CBMIO(CBMCTRL_BASE, 18)
 IOCTL for setting and releasing IEC lines at once.
#define CBMCTRL_PARBURST_READ   _CBMIO(CBMCTRL_BASE, 19)
 IOCTL for reading from the parallel port (for controlling parallel burst).
#define CBMCTRL_PARBURST_WRITE   _CBMIO(CBMCTRL_BASE, 20)
 IOCTL for writing to the parallel port (for controlling parallel burst).
#define CBMCTRL_PARBURST_READ_TRACK   _CBMIO(CBMCTRL_BASE, 21)
 IOCTL for reading a complete track (for parallel burst).
#define CBMCTRL_PARBURST_WRITE_TRACK   _CBMIO(CBMCTRL_BASE, 22)
 IOCTL for writing a complete track (for parallel burst).
#define CBMCTRL_PARPORT_LOCK   _CBMIO(CBMCTRL_BASE, 23)
 IOCTL for locking the driver onto the parallel port.
#define CBMCTRL_PARPORT_UNLOCK   _CBMIO(CBMCTRL_BASE, 24)
 IOCTL for locking the driver onto the parallel port.
#define CBMCTRL_UPDATE   _CBMIO(CBMCTRL_BASE, 25)
 IOCTL for updating settings of the driver.
#define CBM_I_DRIVER_INSTALL_0_FAILED   0xFFFFFFFF
 CBMCTRL_I_INSTALL: The driver could not be opened.
#define CBM_I_DRIVER_INSTALL_0_IOCTL_FAILED   0xFFFFFFFE
 CBMCTRL_I_INSTALL: The IOCTL failed.
#define CBM_I_DRIVER_INSTALL_0M_NO_INTERRUPT   0x80000000
 CBMCTRL_I_INSTALL: No interrupt available.

Typedefs

typedef CBMT_IECADDRESS CBMT_IECADDRESS
typedef CBMT_SINGLEBYTE CBMT_SINGLEBYTE
typedef CBMT_LINE CBMT_LINE
typedef CBMT_LINESTATE CBMT_LINE_STATE
typedef CBMT_BOOLEAN CBMT_BOOLEAN
typedef CBMT_I_INSTALL_OUT CBMT_I_INSTALL_OUT
typedef CBMT_I_INSTALL_OUTPCBMT_I_INSTALL_OUT
typedef CBMT_IECADDRESS CBMT_TALK_IN
typedef CBMT_IECADDRESS CBMT_LISTEN_IN
typedef CBMT_IECADDRESS CBMT_OPEN_IN
typedef CBMT_IECADDRESS CBMT_CLOSE_IN
typedef CBMT_SINGLEBYTE CBMT_PP_WRITE_IN
typedef CBMT_SINGLEBYTE CBMT_PP_READ_OUT
typedef CBMT_LINE CBMT_IEC_POLL_OUT
typedef CBMT_LINE_STATE CBMT_IEC_WAIT_IN
typedef CBMT_LINE CBMT_IEC_WAIT_OUT
typedef CBMT_LINE CBMT_IEC_SET_IN
typedef CBMT_LINE CBMT_IEC_RELEASE_IN
typedef CBMT_BOOLEAN CBMT_GET_EOI_OUT
typedef CBMT_LINE_STATE CBMT_IEC_SETRELEASE_IN
typedef CBMT_SINGLEBYTE CBMT_PARBURST_PREAD_OUT
typedef CBMT_SINGLEBYTE CBMT_PARBURST_PWRITE_IN

Functions

 DEFINE_GUID (GUID_OPENCBM, 0x9c3b5b5e, 0x558e, 0x47cc, 0x9c, 0x5, 0xf1, 0xfc, 0xf5, 0x17, 0x54, 0x7)


Detailed Description

Define the IOCTL codes for the opencbm driver.

**************************************************************

Author:
Spiro Trikaliotis
Version:
Id
cbmioctl.h,v 1.10 2006/03/26 14:19:40 trikalio Exp

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

Definition in file cbmioctl.h.


Define Documentation

#define _CBMIO _a,
_b   ) 
 

Value:

CTL_CODE(CBMCTRL_BASE, (CBM4WIN_IOCTL_INDEX+(_b)), \
                   METHOD_BUFFERED, FILE_ANY_ACCESS)
Define a IOCTL

Definition at line 216 of file cbmioctl.h.

#define CBM4WIN_IOCTL_INDEX   0x823
 

INDEX number of the custom IOCTLs

Definition at line 213 of file cbmioctl.h.

#define CBM_REGKEY_SERVICE   "System\\CurrentControlSet\\Services\\opencbm"
 

Registry key (under HKLM) of the service

Definition at line 27 of file cbmioctl.h.

Referenced by IsDriverStartedAutomatically().

#define CBM_REGKEY_SERVICE_DEBUGFLAGS   "DebugFlags"
 

Registry entry (under CBM_REGKEY_SERVICE) of the DebugFlags

Definition at line 42 of file cbmioctl.h.

#define CBM_REGKEY_SERVICE_DEFAULTLPT   "DefaultLpt"
 

Registry entry (under CBM_REGKEY_SERVICE) of the default LPT port

Definition at line 31 of file cbmioctl.h.

#define CBM_REGKEY_SERVICE_DLL_DEBUGFLAGS   "DllDebugFlags"
 

Registry entry (under CBM_REGKEY_SERVICE) of the DebugFlags for the DLL

Definition at line 45 of file cbmioctl.h.

#define CBM_REGKEY_SERVICE_IECCABLE   "IecCable"
 

Registry entry (under CBM_REGKEY_SERVICE) for the cable type

Definition at line 35 of file cbmioctl.h.

#define CBM_REGKEY_SERVICE_PERMLOCK   "PermanentlyLock"
 

Registry entry (under CBM_REGKEY_SERVICE) for determining if the parport is to be permanently locked

Definition at line 39 of file cbmioctl.h.

#define CBMCTRL_BASE   0x0000A424
 

BASE number of the custom IOCTL

Definition at line 211 of file cbmioctl.h.

#define CBMDEVICENAME_MAINPART   "\\\\.\\" OPENCBM_DRIVERNAME
 

The device name of the driver This is necessary for DOS drivers and "old-style" DLLs A number is appended to this name, starting with 0.

Definition at line 54 of file cbmioctl.h.

#define CBMT_I_INSTALL_OUT_GET_VERSION_DEVEL _x   )     (((_x) >> 0) & 0xFF)
 

the devel number, that is, w

Definition at line 141 of file cbmioctl.h.

#define CBMT_I_INSTALL_OUT_GET_VERSION_EX_BUGFIX _x   )     (((_x) >> 0) & 0xFF)
 

the bugfix number in the version extension

Definition at line 149 of file cbmioctl.h.

#define CBMT_I_INSTALL_OUT_GET_VERSION_MAJOR _x   )     (((_x) >> 24) & 0xFF)
 

the major number, that is, x

Definition at line 135 of file cbmioctl.h.

#define CBMT_I_INSTALL_OUT_GET_VERSION_MINOR _x   )     (((_x) >> 16) & 0xFF)
 

the minor number, that is, y

Definition at line 137 of file cbmioctl.h.

#define CBMT_I_INSTALL_OUT_GET_VERSION_SUBMINOR _x   )     (((_x) >> 8) & 0xFF)
 

the subminor number, that is, z

Definition at line 139 of file cbmioctl.h.

#define CBMT_I_INSTALL_OUT_MAKE_VERSION _x,
_y,
_z,
_w   )     (((((_x) << 8 | (_y)) << 8 | (_z)) << 8 | (_w)))
 

Build such a version number

Definition at line 144 of file cbmioctl.h.

Referenced by cbm_i_i_driver_install(), and cbm_install().

#define CBMT_I_INSTALL_OUT_MAKE_VERSION_EX _w   )     (_w)
 

Build such a version extension

Definition at line 152 of file cbmioctl.h.

Referenced by cbm_i_i_driver_install(), and cbm_install().

#define IEC_LINE_ATN   0x04
 

CBMT_LINE: ATN

Definition at line 67 of file cbmioctl.h.

Referenced by cbmiec_iec_poll(), cbmiec_iec_setrelease(), cbmiec_iec_wait(), and opencbm_init().

#define IEC_LINE_CLOCK   0x02
 

CBMT_LINE: CLOCK

Definition at line 65 of file cbmioctl.h.

Referenced by cbmiec_iec_poll(), cbmiec_iec_setrelease(), cbmiec_iec_wait(), and opencbm_init().

#define IEC_LINE_DATA   0x01
 

CBMT_LINE: DATA

Definition at line 63 of file cbmioctl.h.

Referenced by cbmiec_iec_poll(), cbmiec_iec_setrelease(), cbmiec_iec_wait(), and opencbm_init().

#define IEC_LINE_RESET   0x08
 

CBMT_LINE: RESET

Definition at line 69 of file cbmioctl.h.

Referenced by cbmiec_iec_poll(), cbmiec_iec_setrelease(), and opencbm_init().

#define OPENCBM_DRIVERNAME   "opencbm"
 

The name of the driver with which to communicate

Definition at line 48 of file cbmioctl.h.

Referenced by cbm_i_driver_start(), and cbm_i_driver_stop().


Typedef Documentation

typedef struct CBMT_BOOLEAN CBMT_BOOLEAN
 

This type contains a boolean decision

typedef CBMT_IECADDRESS CBMT_CLOSE_IN
 

Input buffer for CLOSE

Definition at line 185 of file cbmioctl.h.

typedef CBMT_BOOLEAN CBMT_GET_EOI_OUT
 

Output buffer for GET_EOI

Definition at line 201 of file cbmioctl.h.

typedef struct CBMT_I_INSTALL_OUT CBMT_I_INSTALL_OUT
 

Output buffer for I_INSTALL

typedef CBMT_LINE CBMT_IEC_POLL_OUT
 

Output buffer for IEC_POLL

Definition at line 191 of file cbmioctl.h.

typedef CBMT_LINE CBMT_IEC_RELEASE_IN
 

Input buffer for RELEASE

Definition at line 199 of file cbmioctl.h.

typedef CBMT_LINE CBMT_IEC_SET_IN
 

Input buffer for IEC_SET

Definition at line 197 of file cbmioctl.h.

typedef CBMT_LINE_STATE CBMT_IEC_SETRELEASE_IN
 

Input buffer for IEC_SET

Definition at line 203 of file cbmioctl.h.

typedef CBMT_LINE_STATE CBMT_IEC_WAIT_IN
 

Input buffer for IEC_WAIT

Definition at line 193 of file cbmioctl.h.

typedef CBMT_LINE CBMT_IEC_WAIT_OUT
 

Output buffer for IEC_WAIT

Definition at line 195 of file cbmioctl.h.

typedef struct CBMT_IECADDRESS CBMT_IECADDRESS
 

This type provides primary and secondary address on the IEC bus

typedef struct CBMT_LINE CBMT_LINE
 

This type gives a line (one out of IEC_ATN, IEC_DATA, IEC_CLOCK)

typedef struct CBMT_LINESTATE CBMT_LINE_STATE
 

This type gives a line (one out of IEC_ATN, IEC_DATA, IEC_CLOCK) and the corresponding state.

typedef CBMT_IECADDRESS CBMT_LISTEN_IN
 

Input buffer for LISTEN

Definition at line 181 of file cbmioctl.h.

typedef CBMT_IECADDRESS CBMT_OPEN_IN
 

Input buffer for OPEN

Definition at line 183 of file cbmioctl.h.

typedef CBMT_SINGLEBYTE CBMT_PARBURST_PREAD_OUT
 

Output buffer for IEC_PARBURST_READ

Definition at line 205 of file cbmioctl.h.

typedef CBMT_SINGLEBYTE CBMT_PARBURST_PWRITE_IN
 

Input buffer for IEC_PARBURST_PAR_WRITE

Definition at line 207 of file cbmioctl.h.

typedef CBMT_SINGLEBYTE CBMT_PP_READ_OUT
 

Output buffer for IEC_PP_READ

Definition at line 189 of file cbmioctl.h.

typedef CBMT_SINGLEBYTE CBMT_PP_WRITE_IN
 

Input buffer for IEC_PP_WRITE

Definition at line 187 of file cbmioctl.h.

typedef struct CBMT_SINGLEBYTE CBMT_SINGLEBYTE
 

This type provides a single (raw) byte

typedef CBMT_IECADDRESS CBMT_TALK_IN
 

Input buffer for TALK

Definition at line 179 of file cbmioctl.h.

typedef struct CBMT_I_INSTALL_OUT * PCBMT_I_INSTALL_OUT
 

Output buffer for I_INSTALL


Function Documentation

DEFINE_GUID GUID_OPENCBM  ,
0x9c3b5b5e  ,
0x558e  ,
0x47cc  ,
0x9c  ,
0x5  ,
0xf1  ,
0xfc  ,
0xf5  ,
0x17  ,
0x54  ,
0x7 
 

the GUID for communication with the kernel-mode driver

Todo:
Currently, this is unused!


Generated on Sun Apr 30 18:46:06 2006 for opencbm by  doxygen 1.4.2