diff options
Diffstat (limited to 'gpib.c')
-rw-r--r-- | gpib.c | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -648,7 +648,7 @@ 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 + GPIB_and_VXI_clear_MAV(); g_free (globals.Registers.pending_output_message); globals.Registers.pending_output_message = NULL; @@ -800,7 +800,7 @@ void GPIB_and_VXI_start_query_response(gpointer ignore_this, gchar *in_string) } globals.Registers.pending_output_message = g_strdup_printf ("%s\n", in_string); - TNT_4882_Status(STB,0x10,SET); // Set MAV bit + GPIB_and_VXI_set_MAV(); } @@ -842,7 +842,7 @@ void GPIB_finish_query_response() // abandon if input bytes available, and generate query error TNT_Holdoff_off(); queue_error_for_gpib_only(query_error_interrupted); - TNT_4882_Status(STB,0x10,CLEAR); // Clear MAV bit + GPIB_and_VXI_clear_MAV(); prev_brq=1; // reset brq TNT_update_brq(); // update it so that it doesn't get return; // confused in idle state @@ -906,7 +906,7 @@ void GPIB_finish_query_response() if ((INTERFACE_STATUS&LACS) && (TNT_In(R_isr3)&B_nef)) { // abandon gracefully if listen-addressed with data in buffer queue_error_for_gpib_only(query_error_interrupted); - TNT_4882_Status(STB,0x10,CLEAR); // Clear MAV bit + GPIB_and_VXI_clear_MAV(); prev_brq=1; // reset brq TNT_update_brq(); // update it so that it doesn't get // confused in idle state @@ -915,7 +915,7 @@ void GPIB_finish_query_response() } if(DATA_COUNT>0) { - TNT_4882_Status(STB,0x10,CLEAR); // Clear MAV bit + GPIB_and_VXI_clear_MAV(); prev_brq=1; // brq was active during send */ TNT_update_brq(); // update it so that it doesn't get // confused in idle state @@ -994,6 +994,18 @@ unsigned int GPIB_and_VXI_get_STB () } +void GPIB_and_VXI_set_MAV() +{ + TNT_4882_Status(STB,0x10,SET); +} + + +void GPIB_and_VXI_clear_MAV() +{ + TNT_4882_Status(STB,0x10,CLEAR); +} + + void GPIB_set_ESR (unsigned int byte,int operation) { if (!globals.HWDetect.gpib) { |