summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 20:06:41 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 20:06:41 -0500
commit655057d072b0327fbaef82b06c756fda0e06395d (patch)
treea3cacb9b533528cde29565dc6190866016b0a911
parent3800930f3d03601c5063fdced79b461e77fec563 (diff)
added vxi device clear functionality
-rw-r--r--gpib.c24
-rw-r--r--gpib.h2
-rw-r--r--vxi11_server.c1
3 files changed, 16 insertions, 11 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)))
diff --git a/gpib.h b/gpib.h
index 0d9d434..aba8081 100644
--- a/gpib.h
+++ b/gpib.h
@@ -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;
}