diff options
author | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 20:06:41 -0500 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 20:06:41 -0500 |
commit | 655057d072b0327fbaef82b06c756fda0e06395d (patch) | |
tree | a3cacb9b533528cde29565dc6190866016b0a911 /gpib.c | |
parent | 3800930f3d03601c5063fdced79b461e77fec563 (diff) |
added vxi device clear functionality
Diffstat (limited to 'gpib.c')
-rw-r--r-- | gpib.c | 24 |
1 files changed, 14 insertions, 10 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))) |