diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-11 15:16:33 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-11 15:16:33 -0400 |
commit | 74b9ff28228e3858ef4bc181a34a9acf9ca6be79 (patch) | |
tree | 97d86198073500ef287f8298d6f8df713773d037 /parser.c | |
parent | 9f693eba66b3ff9934050fd4b5c50b7660cc3096 (diff) |
remove unused stopbit and echo settings
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 78 |
1 files changed, 4 insertions, 74 deletions
@@ -90,9 +90,7 @@ 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_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); static int Go_load_68(gchar** response, int channel, char *parameter,char *units,int command_type); static int Go_meas_ampl_69(gchar** response, int channel, char *parameter,char *units,int command_type); static int Go_rst_6(gchar** response, int channel, char *parameter,char *units,int command_type); @@ -442,9 +440,9 @@ static int Parser_find_commands(int commands[], int command_depth) {13,68,71,72|optional,73}, /* syst:comm:ser:rec:baud - 60 */ {13,68,71,72|optional,74,75|optional}, /* syst:comm:ser:rec:parity - 61 - not used */ {13,68,71,72|optional,76}, /* syst:comm:ser:rec:bits - 62 - not used */ - {13,68,71,72|optional,77}, /* syst:comm:ser:rec:sbits - 63 */ + {13,68,71,72|optional,77}, /* syst:comm:ser:rec:sbits - 63 - not used */ {13,68,71,80,79}, /* syst:comm:ser:control:rts - 64 */ - {13,68,71,72|optional,78}, /* syst:comm:ser:rec:echo - 65 */ + {13,68,71,72|optional,78}, /* syst:comm:ser:rec:echo - 65 - not used */ {13,14,82}, /* syst:err:count - 66 */ {28|optional,40,65,30}, /* sour:puls:gate:level - 67 */ {24,85}, /* output:load - 68 */ @@ -942,15 +940,9 @@ void Parser_main (char *raw_in, int interactive_terminal, void(*cbfunc)(gpointer case 60: error_num=Go_ser_baud_60(&response,channel,parameter,units,command_type); break; - case 63: - error_num=Go_ser_sbits_63(&response,channel,parameter,units,command_type); - break; case 64: error_num=Go_ser_rts_64(&response,channel,parameter,units,command_type); break; - case 65: - error_num=Go_ser_echo_65(&response,channel,parameter,units,command_type); - break; case 66: error_num=Go_syst_errcnt66(&response,channel,parameter,units,command_type); break; @@ -2731,7 +2723,7 @@ static int Go_ser_baud_60(gchar** response, int channel, char *parameter,char *u 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); + return IO_Setup_RS232(new_baud, globals.Flash.hardhand, TRUE); break; case query_simple: @@ -2751,37 +2743,6 @@ static int Go_ser_baud_60(gchar** response, int channel, char *parameter,char *u } -static int Go_ser_sbits_63(gchar** response, int channel, char *parameter,char *units,int command_type) -{ - int new_stopbits; - int status; - - switch (command_type) { - case command_withparam: - if (status=process_two_ints (parameter, &new_stopbits, 1, 2)) { - return status; - } - - return IO_Setup_RS232(globals.Flash.baud, (char) new_stopbits, globals.Flash.hardhand, globals.Flash.echo, TRUE); - break; - - case query_simple: - return query_int (response, globals.Flash.stopbits); - break; - - case query_param: - return query_min_max_int (response, parameter, 1, 2); - break; - - default: - return SyntaxError; - break; - } - - return ThisShouldntHappen; -} - - static int Go_ser_rts_64(gchar** response, int channel, char *parameter,char *units,int command_type) { char new_hardhand; @@ -2800,7 +2761,7 @@ static int Go_ser_rts_64(gchar** response, int channel, char *parameter,char *un return IllegalParameter; } - return IO_Setup_RS232(globals.Flash.baud, globals.Flash.stopbits, new_hardhand, globals.Flash.echo, TRUE); + return IO_Setup_RS232(globals.Flash.baud, new_hardhand, TRUE); break; case query_simple: @@ -2823,37 +2784,6 @@ static int Go_ser_rts_64(gchar** response, int channel, char *parameter,char *un } -static int Go_ser_echo_65(gchar** response, int channel, char *parameter,char *units,int command_type) -{ - int new_echo; - int status; - - switch (command_type) { - case command_withparam: - if (status=process_on_off (parameter, &new_echo)) { - return status; - } - return IO_Setup_RS232(globals.Flash.baud, globals.Flash.stopbits, globals.Flash.hardhand, (char) new_echo, TRUE); - break; - - case query_simple: - if (globals.Flash.echo) { - return query_int (response, 1); - } else { - return query_int (response, 0); - } - return OK; - break; - - default: - return SyntaxError; - break; - } - - return ThisShouldntHappen; -} - - static int Go_load_68(gchar** response, int channel, char *parameter,char *units,int command_type) { float new_load_type; |