diff options
-rw-r--r-- | gpib.c | 24 | ||||
-rw-r--r-- | gpib.h | 2 | ||||
-rw-r--r-- | vxi11_server.c | 1 |
3 files changed, 16 insertions, 11 deletions
@@ -627,7 +627,6 @@ static int TNT_update_brq(void) int GPIB_check_for_device_clear_signal(void) { - /* added by MJC - June 20/06 */ /* reset interface if a device clear is received */ if (!globals.HWDetect.gpib) { @@ -635,15 +634,7 @@ int GPIB_check_for_device_clear_signal(void) } if (TNT_INT_STATUS() & DCAS) { - TNT_Out(R_auxmr,F_clrDEC); - - TNT_4882_Status(STB,0x10,CLEAR); // Clear MAV bit - g_free (globals.Registers.pending_output_message); - globals.Registers.pending_output_message = NULL; - - TNT_Holdoff_off(); - TNT_INT_STATUS(); - + GPIB_and_VXI_device_clear(); return TRUE; } else { return FALSE; @@ -651,6 +642,19 @@ int GPIB_check_for_device_clear_signal(void) } +int GPIB_and_VXI_device_clear(void) +{ + TNT_Out(R_auxmr,F_clrDEC); + TNT_4882_Status(STB,0x10,CLEAR); // Clear MAV bit + + g_free (globals.Registers.pending_output_message); + globals.Registers.pending_output_message = NULL; + + TNT_Holdoff_off(); + TNT_INT_STATUS(); +} + + int GPIB_check_for_messages(char *gpib_buf) { #define ib_empty (!(strlen(gpib_buf))) @@ -9,7 +9,7 @@ void GPIB_Set_Device_Dependent_Error(void); void GPIB_initialize(void); void GPIB_change_address(int new_address); int GPIB_check_for_device_clear_signal(void); -int GPIB_check_for_device_clear_signal(void); +int GPIB_and_VXI_device_clear(void); int GPIB_check_for_messages(char *gpib_buf); int GPIB_handle_new_input(char *gpib_buf); void GPIB_and_VXI_start_query_response(gpointer ignore_this, gchar *in_string); diff --git a/vxi11_server.c b/vxi11_server.c index f5204e5..d02073e 100644 --- a/vxi11_server.c +++ b/vxi11_server.c @@ -355,6 +355,7 @@ device_clear_1_svc(Device_GenericParms *argp, struct svc_req *rqstp) { else { touchlink(argp->lid); result.error = 0; + GPIB_and_VXI_device_clear(); } return &result; } |