summaryrefslogtreecommitdiff
path: root/gpib.c
diff options
context:
space:
mode:
Diffstat (limited to 'gpib.c')
-rw-r--r--gpib.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/gpib.c b/gpib.c
index 8f8bd26..d9ef549 100644
--- a/gpib.c
+++ b/gpib.c
@@ -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)))