Hamlib  1.2.15
par_nt.h
00001 /* NT Parport Access stuff - Matthew Duggan (2002) */
00002 
00003 /* 
00004  * ParallelVdm Device (0x2C) is mostly undocumented, used by VDM for parallel 
00005  * port compatibility.
00006  */
00007 
00008 /* 
00009  * Different from CTL_CODE in DDK, limited to ParallelVdm but makes this 
00010  * code cleaner.
00011  */
00012 
00013 #ifndef _PAR_NT_H
00014 
00015 #define _PAR_NT_H
00016 
00017 #define NT_CTL_CODE( Function ) ( (0x2C<<16) | ((Function) << 2) )
00018 
00019 /* IOCTL codes */
00020 #define NT_IOCTL_DATA      NT_CTL_CODE(1) /* Write Only */
00021 #define NT_IOCTL_CONTROL   NT_CTL_CODE(2) /* Read/Write */
00022 #define NT_IOCTL_STATUS    NT_CTL_CODE(3) /* Read Only  */
00023 
00024 
00025 /*
00026  * Raw port access (PC-style port registers but within inversions)
00027  * Functions returning int may fail.
00028  */
00029 
00030 /* The status pin functions operate in terms of these bits: */
00031 enum ieee1284_status_bits
00032 {
00033   S1284_NFAULT = 0x08,
00034   S1284_SELECT = 0x10,
00035   S1284_PERROR = 0x20,
00036   S1284_NACK   = 0x40,
00037   S1284_BUSY   = 0x80,
00038   /* To convert those values into PC-style register values, use this: */
00039   S1284_INVERTED = S1284_BUSY
00040 };
00041 
00042 /* The control pin functions operate in terms of these bits: */
00043 enum ieee1284_control_bits
00044 {
00045   C1284_NSTROBE   = 0x01,
00046   C1284_NAUTOFD   = 0x02,
00047   C1284_NINIT     = 0x04,
00048   C1284_NSELECTIN = 0x08,
00049   /* To convert those values into PC-style register values, use this: */
00050   C1284_INVERTED = (C1284_NSTROBE|
00051                     C1284_NAUTOFD|
00052                     C1284_NSELECTIN)
00053 };
00054 
00055 #endif  /* _PAR_NT_H */
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated by doxygen 1.7.6.1

Hamlib documentation for version 1.2.15 -- Thu Feb 2 2012 21:37:27
Project page: http://www.hamlib.org