mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 19:44:35 +08:00
Costmetic changes to comments and spacing.
This commit is contained in:
@@ -44,30 +44,6 @@
|
|||||||
#include "nsh.h"
|
#include "nsh.h"
|
||||||
#include "nsh_console.h"
|
#include "nsh_console.h"
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Types
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Function Prototypes
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
@@ -282,6 +282,7 @@ int i2c_parse(FAR struct i2ctool_s *i2ctool, int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
newargs[nargs] = NULL;
|
newargs[nargs] = NULL;
|
||||||
|
|
||||||
/* Then execute the command */
|
/* Then execute the command */
|
||||||
@@ -351,12 +352,14 @@ int i2c_main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
/* Verify settings */
|
/* Verify settings */
|
||||||
|
|
||||||
if (g_i2ctool.bus < CONFIG_I2CTOOL_MINBUS || g_i2ctool.bus > CONFIG_I2CTOOL_MAXBUS)
|
if (g_i2ctool.bus < CONFIG_I2CTOOL_MINBUS ||
|
||||||
|
g_i2ctool.bus > CONFIG_I2CTOOL_MAXBUS)
|
||||||
{
|
{
|
||||||
g_i2ctool.bus = CONFIG_I2CTOOL_MINBUS;
|
g_i2ctool.bus = CONFIG_I2CTOOL_MINBUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_i2ctool.addr < CONFIG_I2CTOOL_MINADDR || g_i2ctool.addr > CONFIG_I2CTOOL_MAXADDR)
|
if (g_i2ctool.addr < CONFIG_I2CTOOL_MINADDR ||
|
||||||
|
g_i2ctool.addr > CONFIG_I2CTOOL_MAXADDR)
|
||||||
{
|
{
|
||||||
g_i2ctool.addr = CONFIG_I2CTOOL_MINADDR;
|
g_i2ctool.addr = CONFIG_I2CTOOL_MINADDR;
|
||||||
}
|
}
|
||||||
@@ -376,7 +379,7 @@ int i2c_main(int argc, char *argv[])
|
|||||||
g_i2ctool.freq = CONFIG_I2CTOOL_DEFFREQ;
|
g_i2ctool.freq = CONFIG_I2CTOOL_DEFFREQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Parse process the command line */
|
/* Parse and process the command line */
|
||||||
|
|
||||||
i2c_setup(&g_i2ctool);
|
i2c_setup(&g_i2ctool);
|
||||||
(void)i2c_parse(&g_i2ctool, argc, argv);
|
(void)i2c_parse(&g_i2ctool, argc, argv);
|
||||||
@@ -425,6 +428,7 @@ ssize_t i2ctool_write(FAR struct i2ctool_s *i2ctool, FAR const void *buffer, siz
|
|||||||
{
|
{
|
||||||
dbg("[%d] Failed to send buffer: %d\n", OUTFD(i2ctool), errno);
|
dbg("[%d] Failed to send buffer: %d\n", OUTFD(i2ctool), errno);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user