[Com0com-cvs] hub4com/plugins/pinmap filter.cpp,1.7,1.8
The virtual serial port driver for Windows.
Brought to you by:
vfrolov
From: Vyacheslav F. <vf...@us...> - 2008-08-26 14:28:52
|
Update of /cvsroot/com0com/hub4com/plugins/pinmap In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv13153 Modified Files: filter.cpp Log Message: Removed option --break=break from default Index: filter.cpp =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/pinmap/filter.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** filter.cpp 25 Aug 2008 08:08:22 -0000 1.7 --- filter.cpp 26 Aug 2008 14:28:48 -0000 1.8 *************** *** 20,23 **** --- 20,26 ---- * * $Log$ + * Revision 1.8 2008/08/26 14:28:48 vfrolov + * Removed option --break=break from default + * * Revision 1.7 2008/08/25 08:08:22 vfrolov * Added init pin state *************** *** 84,94 **** }; /////////////////////////////////////////////////////////////// - #define LSR_BREAK_STATUS 0x01 - #define MST2LSRMST(m) ((WORD)((BYTE)(m))) #define LSR2LSRMST(l) ((WORD)(((WORD)(BYTE)(l)) << 8)) #define LSRMST2MST(lm) ((BYTE)(lm)) #define LSRMST2LSR(lm) ((BYTE)((lm) >> 8)) ! #define LSRMST2GO(lm) (GO_V2O_MODEM_STATUS(LSRMST2MST(lm)) | ((LSRMST2LSR(lm) & LSR_BREAK_STATUS) ? GO_BREAK_STATUS : 0)) static struct { --- 87,96 ---- }; /////////////////////////////////////////////////////////////// #define MST2LSRMST(m) ((WORD)((BYTE)(m))) #define LSR2LSRMST(l) ((WORD)(((WORD)(BYTE)(l)) << 8)) #define LSRMST2MST(lm) ((BYTE)(lm)) #define LSRMST2LSR(lm) ((BYTE)((lm) >> 8)) ! #define LSRMST2GO(lm) (GO_V2O_MODEM_STATUS(LSRMST2MST(lm)) | \ ! ((lm & LSR2LSRMST(LINE_STATUS_BI)) ? GO_BREAK_STATUS : 0)) static struct { *************** *** 100,104 **** {"dcd", MST2LSRMST(MODEM_STATUS_DCD)}, {"ring", MST2LSRMST(MODEM_STATUS_RI)}, ! {"break", LSR2LSRMST(LSR_BREAK_STATUS)}, }; /////////////////////////////////////////////////////////////// --- 102,106 ---- {"dcd", MST2LSRMST(MODEM_STATUS_DCD)}, {"ring", MST2LSRMST(MODEM_STATUS_RI)}, ! {"break", LSR2LSRMST(LINE_STATUS_BI)}, }; /////////////////////////////////////////////////////////////// *************** *** 160,164 **** Parse("rts=cts"); Parse("dtr=dsr"); - Parse("break=break"); } } --- 162,165 ---- *************** *** 274,283 **** << " --out1=[!]<s> - wire input state of <s> to output pin OUT1." << endl << " --out2=[!]<s> - wire input state of <s> to output pin OUT2." << endl ! << " --break=[!]<s> - wire input state of <s> to output pin BREAK." << endl << endl << " The possible values of <s> above can be cts, dsr, dcd, ring or break. The" << endl << " exclamation sign (!) can be used to invert the value. If no any wire option" << endl ! << " specified, then the options --rts=cts --dtr=dsr --break=break are used by" << endl ! << " default." << endl << endl << "OUT method input data stream description:" << endl --- 275,283 ---- << " --out1=[!]<s> - wire input state of <s> to output pin OUT1." << endl << " --out2=[!]<s> - wire input state of <s> to output pin OUT2." << endl ! << " --break=[!]<s> - wire input state of <s> to output state of BREAK." << endl << endl << " The possible values of <s> above can be cts, dsr, dcd, ring or break. The" << endl << " exclamation sign (!) can be used to invert the value. If no any wire option" << endl ! << " specified, then the options --rts=cts --dtr=dsr are used by default." << endl << endl << "OUT method input data stream description:" << endl *************** *** 428,437 **** lmInMask = MST2LSRMST(MASK2VAL(pOutMsg->u.val)); } else { ! lmInVal = (pOutMsg->u.val ? LSR2LSRMST(LSR_BREAK_STATUS) : 0); ! lmInMask = LSR2LSRMST(LSR_BREAK_STATUS); } lmInVal = ((lmInVal & lmInMask) | (pState->lmInVal & ~lmInMask)); - lmInVal &= ((Filter *)hFilter)->lmInMask; InsertPinState(*(Filter *)hFilter, pState->lmInVal ^ lmInVal, lmInVal, &pOutMsg); --- 428,437 ---- lmInMask = MST2LSRMST(MASK2VAL(pOutMsg->u.val)); } else { ! lmInVal = (pOutMsg->u.val ? LSR2LSRMST(LINE_STATUS_BI) : 0); ! lmInMask = LSR2LSRMST(LINE_STATUS_BI); } + lmInMask &= ((Filter *)hFilter)->lmInMask; lmInVal = ((lmInVal & lmInMask) | (pState->lmInVal & ~lmInMask)); InsertPinState(*(Filter *)hFilter, pState->lmInVal ^ lmInVal, lmInVal, &pOutMsg); |