summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 20:23:25 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 20:23:25 -0500
commite2e3972a0a65dad53f99d8c1c92347cc1ac8dadb (patch)
tree2f968dfafc6b34224530411cae43be91aff3263c /parser.c
parentc5f2953fd9be7e3e15e898b1c2066c0c76b80027 (diff)
added higher baud rates
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/parser.c b/parser.c
index 046ff22..02d7684 100644
--- a/parser.c
+++ b/parser.c
@@ -36,7 +36,6 @@ static int process_int_param (char *parameter, int *value, int item_count, int *
static int process_int_range (char *parameter, int *value, int min_val, int max_val);
static int process_on_off (char *parameter, int *value);
static int process_two_ints (char *parameter, int *value, int min, int max);
-static int process_four_ints (char *parameter, int *value, int v1, int v2, int v3, int v4);
static int check_channel_ok (int channel, int enabled_channels, char chankey);
static int Parser_id_word(char *id_me, int *channel, int *with_id_code);
@@ -91,8 +90,6 @@ static int Go_zout_20(gchar** response, int channel, char *parameter,char *units
static int Go_prot_trip_21(gchar** response, int channel, char *parameter,char *units,int command_type);
static int Go_gpib_addr_59(gchar** response, int channel, char *parameter,char *units,int command_type);
static int Go_ser_baud_60(gchar** response, int channel, char *parameter,char *units,int command_type);
-static int Go_ser_par_61(gchar** response, int channel, char *parameter,char *units,int command_type);
-static int Go_ser_bits_62(gchar** response, int channel, char *parameter,char *units,int command_type);
static int Go_ser_sbits_63(gchar** response, int channel, char *parameter,char *units,int command_type);
static int Go_ser_rts_64(gchar** response, int channel, char *parameter,char *units,int command_type);
static int Go_ser_echo_65(gchar** response, int channel, char *parameter,char *units,int command_type);
@@ -1617,12 +1614,6 @@ static int process_two_ints (char *parameter, int *value, int min, int max)
return process_int_param (parameter, value, 2, valid_choices, NO_ON_OFF);
}
-static int process_four_ints (char *parameter, int *value, int v1, int v2, int v3, int v4)
-{
- int valid_choices[4] = {v1, v2, v3, v4};
- return process_int_param (parameter, value, 4, valid_choices, NO_ON_OFF);
-}
-
static int check_channel_ok (int channel, int enabled_channels, char chankey)
{
/* how many channels overall */
@@ -2733,13 +2724,11 @@ static int Go_gpib_addr_59(gchar** response, int channel, char *parameter,char *
static int Go_ser_baud_60(gchar** response, int channel, char *parameter,char *units,int command_type)
{
int new_baud, status;
- int valid_choices[] = {1200, 2400, 4800, 9600};
+ int valid_choices[] = {1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200};
switch (command_type) {
case command_withparam:
- // FIXME - expand this list
- // FIXME - hardcoded "4"
- if (status = process_int_param (parameter, &new_baud, 4, valid_choices, NO_ON_OFF)) {
+ if (status = process_int_param (parameter, &new_baud, 8, valid_choices, NO_ON_OFF)) {
return status;
}
return IO_Setup_RS232(new_baud, globals.Flash.stopbits, globals.Flash.hardhand, globals.Flash.echo, TRUE);
@@ -2750,8 +2739,7 @@ static int Go_ser_baud_60(gchar** response, int channel, char *parameter,char *u
break;
case query_param:
- // FIXME - extract min, max from a new baud list
- return query_min_max_int (response, parameter, 1200, 9600);
+ return query_min_max_int (response, parameter, 1200, 115200);
break;
default: