diff options
author | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 20:17:42 -0500 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1999-12-31 20:17:42 -0500 |
commit | 41e73b50f0addac28ee0e87fe10043dc6d45ba68 (patch) | |
tree | 03ef5764d63837452eedc07dc682d2d6ebfc3c63 /gpib.c | |
parent | 2a637c5759191f2911cdf5548d05496600e0655a (diff) |
make hardware-detect flags global
Diffstat (limited to 'gpib.c')
-rw-r--r-- | gpib.c | 40 |
1 files changed, 19 insertions, 21 deletions
@@ -242,8 +242,6 @@ /* TNT4882 GLOBAL VARIABLES -------------------------------------------------*/ -int is_gpib; - int INTERFACE_ERROR; /* Error Code */ int INTERFACE_STATUS; /* Interface Status */ unsigned char MR_4882_status[5]; /* 4882 status memory registers */ @@ -425,9 +423,9 @@ void GPIB_initialize(void) // test to detect TNT chip if ((TNT_In(R_sts2) & 0xB0) == 0x90) { - is_gpib = 1; + globals.HWDetect.gpib = 1; } else { - is_gpib = 0; + globals.HWDetect.gpib = 0; printf ("Error: TNT4882 chip not found\n"); return; } @@ -478,7 +476,7 @@ static void TNT_Adr_Mode() void GPIB_change_address(int new_address) { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return; } @@ -636,7 +634,7 @@ int GPIB_check_for_device_clear_signal(void) /* added by MJC - June 20/06 */ /* reset interface if a device clear is received */ - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return FALSE; } @@ -654,7 +652,7 @@ int GPIB_check_for_messages(char *gpib_buf) { #define ib_empty (!(strlen(gpib_buf))) - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return FALSE; } @@ -686,7 +684,7 @@ int GPIB_check_for_messages(char *gpib_buf) int GPIB_handle_new_input(char *gpib_buf) { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return FALSE; } @@ -774,7 +772,7 @@ static void TNT_Holdoff_off() int GPIB_send_query_response(char *out_buffer) { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return OK; } @@ -901,7 +899,7 @@ int GPIB_send_query_response(char *out_buffer) void GPIB_check_remote_status (int *is_remote, int *is_lockout) { *is_remote = *is_lockout = 0; - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return; } @@ -919,7 +917,7 @@ void GPIB_check_remote_status (int *is_remote, int *is_lockout) unsigned char GPIB_response_already_pending () { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return 0; } @@ -929,7 +927,7 @@ unsigned char GPIB_response_already_pending () void GPIB_go_to_local () { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return; } @@ -940,7 +938,7 @@ void GPIB_go_to_local () void GPIB_clear_events () { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return; } @@ -970,7 +968,7 @@ unsigned int GPIB_get_ESE () unsigned int GPIB_get_STB () { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return 0; } @@ -980,7 +978,7 @@ unsigned int GPIB_get_STB () void GPIB_set_ESR (unsigned int byte,int operation) { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return; } @@ -990,7 +988,7 @@ void GPIB_set_ESR (unsigned int byte,int operation) void GPIB_set_SRE (unsigned int byte,int operation) { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return; } @@ -1000,7 +998,7 @@ void GPIB_set_SRE (unsigned int byte,int operation) void GPIB_set_ESE (unsigned int byte,int operation) { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return; } @@ -1010,7 +1008,7 @@ void GPIB_set_ESE (unsigned int byte,int operation) void GPIB_Set_Execution_Error () { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return; } @@ -1020,7 +1018,7 @@ void GPIB_Set_Execution_Error () void GPIB_Set_Command_Error () { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return; } @@ -1030,7 +1028,7 @@ void GPIB_Set_Command_Error () void GPIB_Set_Query_Error () { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return; } @@ -1040,7 +1038,7 @@ void GPIB_Set_Query_Error () void GPIB_Set_Device_Dependent_Error () { - if (!is_gpib) { + if (!globals.HWDetect.gpib) { return; } |