summaryrefslogtreecommitdiff
path: root/gpib.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:20:41 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:20:41 -0500
commit6f8a981b61114d641799fc540dde49f3ae021708 (patch)
treea954122652da17899ff1025e7f19595f7ebca6b2 /gpib.c
parent7fd7a5c0241173f88762bcfd9c7a1d9c64b336eb (diff)
clear MAV bit after sending VXI message
Diffstat (limited to 'gpib.c')
-rw-r--r--gpib.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/gpib.c b/gpib.c
index 5d5fb74..3945447 100644
--- a/gpib.c
+++ b/gpib.c
@@ -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) {