[Com0com-cvs] hub4com/plugins plugins_api.h,1.8,1.9
The virtual serial port driver for Windows.
Brought to you by:
vfrolov
From: Vyacheslav F. <vf...@us...> - 2008-08-22 12:46:01
|
Update of /cvsroot/com0com/hub4com/plugins In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv12850 Modified Files: plugins_api.h Log Message: Added masking to HUB_MSG_TYPE_MODEM_STATUS and HUB_MSG_TYPE_LINE_STATUS Index: plugins_api.h =================================================================== RCS file: /cvsroot/com0com/hub4com/plugins/plugins_api.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** plugins_api.h 20 Aug 2008 14:30:18 -0000 1.8 --- plugins_api.h 22 Aug 2008 12:45:34 -0000 1.9 *************** *** 34,41 **** #define HUB_MSG_UNION_TYPE_PVAL 0x3000 /*******************************************************************/ #define HUB_MSG_TYPE_EMPTY (0 | HUB_MSG_UNION_TYPE_NONE) #define HUB_MSG_TYPE_LINE_DATA (1 | HUB_MSG_UNION_TYPE_BUF) #define HUB_MSG_TYPE_CONNECT (2 | HUB_MSG_UNION_TYPE_VAL) ! #define HUB_MSG_TYPE_MODEM_STATUS (3 | HUB_MSG_UNION_TYPE_VAL) #define MODEM_STATUS_DCTS 0x01 #define MODEM_STATUS_DDSR 0x02 --- 34,46 ---- #define HUB_MSG_UNION_TYPE_PVAL 0x3000 /*******************************************************************/ + #define HUB_MSG_VAL_TYPES_MASK 0x0F00 + #define HUB_MSG_VAL_TYPE_MASK_VAL 0x0100 + #define VAL2MASK(v) ((DWORD)(WORD)(v) << 16) + #define MASK2VAL(m) ((WORD)((m) >> 16)) + /*******************************************************************/ #define HUB_MSG_TYPE_EMPTY (0 | HUB_MSG_UNION_TYPE_NONE) #define HUB_MSG_TYPE_LINE_DATA (1 | HUB_MSG_UNION_TYPE_BUF) #define HUB_MSG_TYPE_CONNECT (2 | HUB_MSG_UNION_TYPE_VAL) ! #define HUB_MSG_TYPE_MODEM_STATUS (3 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_MASK_VAL) #define MODEM_STATUS_DCTS 0x01 #define MODEM_STATUS_DDSR 0x02 *************** *** 46,50 **** #define MODEM_STATUS_RI 0x40 #define MODEM_STATUS_DCD 0x80 ! #define HUB_MSG_TYPE_LINE_STATUS (4 | HUB_MSG_UNION_TYPE_VAL) #define LINE_STATUS_DR 0x01 #define LINE_STATUS_OE 0x02 --- 51,55 ---- #define MODEM_STATUS_RI 0x40 #define MODEM_STATUS_DCD 0x80 ! #define HUB_MSG_TYPE_LINE_STATUS (4 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_MASK_VAL) #define LINE_STATUS_DR 0x01 #define LINE_STATUS_OE 0x02 *************** *** 55,61 **** #define LINE_STATUS_TEMT 0x40 #define LINE_STATUS_FIFOERR 0x80 ! #define HUB_MSG_TYPE_SET_PIN_STATE (5 | HUB_MSG_UNION_TYPE_VAL) ! #define SPS_PIN2MASK(p) ((DWORD)(BYTE)(p) << 16) ! #define SPS_MASK2PIN(m) ((BYTE)((m) >> 16)) #define PIN_STATE_RTS 0x01 #define PIN_STATE_DTR 0x02 --- 60,64 ---- #define LINE_STATUS_TEMT 0x40 #define LINE_STATUS_FIFOERR 0x80 ! #define HUB_MSG_TYPE_SET_PIN_STATE (5 | HUB_MSG_UNION_TYPE_VAL | HUB_MSG_VAL_TYPE_MASK_VAL) #define PIN_STATE_RTS 0x01 #define PIN_STATE_DTR 0x02 |