summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-10-04 08:06:25 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-10-04 08:06:25 -0400
commitff3ecc0632fbe0671f000595604e7c1de77f33dc (patch)
tree6518a6fd22666c960dfb204c805ed7b4fb371a77
parentb5d824985ca85bda978185bddca4066ac63a249c (diff)
astyle fixes
-rw-r--r--bus.c4
-rw-r--r--gpib.c68
-rw-r--r--i2c.c2
-rw-r--r--instr-daemon.c2
4 files changed, 55 insertions, 21 deletions
diff --git a/bus.c b/bus.c
index 3c83eac..bcd916f 100644
--- a/bus.c
+++ b/bus.c
@@ -200,8 +200,8 @@ static void gpmc_setup(void)
int WRACCESSTIME = DATA_READY;
int config6 = WRACCESSTIME << 24;
-
-
+
+
pinmux_configurepin("gpmc_csn0", PULL_UP | MODE_0);
pinmux_configurepin("gpmc_oen_ren", PULL_UP | MODE_0);
pinmux_configurepin("gpmc_wen", PULL_UP | MODE_0);
diff --git a/gpib.c b/gpib.c
index 7b42939..d28e7ca 100644
--- a/gpib.c
+++ b/gpib.c
@@ -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);
}
diff --git a/i2c.c b/i2c.c
index 767e4f6..dc52337 100644
--- a/i2c.c
+++ b/i2c.c
@@ -53,7 +53,7 @@ guchar I2C_Read(gulong address)
int device = open(I2C_BUS, O_RDWR);
if ((device == -1) && !read_error_flagged) {
- read_error_flagged = TRUE;
+ read_error_flagged = TRUE;
g_print_debug("ERROR: could not open I2C bus %s for reading\n", I2C_BUS);
return 0;
}
diff --git a/instr-daemon.c b/instr-daemon.c
index da396bc..f2b9ca2 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -334,7 +334,7 @@ static gboolean periodic_poll (void)
write(trgfd, "s\n", 2);
// poweroff
- system ("/usr/bin/systemctl poweroff -f");
+ system ("/usr/bin/systemctl poweroff -f");
}
Menu_Check_Buttons ();