diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-04 08:06:25 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-04 08:06:25 -0400 |
commit | ff3ecc0632fbe0671f000595604e7c1de77f33dc (patch) | |
tree | 6518a6fd22666c960dfb204c805ed7b4fb371a77 /gpib.c | |
parent | b5d824985ca85bda978185bddca4066ac63a249c (diff) |
astyle fixes
Diffstat (limited to 'gpib.c')
-rw-r--r-- | gpib.c | 68 |
1 files changed, 51 insertions, 17 deletions
@@ -479,7 +479,9 @@ static void TNT_Adr_Mode() void GPIB_change_address(int new_address) { - if (!is_gpib) return; + if (!is_gpib) { + return; + } int eprom_loc; @@ -635,7 +637,9 @@ 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) return FALSE; + if (!is_gpib) { + return FALSE; + } if (TNT_INT_STATUS() & DCAS) { TNT_Out(R_auxmr,F_clrDEC); @@ -651,7 +655,9 @@ int GPIB_check_for_messages(char *gpib_buf) { #define ib_empty (!(strlen(gpib_buf))) - if (!is_gpib) return FALSE; + if (!is_gpib) { + return FALSE; + } /* If the GPIB has requested data, and no output messages are in the TNT4882 FIFOs, generate a query error */ if (TNT_update_brq() && !TNT_input_bav() && ib_empty) { @@ -681,7 +687,9 @@ int GPIB_check_for_messages(char *gpib_buf) int GPIB_handle_new_input(char *gpib_buf) { - if (!is_gpib) return FALSE; + if (!is_gpib) { + return FALSE; + } /* read until done or buffers empty. Then reset DAC holdoff */ @@ -767,7 +775,9 @@ static void TNT_Holdoff_off() int GPIB_send_query_response(char *out_buffer) { - if (!is_gpib) return OK; + if (!is_gpib) { + return OK; + } /* message must be available if this function has been called */ @@ -892,7 +902,9 @@ 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) return; + if (!is_gpib) { + return; + } TNT_INT_STATUS(); /* Update to get current status */ if ((INTERFACE_STATUS&REM) == REM) { @@ -908,7 +920,9 @@ void GPIB_check_remote_status (int *is_remote, int *is_lockout) unsigned char GPIB_response_already_pending () { - if (!is_gpib) return 0; + if (!is_gpib) { + return 0; + } return TNT_In(R_spsr) & 0x10; } @@ -916,7 +930,9 @@ unsigned char GPIB_response_already_pending () void GPIB_go_to_local () { - if (!is_gpib) return; + if (!is_gpib) { + return; + } TNT_Out(R_auxmr,0x05); /* issue TNT rtl command */ return; @@ -925,7 +941,9 @@ void GPIB_go_to_local () void GPIB_clear_events () { - if (!is_gpib) return; + if (!is_gpib) { + return; + } TNT_4882_Status(ESR,0xff,CLEAR); /* Clear ESR register */ TNT_4882_Status(STB,0x20,CLEAR); /* Clear ESB bit in STB */ @@ -953,7 +971,9 @@ unsigned int GPIB_get_ESE () unsigned int GPIB_get_STB () { - if (!is_gpib) return; + if (!is_gpib) { + return; + } return (TNT_In(R_spsr)&0xbf) | (((TNT_In(R_spsr)&0xbf) & MR_4882_status[SRE])?0x40:0); } @@ -961,7 +981,9 @@ unsigned int GPIB_get_STB () void GPIB_set_ESR (unsigned int byte,int operation) { - if (!is_gpib) return; + if (!is_gpib) { + return; + } TNT_4882_Status(ESR,byte,operation); } @@ -969,7 +991,9 @@ void GPIB_set_ESR (unsigned int byte,int operation) void GPIB_set_SRE (unsigned int byte,int operation) { - if (!is_gpib) return; + if (!is_gpib) { + return; + } TNT_4882_Status(SRE,byte,operation); } @@ -977,7 +1001,9 @@ void GPIB_set_SRE (unsigned int byte,int operation) void GPIB_set_ESE (unsigned int byte,int operation) { - if (!is_gpib) return; + if (!is_gpib) { + return; + } TNT_4882_Status(ESE,byte,operation); } @@ -985,7 +1011,9 @@ void GPIB_set_ESE (unsigned int byte,int operation) void GPIB_Set_Execution_Error () { - if (!is_gpib) return; + if (!is_gpib) { + return; + } TNT_4882_Status(3,0x10,1); } @@ -993,7 +1021,9 @@ void GPIB_Set_Execution_Error () void GPIB_Set_Command_Error () { - if (!is_gpib) return; + if (!is_gpib) { + return; + } TNT_4882_Status(3,0x20,1); } @@ -1001,7 +1031,9 @@ void GPIB_Set_Command_Error () void GPIB_Set_Query_Error () { - if (!is_gpib) return; + if (!is_gpib) { + return; + } TNT_4882_Status(3,0x04,1); } @@ -1009,7 +1041,9 @@ void GPIB_Set_Query_Error () void GPIB_Set_Device_Dependent_Error () { - if (!is_gpib) return; + if (!is_gpib) { + return; + } TNT_4882_Status(3,0x08,1); } |