summaryrefslogtreecommitdiff
path: root/globals.h
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-09-11 09:23:09 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-09-11 09:23:09 -0400
commitc9b47b6f58017ce6a0ae48a454545edb4715ca7a (patch)
tree873df2844e82edf1f77c5c31a66906eb1cccbe0d /globals.h
parent959e1cf54cea0a3252c4852224a290c56c50df2a (diff)
added support for serial parameters
Diffstat (limited to 'globals.h')
-rw-r--r--globals.h42
1 files changed, 12 insertions, 30 deletions
diff --git a/globals.h b/globals.h
index ea43771..51c9f7c 100644
--- a/globals.h
+++ b/globals.h
@@ -195,23 +195,9 @@
#define ROUTE_PRIMARY 0
#define ROUTE_SECONDARY 1
-/* define RS232 parameters */
-#define rs232_1200_baud 0x00
-#define rs232_2400_baud 0x40
-#define rs232_4800_baud 0xc0
-#define rs232_9600_baud 0x80
-#define rs232_parity_none 0x00
-#define rs232_parity_odd 0x0a
-#define rs232_parity_even 0x02
-#define rs232_1stop_bit 0x00
-#define rs232_2stop_bits 0x01
-#define rs232_7data_bits 0x00
-#define rs232_8data_bits 0x04
-#define rs232_hard_off 0x00
-#define rs232_hard_on 0x10
-#define rs232_echo_off 0x00
-#define rs232_echo_on 0x20
-
+#define rs232_parity_none 0
+#define rs232_parity_odd 1
+#define rs232_parity_even 2
#define smallest_allowed_number 1.0e-18
#define zero_equiv_timing 1e-10
@@ -343,16 +329,6 @@ typedef struct {
typedef struct {
- int baud;
- int parity;
- int stopbits;
- int databits;
- int hardhand;
- int echo;
-} Rs232Struct;
-
-
-typedef struct {
int channel;
int cal_type;
int count;
@@ -426,7 +402,7 @@ typedef struct {
short telnet_session_timeout; /* 56 - timeout in seconds */
- char rcl_rs232; /* 58 */
+ char unusedx; /* 58 */
short spare2; /* 59 */
char ChanKey_route; /* 61 */
char on_off_used; /* 62 */
@@ -439,7 +415,14 @@ typedef struct {
char warn_even_if_output_off; /* 129 */
- char spare1[32]; /* 130 */
+ int baud; /* 130 */
+ char parity;
+ char stopbits;
+ char databits;
+ char hardhand;
+ char echo;
+
+ char spare1[23]; /* 139 */
short copy_max_channels; /* 162 - copy of max_channels macro */
@@ -813,7 +796,6 @@ typedef struct {
ChannelStruct ChannelState[max_channels];
FlashStruct Flash;
GpibStruct GPIB;
- Rs232Struct RS232;
HWregStruct Registers;
ChangeStruct Changes;
ErrorStruct Errors;