summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/examples/cc3000/shell.c2
-rw-r--r--apps/examples/ostest/cond.c2
-rw-r--r--apps/examples/telnetd/shell.c2
-rw-r--r--apps/netutils/thttpd/thttpd.c2
-rw-r--r--apps/netutils/webclient/webclient.c2
-rw-r--r--apps/netutils/webserver/httpd_fs.c10
-rw-r--r--apps/nshlib/nsh_codeccmd.c4
-rw-r--r--apps/nshlib/nsh_netcmds.c2
-rw-r--r--apps/nshlib/nsh_telnetd.c2
-rw-r--r--apps/system/readline/readline_common.c2
-rw-r--r--nuttx/arch/8051/src/up_assert.c2
-rw-r--r--nuttx/arch/8051/src/up_irqtest.c2
-rw-r--r--nuttx/arch/arm/src/arm/up_assert.c2
-rw-r--r--nuttx/arch/arm/src/armv6-m/up_assert.c2
-rw-r--r--nuttx/arch/arm/src/armv7-a/arm_assert.c2
-rw-r--r--nuttx/arch/arm/src/armv7-m/up_assert.c2
-rw-r--r--nuttx/arch/arm/src/common/up_vfork.c2
-rw-r--r--nuttx/arch/arm/src/dm320/dm320_serial.c2
-rw-r--r--nuttx/arch/arm/src/imx/imx_serial.c2
-rw-r--r--nuttx/arch/arm/src/kinetis/kinetis_start.c2
-rw-r--r--nuttx/arch/arm/src/kl/kl_start.c2
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_start.c2
-rw-r--r--nuttx/arch/arm/src/lpc43xx/lpc43_start.c2
-rw-r--r--nuttx/arch/arm/src/nuc1xx/nuc_start.c2
-rw-r--r--nuttx/arch/arm/src/sam34/sam_start.c2
-rw-r--r--nuttx/arch/arm/src/samd/sam_start.c2
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_start.c2
-rw-r--r--nuttx/arch/arm/src/tiva/tiva_start.c2
-rw-r--r--nuttx/arch/avr/src/common/up_assert.c2
-rw-r--r--nuttx/arch/hc/src/m9s12/m9s12_assert.c2
-rw-r--r--nuttx/arch/mips/src/mips32/up_assert.c2
-rw-r--r--nuttx/arch/mips/src/mips32/up_vfork.c2
-rw-r--r--nuttx/arch/sh/src/common/up_assert.c2
-rw-r--r--nuttx/arch/x86/src/common/up_assert.c2
-rw-r--r--nuttx/arch/x86/src/qemu/qemu_vga.c6
-rw-r--r--nuttx/arch/z16/src/common/up_assert.c2
-rw-r--r--nuttx/arch/z80/src/common/up_assert.c2
-rw-r--r--nuttx/arch/z80/src/ez80/ez80_spi.c2
-rw-r--r--nuttx/configs/open1788/src/lpc17_sdraminitialize.c2
-rw-r--r--nuttx/configs/us7032evb1/shterm/shterm.c2
-rw-r--r--nuttx/configs/vsn/src/power.c2
-rw-r--r--nuttx/configs/vsn/src/sif.c280
-rw-r--r--nuttx/drivers/lcd/p14201.c4
-rw-r--r--nuttx/fs/nxffs/nxffs_pack.c2
-rw-r--r--nuttx/libc/net/lib_inetpton.c4
-rw-r--r--nuttx/libc/queue/sq_rem.c2
-rw-r--r--nuttx/libc/queue/sq_remlast.c2
-rw-r--r--nuttx/libc/stdio/lib_libfgets.c2
-rw-r--r--nuttx/net/uip/uip_neighbor.c6
-rw-r--r--nuttx/sched/sig_dispatch.c6
-rw-r--r--nuttx/sched/sig_findaction.c2
-rw-r--r--nuttx/tools/kconfig2html.c2
52 files changed, 190 insertions, 218 deletions
diff --git a/apps/examples/cc3000/shell.c b/apps/examples/cc3000/shell.c
index 9678863e0..f28d3f0ed 100644
--- a/apps/examples/cc3000/shell.c
+++ b/apps/examples/cc3000/shell.c
@@ -171,7 +171,7 @@ int shell_session(int argc, char *argv[])
stkmon_disp();
#endif
- for(;;)
+ for (;;)
{
printf(SHELL_PROMPT);
fflush(stdout);
diff --git a/apps/examples/ostest/cond.c b/apps/examples/ostest/cond.c
index 35456efc1..ed95473de 100644
--- a/apps/examples/ostest/cond.c
+++ b/apps/examples/ostest/cond.c
@@ -61,7 +61,7 @@ static void *thread_waiter(void *parameter)
printf("waiter_thread: Started\n");
- for(;;)
+ for (;;)
{
/* Take the mutex */
diff --git a/apps/examples/telnetd/shell.c b/apps/examples/telnetd/shell.c
index c26b1e168..03d178e9c 100644
--- a/apps/examples/telnetd/shell.c
+++ b/apps/examples/telnetd/shell.c
@@ -164,7 +164,7 @@ int shell_session(int argc, char *argv[])
printf("uIP command shell -- NuttX style\n");
printf("Type '?' and return for help\n");
- for(;;)
+ for (;;)
{
printf(SHELL_PROMPT);
fflush(stdout);
diff --git a/apps/netutils/thttpd/thttpd.c b/apps/netutils/thttpd/thttpd.c
index a04a932bf..57fe43514 100644
--- a/apps/netutils/thttpd/thttpd.c
+++ b/apps/netutils/thttpd/thttpd.c
@@ -756,7 +756,7 @@ int thttpd_main(int argc, char **argv)
nvdbg("Entering the main loop\n");
(void)gettimeofday(&tv, NULL);
- for(;;)
+ for (;;)
{
/* Do the fd watch */
diff --git a/apps/netutils/webclient/webclient.c b/apps/netutils/webclient/webclient.c
index 741f7a176..ea1bd0714 100644
--- a/apps/netutils/webclient/webclient.c
+++ b/apps/netutils/webclient/webclient.c
@@ -548,7 +548,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen,
ws.state = WEBCLIENT_STATE_STATUSLINE;
redirected = false;
- for(;;)
+ for (;;)
{
ws.datend = recv(sockfd, ws.buffer, ws.buflen, 0);
if (ws.datend < 0)
diff --git a/apps/netutils/webserver/httpd_fs.c b/apps/netutils/webserver/httpd_fs.c
index b8eae3063..8d1cddbab 100644
--- a/apps/netutils/webserver/httpd_fs.c
+++ b/apps/netutils/webserver/httpd_fs.c
@@ -96,9 +96,9 @@ int httpd_fs_open(const char *name, struct httpd_fs_file *file)
#endif
struct httpd_fsdata_file_noconst *f;
- for(f = (struct httpd_fsdata_file_noconst *)g_httpdfs_root;
- f != NULL;
- f = (struct httpd_fsdata_file_noconst *)f->next)
+ for (f = (struct httpd_fsdata_file_noconst *)g_httpdfs_root;
+ f != NULL;
+ f = (struct httpd_fsdata_file_noconst *)f->next)
{
if (httpd_fs_strcmp(name, f->name) == 0)
{
@@ -123,7 +123,7 @@ void httpd_fs_init(void)
count = (uint16_t*)malloc(g_httpd_numfiles * sizeof(uint16_t));
- for(i = 0; i < g_httpd_numfiles; i++)
+ for (i = 0; i < g_httpd_numfiles; i++)
{
count[i] = 0;
}
@@ -137,7 +137,7 @@ uint16_t httpd_fs_count(char *name)
uint16_t i;
i = 0;
- for(f = (struct httpd_fsdata_file_noconst *)g_httpdfs_root;
+ for (f = (struct httpd_fsdata_file_noconst *)g_httpdfs_root;
f != NULL;
f = (struct httpd_fsdata_file_noconst *)f->next)
{
diff --git a/apps/nshlib/nsh_codeccmd.c b/apps/nshlib/nsh_codeccmd.c
index 3576f8c84..6c056b2c5 100644
--- a/apps/nshlib/nsh_codeccmd.c
+++ b/apps/nshlib/nsh_codeccmd.c
@@ -391,7 +391,7 @@ static int cmd_codecs_proc(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv,
MD5Final(mac, &ctx);
pSrc = (char *)&mac;
pDest = buffer;
- for(i=0;i<16;i++,pSrc++)
+ for (i = 0; i < 16; i++, pSrc++)
{
*pDest++ = hex_chars[(*pSrc) >> 4];
*pDest++ = hex_chars[(*pSrc) & 0x0f];
@@ -427,7 +427,7 @@ static int cmd_codecs_proc(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv,
MD5Final(mac, &ctx);
pSrc = (char *)&mac;
pDest = buffer;
- for(i=0;i<16;i++,pSrc++)
+ for (i = 0; i < 16; i++, pSrc++)
{
*pDest++ = hex_chars[(*pSrc) >> 4];
*pDest++ = hex_chars[(*pSrc) & 0x0f];
diff --git a/apps/nshlib/nsh_netcmds.c b/apps/nshlib/nsh_netcmds.c
index ef43fe0f6..7d58ded5d 100644
--- a/apps/nshlib/nsh_netcmds.c
+++ b/apps/nshlib/nsh_netcmds.c
@@ -619,7 +619,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
if (argc > 2)
{
- for(i = 0; i < argc; i++)
+ for (i = 0; i < argc; i++)
{
if (i == 1)
{
diff --git a/apps/nshlib/nsh_telnetd.c b/apps/nshlib/nsh_telnetd.c
index 9e712cc7b..c77e256a4 100644
--- a/apps/nshlib/nsh_telnetd.c
+++ b/apps/nshlib/nsh_telnetd.c
@@ -123,7 +123,7 @@ int nsh_telnetlogin(struct console_stdio_s *pstate)
/* Loop for the configured number of retries */
- for(i = 0; i < CONFIG_NSH_TELNET_FAILCOUNT; i++)
+ for (i = 0; i < CONFIG_NSH_TELNET_FAILCOUNT; i++)
{
/* Ask for the login username */
diff --git a/apps/system/readline/readline_common.c b/apps/system/readline/readline_common.c
index 7f3806eac..31d28cf42 100644
--- a/apps/system/readline/readline_common.c
+++ b/apps/system/readline/readline_common.c
@@ -141,7 +141,7 @@ ssize_t readline_common(FAR struct rl_common_s *vtbl, FAR char *buf, int buflen)
escape = 0;
nch = 0;
- for(;;)
+ for (;;)
{
/* Get the next character. readline_rawgetc() returns EOF on any
* errors or at the end of file.
diff --git a/nuttx/arch/8051/src/up_assert.c b/nuttx/arch/8051/src/up_assert.c
index 2b9cf7759..0be57a792 100644
--- a/nuttx/arch/8051/src/up_assert.c
+++ b/nuttx/arch/8051/src/up_assert.c
@@ -81,7 +81,7 @@ static void _up_assert(int errorcode)
if (g_irqtos || ((FAR struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
- for(;;)
+ for (;;)
{
#ifdef CONFIG_ARCH_LEDS
board_led_on(LED_PANIC);
diff --git a/nuttx/arch/8051/src/up_irqtest.c b/nuttx/arch/8051/src/up_irqtest.c
index ec3ee487d..21b558c67 100644
--- a/nuttx/arch/8051/src/up_irqtest.c
+++ b/nuttx/arch/8051/src/up_irqtest.c
@@ -207,7 +207,7 @@ void os_start(void)
_up_puts("Test complete");
_up_putnl();
- for(;;);
+ for (;;);
}
/************************************************************************
diff --git a/nuttx/arch/arm/src/arm/up_assert.c b/nuttx/arch/arm/src/arm/up_assert.c
index e1fc9ad75..f729d8550 100644
--- a/nuttx/arch/arm/src/arm/up_assert.c
+++ b/nuttx/arch/arm/src/arm/up_assert.c
@@ -301,7 +301,7 @@ static void _up_assert(int errorcode)
if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
- for(;;)
+ for (;;)
{
#ifdef CONFIG_ARCH_LEDS
board_led_on(LED_PANIC);
diff --git a/nuttx/arch/arm/src/armv6-m/up_assert.c b/nuttx/arch/arm/src/armv6-m/up_assert.c
index 9dec6306a..1becf4987 100644
--- a/nuttx/arch/arm/src/armv6-m/up_assert.c
+++ b/nuttx/arch/arm/src/armv6-m/up_assert.c
@@ -317,7 +317,7 @@ static void _up_assert(int errorcode)
if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
- for(;;)
+ for (;;)
{
#ifdef CONFIG_ARCH_LEDS
board_led_on(LED_PANIC);
diff --git a/nuttx/arch/arm/src/armv7-a/arm_assert.c b/nuttx/arch/arm/src/armv7-a/arm_assert.c
index bede2df4e..12a5615a0 100644
--- a/nuttx/arch/arm/src/armv7-a/arm_assert.c
+++ b/nuttx/arch/arm/src/armv7-a/arm_assert.c
@@ -312,7 +312,7 @@ static void _up_assert(int errorcode)
if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
- for(;;)
+ for (;;)
{
#ifdef CONFIG_ARCH_LEDS
board_led_on(LED_PANIC);
diff --git a/nuttx/arch/arm/src/armv7-m/up_assert.c b/nuttx/arch/arm/src/armv7-m/up_assert.c
index 53c9ac20a..2c538f017 100644
--- a/nuttx/arch/arm/src/armv7-m/up_assert.c
+++ b/nuttx/arch/arm/src/armv7-m/up_assert.c
@@ -327,7 +327,7 @@ static void _up_assert(int errorcode)
if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
- for(;;)
+ for (;;)
{
#ifdef CONFIG_ARCH_LEDS
board_led_on(LED_PANIC);
diff --git a/nuttx/arch/arm/src/common/up_vfork.c b/nuttx/arch/arm/src/common/up_vfork.c
index 03fb09b2f..4e9f76718 100644
--- a/nuttx/arch/arm/src/common/up_vfork.c
+++ b/nuttx/arch/arm/src/common/up_vfork.c
@@ -185,7 +185,7 @@ pid_t up_vfork(const struct vfork_s *context)
/* Make some feeble effort to perserve the stack contents. This is
* feeble because the stack surely contains invalid pointers and other
* content that will not work in the child context. However, if the
- * user follows all of the caveats of vfor() usage, even this feeble
+ * user follows all of the caveats of vfork() usage, even this feeble
* effort is overkill.
*/
diff --git a/nuttx/arch/arm/src/dm320/dm320_serial.c b/nuttx/arch/arm/src/dm320/dm320_serial.c
index 5b944b9b7..abea36d57 100644
--- a/nuttx/arch/arm/src/dm320/dm320_serial.c
+++ b/nuttx/arch/arm/src/dm320/dm320_serial.c
@@ -493,7 +493,7 @@ static int up_interrupt(int irq, void *context)
* until we have been looping for a long time.
*/
- for(;;)
+ for (;;)
{
/* Get the current UART status and check for loop
* termination conditions
diff --git a/nuttx/arch/arm/src/imx/imx_serial.c b/nuttx/arch/arm/src/imx/imx_serial.c
index 08f57eeda..c866a53f9 100644
--- a/nuttx/arch/arm/src/imx/imx_serial.c
+++ b/nuttx/arch/arm/src/imx/imx_serial.c
@@ -832,7 +832,7 @@ static int up_interrupt(int irq, void *context)
* until we have been looping for a long time.
*/
- for(;;)
+ for (;;)
{
/* Get the current UART status and check for loop
* termination conditions
diff --git a/nuttx/arch/arm/src/kinetis/kinetis_start.c b/nuttx/arch/arm/src/kinetis/kinetis_start.c
index 6a309ab83..b611709a6 100644
--- a/nuttx/arch/arm/src/kinetis/kinetis_start.c
+++ b/nuttx/arch/arm/src/kinetis/kinetis_start.c
@@ -165,5 +165,5 @@ void __start(void)
/* Shouldn't get here */
- for(;;);
+ for (;;);
}
diff --git a/nuttx/arch/arm/src/kl/kl_start.c b/nuttx/arch/arm/src/kl/kl_start.c
index 3daa3ef33..79d1ec160 100644
--- a/nuttx/arch/arm/src/kl/kl_start.c
+++ b/nuttx/arch/arm/src/kl/kl_start.c
@@ -181,6 +181,6 @@ void __start(void)
/* Shoulnd't get here */
- for(;;);
+ for (;;);
}
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_start.c b/nuttx/arch/arm/src/lpc17xx/lpc17_start.c
index 256d035ab..7f8756f4c 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_start.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_start.c
@@ -257,5 +257,5 @@ void __start(void)
/* Shouldn't get here */
- for(;;);
+ for (;;);
}
diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_start.c b/nuttx/arch/arm/src/lpc43xx/lpc43_start.c
index fc96ab14a..19756c754 100644
--- a/nuttx/arch/arm/src/lpc43xx/lpc43_start.c
+++ b/nuttx/arch/arm/src/lpc43xx/lpc43_start.c
@@ -357,5 +357,5 @@ void __start(void)
/* Shouldn't get here */
- for(;;);
+ for (;;);
}
diff --git a/nuttx/arch/arm/src/nuc1xx/nuc_start.c b/nuttx/arch/arm/src/nuc1xx/nuc_start.c
index 4d5b9c302..aeb0f4e6e 100644
--- a/nuttx/arch/arm/src/nuc1xx/nuc_start.c
+++ b/nuttx/arch/arm/src/nuc1xx/nuc_start.c
@@ -174,5 +174,5 @@ void __start(void)
/* Shoulnd't get here */
- for(;;);
+ for (;;);
}
diff --git a/nuttx/arch/arm/src/sam34/sam_start.c b/nuttx/arch/arm/src/sam34/sam_start.c
index d0f855585..3cf653b0f 100644
--- a/nuttx/arch/arm/src/sam34/sam_start.c
+++ b/nuttx/arch/arm/src/sam34/sam_start.c
@@ -191,5 +191,5 @@ void __start(void)
/* Shouldn't get here */
- for(;;);
+ for (;;);
}
diff --git a/nuttx/arch/arm/src/samd/sam_start.c b/nuttx/arch/arm/src/samd/sam_start.c
index 8f749339b..81aacbe47 100644
--- a/nuttx/arch/arm/src/samd/sam_start.c
+++ b/nuttx/arch/arm/src/samd/sam_start.c
@@ -175,5 +175,5 @@ void __start(void)
/* Shoulnd't get here */
- for(;;);
+ for (;;);
}
diff --git a/nuttx/arch/arm/src/stm32/stm32_start.c b/nuttx/arch/arm/src/stm32/stm32_start.c
index 689fcc215..20fb2054c 100644
--- a/nuttx/arch/arm/src/stm32/stm32_start.c
+++ b/nuttx/arch/arm/src/stm32/stm32_start.c
@@ -306,6 +306,6 @@ void __start(void)
/* Shoulnd't get here */
- for(;;);
+ for (;;);
#endif
}
diff --git a/nuttx/arch/arm/src/tiva/tiva_start.c b/nuttx/arch/arm/src/tiva/tiva_start.c
index 2c0c6999c..ed6381554 100644
--- a/nuttx/arch/arm/src/tiva/tiva_start.c
+++ b/nuttx/arch/arm/src/tiva/tiva_start.c
@@ -165,5 +165,5 @@ void __start(void)
/* Shoulnd't get here */
- for(;;);
+ for (;;);
}
diff --git a/nuttx/arch/avr/src/common/up_assert.c b/nuttx/arch/avr/src/common/up_assert.c
index c66ce0fca..7aac46c2a 100644
--- a/nuttx/arch/avr/src/common/up_assert.c
+++ b/nuttx/arch/avr/src/common/up_assert.c
@@ -105,7 +105,7 @@ static void _up_assert(int errorcode)
if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
- for(;;)
+ for (;;)
{
#ifdef CONFIG_ARCH_LEDS
board_led_on(LED_PANIC);
diff --git a/nuttx/arch/hc/src/m9s12/m9s12_assert.c b/nuttx/arch/hc/src/m9s12/m9s12_assert.c
index e62bdd5f6..b977f8822 100644
--- a/nuttx/arch/hc/src/m9s12/m9s12_assert.c
+++ b/nuttx/arch/hc/src/m9s12/m9s12_assert.c
@@ -280,7 +280,7 @@ static void _up_assert(int errorcode)
if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
- for(;;)
+ for (;;)
{
#ifdef CONFIG_ARCH_LEDS
board_led_on(LED_PANIC);
diff --git a/nuttx/arch/mips/src/mips32/up_assert.c b/nuttx/arch/mips/src/mips32/up_assert.c
index 767393667..da789ad81 100644
--- a/nuttx/arch/mips/src/mips32/up_assert.c
+++ b/nuttx/arch/mips/src/mips32/up_assert.c
@@ -105,7 +105,7 @@ static void _up_assert(int errorcode)
if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
- for(;;)
+ for (;;)
{
#ifdef CONFIG_ARCH_LEDS
board_led_on(LED_PANIC);
diff --git a/nuttx/arch/mips/src/mips32/up_vfork.c b/nuttx/arch/mips/src/mips32/up_vfork.c
index 15fd32812..82b097a26 100644
--- a/nuttx/arch/mips/src/mips32/up_vfork.c
+++ b/nuttx/arch/mips/src/mips32/up_vfork.c
@@ -190,7 +190,7 @@ pid_t up_vfork(const struct vfork_s *context)
/* Make some feeble effort to perserve the stack contents. This is
* feeble because the stack surely contains invalid pointers and other
* content that will not work in the child context. However, if the
- * user follows all of the caveats of vfor() usage, even this feeble
+ * user follows all of the caveats of vfork() usage, even this feeble
* effort is overkill.
*/
diff --git a/nuttx/arch/sh/src/common/up_assert.c b/nuttx/arch/sh/src/common/up_assert.c
index 12f177e8f..1c4016665 100644
--- a/nuttx/arch/sh/src/common/up_assert.c
+++ b/nuttx/arch/sh/src/common/up_assert.c
@@ -92,7 +92,7 @@ static void _up_assert(int errorcode)
if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
- for(;;)
+ for (;;)
{
#ifdef CONFIG_ARCH_LEDS
board_led_on(LED_PANIC);
diff --git a/nuttx/arch/x86/src/common/up_assert.c b/nuttx/arch/x86/src/common/up_assert.c
index b67db487b..8f4f53b9a 100644
--- a/nuttx/arch/x86/src/common/up_assert.c
+++ b/nuttx/arch/x86/src/common/up_assert.c
@@ -242,7 +242,7 @@ static void _up_assert(int errorcode)
if (current_regs || ((struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
- for(;;)
+ for (;;)
{
#ifdef CONFIG_ARCH_LEDS
board_led_on(LED_PANIC);
diff --git a/nuttx/arch/x86/src/qemu/qemu_vga.c b/nuttx/arch/x86/src/qemu/qemu_vga.c
index fe34382fb..78cec8121 100644
--- a/nuttx/arch/x86/src/qemu/qemu_vga.c
+++ b/nuttx/arch/x86/src/qemu/qemu_vga.c
@@ -294,12 +294,12 @@ static int init_graph_vga(int width, int height,int chain4)
outb(val, 0x3c2);
outw(0x0e11, 0x3d4); /* enable regs 0-7 */
- for(a = 0; a < SZ(g_hor_regs); ++a)
+ for (a = 0; a < SZ(g_hor_regs); ++a)
{
outw((uint16_t)((w[a] << 8) + g_hor_regs[a]), 0x3d4);
}
- for(a = 0; a < SZ(g_ver_regs); ++a)
+ for (a = 0; a < SZ(g_ver_regs); ++a)
{
outw((uint16_t)((h[a] << 8) + g_ver_regs[a]), 0x3d4);
}
@@ -330,7 +330,7 @@ static int init_graph_vga(int width, int height,int chain4)
outb(0x33, 0x3c0);
outb(0x00, 0x3c0);
- for(a = 0; a < 16; a++) /* ega pal */
+ for (a = 0; a < 16; a++) /* ega pal */
{
outb((uint8_t)a, 0x3c0);
outb((uint8_t)a, 0x3c0);
diff --git a/nuttx/arch/z16/src/common/up_assert.c b/nuttx/arch/z16/src/common/up_assert.c
index bc63f9b6c..d2b64026e 100644
--- a/nuttx/arch/z16/src/common/up_assert.c
+++ b/nuttx/arch/z16/src/common/up_assert.c
@@ -91,7 +91,7 @@ static void _up_assert(int errorcode) /* noreturn_function */
if (up_interrupt_context() || ((FAR struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
- for(;;)
+ for (;;)
{
#ifdef CONFIG_ARCH_LEDS
board_led_on(LED_PANIC);
diff --git a/nuttx/arch/z80/src/common/up_assert.c b/nuttx/arch/z80/src/common/up_assert.c
index 40907991b..9bdd5cdf5 100644
--- a/nuttx/arch/z80/src/common/up_assert.c
+++ b/nuttx/arch/z80/src/common/up_assert.c
@@ -90,7 +90,7 @@ static void _up_assert(int errorcode) /* noreturn_function */
if (up_interrupt_context() || ((FAR struct tcb_s*)g_readytorun.head)->pid == 0)
{
(void)irqsave();
- for(;;)
+ for (;;)
{
#ifdef CONFIG_ARCH_LEDS
board_led_on(LED_PANIC);
diff --git a/nuttx/arch/z80/src/ez80/ez80_spi.c b/nuttx/arch/z80/src/ez80/ez80_spi.c
index 475c946a5..260bdc777 100644
--- a/nuttx/arch/z80/src/ez80/ez80_spi.c
+++ b/nuttx/arch/z80/src/ez80/ez80_spi.c
@@ -300,7 +300,7 @@ static uint8_t spi_transfer(uint8_t ch)
/* Send the byte, repeating if some error occurs */
- for(;;)
+ for (;;)
{
outp(EZ80_SPI_TSR, ch);
diff --git a/nuttx/configs/open1788/src/lpc17_sdraminitialize.c b/nuttx/configs/open1788/src/lpc17_sdraminitialize.c
index d0081ac18..1b3063117 100644
--- a/nuttx/configs/open1788/src/lpc17_sdraminitialize.c
+++ b/nuttx/configs/open1788/src/lpc17_sdraminitialize.c
@@ -195,7 +195,7 @@ void open1788_sdram_initialize(void)
/* Wait 128 AHB clock cycles */
- for(i = 0; i < 128; i++);
+ for (i = 0; i < 128; i++);
/* 64ms/8192 = 7.8125us, nx16x8.33ns < 7.8125us, n < 58.6*/
diff --git a/nuttx/configs/us7032evb1/shterm/shterm.c b/nuttx/configs/us7032evb1/shterm/shterm.c
index 38840bab6..c08b5e17e 100644
--- a/nuttx/configs/us7032evb1/shterm/shterm.c
+++ b/nuttx/configs/us7032evb1/shterm/shterm.c
@@ -665,7 +665,7 @@ int main(int argc, char **argv, char **envp)
/* Loopo until control-C */
- for(;;)
+ for (;;)
{
/* Read characters from the console, and echo them to the target tty */
diff --git a/nuttx/configs/vsn/src/power.c b/nuttx/configs/vsn/src/power.c
index 9cbcfaac8..56991cf33 100644
--- a/nuttx/configs/vsn/src/power.c
+++ b/nuttx/configs/vsn/src/power.c
@@ -104,5 +104,5 @@ void board_power_off(void)
// trigger shutdown with pull-up resistor (not push-pull!) and wait.
stm32_gpiowrite(GPIO_PCLR, true);
- for(;;);
+ for (;;);
}
diff --git a/nuttx/configs/vsn/src/sif.c b/nuttx/configs/vsn/src/sif.c
index 971c5ca86..0cdf46e05 100644
--- a/nuttx/configs/vsn/src/sif.c
+++ b/nuttx/configs/vsn/src/sif.c
@@ -38,33 +38,33 @@
/** \file
* \author Uros Platise
* \brief VSN Sensor Interface
- *
+ *
* Public interface:
- * - sif_init(): should be called just once after system starts, to
+ * - sif_init(): should be called just once after system starts, to
* initialize internal data structures, device driver and hardware
* - individual starts() and stops() that control gpio, usart, i2c, ...
* are wrapped throu open() and close()
* - read() and write() are used for streaming
- * - ioctl() for configuration
- *
+ * - ioctl() for configuration
+ *
* STDOUT Coding 16-bit (little endian):
* - MSB = 0 GPIOs, followed by the both GPIO config bytes
* - MSB = 1 Input AD, centered around 0x4000
- *
+ *
* STDIN Coding 16-bit (little endian):
* - MSB = 0 GPIOs, followed by the both GPIO config bytes
* - MSB-1 = 0 Analog Output (PWM or Power)
* - MSB-1 = 1 Analog Reference Tap
- *
+ *
* GPIO Update cycle:
* - if they follow the Analog Output, they are synced with them
* - if they follow the Analog Reference Tap, they are synced with them
* - if either is configured without sample rate value, they are updated
* immediately, same as them
- *
+ *
* Implementation:
- * - Complete internal states and updateing is made via the struct
- * vsn_sif_s, which is also accessible thru the ioctl() with
+ * - Complete internal states and updateing is made via the struct
+ * vsn_sif_s, which is also accessible thru the ioctl() with
* SNP Message descriptor.
**/
@@ -94,8 +94,8 @@
/****************************************************************************
* Declarations and Structures
- ****************************************************************************/
-
+ ****************************************************************************/
+
#define VSN_SIF_READ_BUFSIZE 128
#define VSN_SIF_WRITE_BUFSIZE 128
@@ -131,7 +131,7 @@ typedef unsigned char vsn_sif_gpio_t;
#define VSN_SIF_ANOUT_LOW 0 // Pseudo Analog Output acts as GPIO
#define VSN_SIF_ANOUT_HIGH 1 // Pseudo Analog Output acts as GPIO high
#define VSN_SIF_ANOUT_HIGHPWR 2 // ... acts as high power output
-#define VSN_SIF_ANOUT_PWM 3 // ... acts as PWM output
+#define VSN_SIF_ANOUT_PWM 3 // ... acts as PWM output
#define VSN_SIF_ANOUT_PWMPWR 4 // acts as power PWM output
#define VSN_SIF_ANIN_GAINMASK 7
@@ -160,7 +160,7 @@ typedef unsigned char vsn_sif_gpio_t;
struct vsn_sif_s {
- vsn_sif_state_t state; // activity
+ vsn_sif_state_t state; // activity
unsigned char opencnt; // open count
vsn_sif_gpio_t gpio[2];
@@ -173,68 +173,62 @@ struct vsn_sif_s {
unsigned short int anref_width;
unsigned short int anref_period; // setting it to 0, disables PWM
unsigned short int anref_samplerate; // as written by write()
-
+
unsigned char anin_opts;
unsigned int anin_samplerate; // returned on read() as 16-bit results
-
+
/*--- Private Data ---*/
-
+
struct stm32_tim_dev_s * tim3; // Timer3 is used for PWM, and Analog RefTap
struct stm32_tim_dev_s * tim8; // Timer8 is used for Power Switch
-
+
struct i2c_dev_s * i2c1;
struct i2c_dev_s * i2c2;
-
+
struct spi_dev_s * spi2;
-
+
sem_t exclusive_access;
};
-
/****************************************************************************
* Private data
- ****************************************************************************/
+ ****************************************************************************/
struct vsn_sif_s vsn_sif;
-
/****************************************************************************
* Semaphores
- ****************************************************************************/
+ ****************************************************************************/
void sif_sem_wait(void)
{
- while (sem_wait( &vsn_sif.exclusive_access ) != 0)
+ while (sem_wait(&vsn_sif.exclusive_access) != 0)
{
ASSERT(errno == EINTR);
}
}
-
void inline sif_sem_post(void)
{
- sem_post( &vsn_sif.exclusive_access );
+ sem_post(&vsn_sif.exclusive_access);
}
-
/****************************************************************************
* GPIOs and Alternative Functions
- ****************************************************************************/
-
+ ****************************************************************************/
void sif_gpios_reset(void)
{
vsn_sif.gpio[0] = vsn_sif.gpio[1] = VSN_SIF_GPIO_HIGHZ;
-
+
stm32_configgpio(GPIO_GP1_HIZ);
stm32_configgpio(GPIO_GP2_HIZ);
}
-
void sif_gpio1_update(void)
{
uint32_t val;
-
+
switch(vsn_sif.gpio[0] & VSN_SIF_GPIO_STATE_MASK) {
case VSN_SIF_GPIO_HIGHZ: val = GPIO_GP1_HIZ; break;
case VSN_SIF_GPIO_PULLUP: val = GPIO_GP1_PUP; break;
@@ -245,17 +239,16 @@ void sif_gpio1_update(void)
}
if (stm32_configgpio(val) == ERROR)
printf("Error updating1\n");
-
- if ( stm32_gpioread(val) )
+
+ if (stm32_gpioread(val))
vsn_sif.gpio[0] |= VSN_SIF_GPIO_READ_MASK;
else vsn_sif.gpio[0] &= ~VSN_SIF_GPIO_READ_MASK;
}
-
void sif_gpio2_update(void)
{
uint32_t val;
-
+
switch(vsn_sif.gpio[1]) {
case VSN_SIF_GPIO_HIGHZ: val = GPIO_GP2_HIZ; break;
case VSN_SIF_GPIO_PULLUP: val = GPIO_GP2_PUP; break;
@@ -266,13 +259,12 @@ void sif_gpio2_update(void)
}
if (stm32_configgpio(val) == ERROR)
printf("Error updating2\n");
-
- if ( stm32_gpioread(val) )
+
+ if (stm32_gpioread(val))
vsn_sif.gpio[1] |= VSN_SIF_GPIO_READ_MASK;
else vsn_sif.gpio[1] &= ~VSN_SIF_GPIO_READ_MASK;
}
-
int sif_gpios_lock(vsn_sif_state_t peripheral)
{
return ERROR;
@@ -284,15 +276,11 @@ int sif_gpios_unlock(vsn_sif_state_t peripheral)
return ERROR;
}
-
-
-
/****************************************************************************
* Analog Outputs
- ****************************************************************************/
-
-static volatile int test = 0, teirq;
+ ****************************************************************************/
+static volatile int test = 0, teirq;
static int sif_anout_isr(int irq, void *context)
{
@@ -300,42 +288,41 @@ static int sif_anout_isr(int irq, void *context)
test++;
teirq = irq;
-
+
return OK;
}
-
int sif_anout_init(void)
{
vsn_sif.tim3 = stm32_tim_init(3);
vsn_sif.tim8 = stm32_tim_init(8);
-
+
if (!vsn_sif.tim3 || !vsn_sif.tim8) return ERROR;
-
+
// Use the TIM3 as PWM modulated analogue output
-
+
STM32_TIM_SETPERIOD(vsn_sif.tim3, 5);
STM32_TIM_SETCOMPARE(vsn_sif.tim3, GPIO_OUT_PWM_TIM3_CH, 3);
STM32_TIM_SETCLOCK(vsn_sif.tim3, 36e6);
STM32_TIM_SETMODE(vsn_sif.tim3, STM32_TIM_MODE_UP);
STM32_TIM_SETCHANNEL(vsn_sif.tim3, GPIO_OUT_PWM_TIM3_CH, STM32_TIM_CH_OUTPWM | STM32_TIM_CH_POLARITY_NEG);
-
+
// Use the TIM8 to drive the upper power mosfet
-
+
STM32_TIM_SETISR(vsn_sif.tim8, sif_anout_isr, 0);
STM32_TIM_ENABLEINT(vsn_sif.tim8, 0);
-
+
STM32_TIM_SETPERIOD(vsn_sif.tim8, 4096);
STM32_TIM_SETCOMPARE(vsn_sif.tim8, GPIO_OUT_PWRPWM_TIM8_CH, 5000);
-
+
STM32_TIM_SETCLOCK(vsn_sif.tim8, 36e6);
STM32_TIM_SETMODE(vsn_sif.tim8, STM32_TIM_MODE_UP);
//STM32_TIM_SETCHANNEL(vsn_sif.tim8, GPIO_OUT_PWRPWM_TIM8_CH, STM32_TIM_CH_OUTPWM | STM32_TIM_CH_POLARITY_NEG);
vsn_sif.i2c1 = up_i2cinitialize(1);
vsn_sif.i2c2 = up_i2cinitialize(2);
-
+
vsn_sif.spi2 = up_spiinitialize(2);
return OK;
@@ -346,43 +333,39 @@ void sif_anout_update(void)
{
}
-
void sif_anout_callback(void)
{
- // called at rate of PWM interrupt
+ // called at rate of PWM interrupt
}
-
/****************************************************************************
* Analog Input Reference Tap
- ****************************************************************************/
-
+ ****************************************************************************/
void sif_anref_init(void)
{
}
-
/****************************************************************************
* Analog Input Sampler Unit
- ****************************************************************************/
+ ****************************************************************************/
#if 0
/**
* Gain is set using the shared multiplexed bus with the SDIO card.
* The following rules apply for the SDcard:
- *
+ *
* - CMD serial line always starts with 0 (start-bit) and ends with 1 (stop-bit)
- * The total length is always 48 bits protected by CRCs. When changing the
+ * The total length is always 48 bits protected by CRCs. When changing the
* gain, CMD must be seen as 1 on CK changes.
- *
+ *
* - An alternative mechanism would be to use suspend/resume commands
- *
+ *
* - If SDcard internal shift-register is 8-bit oriented there might be a need
- * to shift 7 dummy bits to properly detect invalid start of packet
- * (with start bit set as 1) to invalidate bus transitions (in case CK
+ * to shift 7 dummy bits to properly detect invalid start of packet
+ * (with start bit set as 1) to invalidate bus transitions (in case CK
* is changing).
- *
+ *
* SDIO returns the bus in HiZ states, where CLK = 0, D = CMD = external pull-up
*/
int sif_anin_setgain(int gain)
@@ -390,92 +373,88 @@ int sif_anin_setgain(int gain)
/* Shutdown the PGA and exit if gain is invalid */
stm32_gpiowrite(GPIO_PGIA_AEN, FALSE);
-
+
if (gain < 0 || gain > 7)
return -1;
-
+
sdio_gpio_request();
-
+
/* If we have to set CLK = 1, made that first as D, CMD are 1 by pull-ups */
-
+
if (gain & 2)
stm32_configgpio(GPIO_PGIA_A1_H);
else stm32_configgpio(GPIO_PGIA_A1_L);
-
+
/* Set the D and CMD bits */
-
+
if (gain & 1)
stm32_configgpio(GPIO_PGIA_A0_H);
else stm32_configgpio(GPIO_PGIA_A0_L);
-
+
if (gain & 4)
stm32_configgpio(GPIO_PGIA_A2_H);
else stm32_configgpio(GPIO_PGIA_A2_L);
-
+
/* Sample GAIN on rising edge */
-
+
stm32_gpiowrite(GPIO_PGIA_AEN, TRUE);
-
+
/* Release D and CMD pins to 1; however shorten rising edge actively */
-
+
stm32_gpiowrite(GPIO_PGIA_A0_H, TRUE);
stm32_gpiowrite(GPIO_PGIA_A2_H, TRUE);
-
+
stm32_unconfiggpio(GPIO_PGIA_A0_H);
stm32_unconfiggpio(GPIO_PGIA_A2_H);
-
+
/* Release CLK by going down */
-
- stm32_unconfiggpio(GPIO_PGIA_A1_L);
-
+
+ stm32_unconfiggpio(GPIO_PGIA_A1_L);
+
sdio_gpio_release();
-
+
return gain;
}
#endif
-
int sif_anin_reset(void)
{
return OK;
}
-
/****************************************************************************
* Device driver functions
- ****************************************************************************/
+ ****************************************************************************/
int devsif_open(FAR struct file *filep)
{
sif_sem_wait();
vsn_sif.opencnt++;
-
+
// Start Hardware
-
+
sif_sem_post();
return 0;
}
-
int devsif_close(FAR struct file *filep)
{
sif_sem_wait();
-
+
if (--vsn_sif.opencnt) {
-
+
// suspend (powerdown) hardware
-
+
sif_gpios_reset();
-
+
//STM32_TIM_SETCLOCK(vsn_sif.tim3, 0);
//STM32_TIM_SETCLOCK(vsn_sif.tim8, 0);
}
-
+
sif_sem_post();
return 0;
}
-
static ssize_t devsif_read(FAR struct file *filep, FAR char *buffer, size_t len)
{
sif_sem_wait();
@@ -484,23 +463,21 @@ static ssize_t devsif_read(FAR struct file *filep, FAR char *buffer, size_t len)
return len;
}
-
static ssize_t devsif_write(FAR struct file *filep, FAR const char *buffer, size_t len)
{
sif_sem_wait();
- printf("getpid: %d\n", getpid() );
+ printf("getpid: %d\n", getpid());
sif_sem_post();
return len;
}
-
#ifndef CONFIG_DISABLE_POLL
static int devsif_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup)
{
if (setup) {
fds->revents |= (fds->events & (POLLIN|POLLOUT));
-
+
if (fds->revents != 0) {
sem_post(fds->sem);
}
@@ -509,7 +486,6 @@ static int devsif_poll(FAR struct file *filep, FAR struct pollfd *fds,
}
#endif
-
int devsif_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
{
sif_sem_wait();
@@ -517,11 +493,9 @@ int devsif_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
return 0;
}
-
/****************************************************************************
* Public Functions
- ****************************************************************************/
-
+ ****************************************************************************/
static const struct file_operations devsif_fops = {
devsif_open, /* open */
@@ -535,43 +509,41 @@ static const struct file_operations devsif_fops = {
#endif
};
-
-/** Bring up the Sensor Interface by initializing all of the desired
+/** Bring up the Sensor Interface by initializing all of the desired
* hardware components.
**/
-
+
int sif_init(void)
{
/* Initialize data-structure */
-
+
vsn_sif.state = VSN_SIF_STATE_POWERDOWN;
vsn_sif.opencnt = 0;
sem_init(&vsn_sif.exclusive_access, 0, 1);
-
+
/* Initialize hardware */
-
+
sif_gpios_reset();
- if ( sif_anout_init() != OK ) return -1;
- if ( sif_anin_reset() != OK ) return -1;
+ if (sif_anout_init() != OK) return -1;
+ if (sif_anin_reset() != OK) return -1;
/* If everything is okay, register the driver */
-
+
(void)register_driver("/dev/sif0", &devsif_fops, 0666, NULL);
return OK;
}
-
/** SIF Utility
- *
+ *
* Provides direct access to the sensor connector, readings, and diagnostic.
**/
-
+
extern int cc1101_eventcb(int irq, FAR void *context);
-
+
int sif_main(int argc, char *argv[])
{
if (argc >= 2) {
- if (!strcmp(argv[1], "init")) {
+ if (!strcmp(argv[1], "init")) {
return sif_init();
}
else if (!strcmp(argv[1], "gpio") && argc == 4) {
@@ -579,7 +551,7 @@ int sif_main(int argc, char *argv[])
vsn_sif.gpio[1] = atoi(argv[3]);
sif_gpio1_update();
sif_gpio2_update();
- printf("GPIO States: %2x %2x\n", vsn_sif.gpio[0], vsn_sif.gpio[1] );
+ printf("GPIO States: %2x %2x\n", vsn_sif.gpio[0], vsn_sif.gpio[1]);
return 0;
}
else if (!strcmp(argv[1], "pwr") && argc == 3) {
@@ -593,12 +565,12 @@ int sif_main(int argc, char *argv[])
t_set.tv_sec = atoi(argv[2]);
clock_settime(CLOCK_REALTIME, &t_set);
}
- else if (!strcmp(argv[1], "free") ) {
+ else if (!strcmp(argv[1], "free")) {
uint16_t page = 0, stpage = 0xFFFF;
int status;
do {
status = up_progmem_ispageerased(page++);
-
+
/* Is this beginning of new free space section */
if (status == 0) {
if (stpage == 0xFFFF) stpage = page-1;
@@ -613,39 +585,39 @@ int sif_main(int argc, char *argv[])
while (status >= 0);
return 0;
}
- else if (!strcmp(argv[1], "erase") && argc == 3 ) {
+ else if (!strcmp(argv[1], "erase") && argc == 3) {
int page = atoi(argv[2]);
- printf("Erase result: %d\n", up_progmem_erasepage(page) );
+ printf("Erase result: %d\n", up_progmem_erasepage(page));
return 0;
}
- else if (!strcmp(argv[1], "flash") && argc == 3 ) {
+ else if (!strcmp(argv[1], "flash") && argc == 3) {
uint16_t page = atoi(argv[2]);
uint32_t addr = page * up_progmem_pagesize(page);
-
- printf("Write result: %d (writing to address %xh)\n",
- up_progmem_write( addr, "Test", 4 ), addr);
+
+ printf("Write result: %d (writing to address %xh)\n",
+ up_progmem_write(addr, "Test", 4), addr);
return 0;
}
else if (!strcmp(argv[1], "i2c") && argc == 3) {
int val = atoi(argv[2]);
-
+
I2C_SETFREQUENCY(vsn_sif.i2c1, 100000);
-
+
struct lis331dl_dev_s * lis = lis331dl_init(vsn_sif.i2c1, val);
if (lis) {
const struct lis331dl_vector_s * a;
int i;
uint32_t time_stamp = clock_systimer();
-
+
/* Set to 400 Hz : 3 = 133 Hz/axis */
-
+
lis331dl_setconversion(lis, false, true);
-
+
/* Sample some values */
-
- for (i=0; i<1000; ) {
- if ( (a = lis331dl_getreadings(lis)) ) {
+
+ for (i=0; i<1000;) {
+ if ((a = lis331dl_getreadings(lis))) {
i++;
printf("%d %d %d\n", a->x, a->y, a->z);
}
@@ -654,9 +626,9 @@ int sif_main(int argc, char *argv[])
break;
}
}
-
+
printf("Time diff = %d\n", clock_systimer() - time_stamp);
-
+
lis331dl_deinit(lis);
}
else printf("Exit point: errno=%d\n", errno);
@@ -665,7 +637,7 @@ int sif_main(int argc, char *argv[])
}
else if (!strcmp(argv[1], "pga")) {
int gain = atoi(argv[2]);
-
+
gain = vsn_muxbus_setpgagain(gain);
printf("Gain changed: %d\n", gain);
@@ -675,34 +647,34 @@ int sif_main(int argc, char *argv[])
struct cc1101_dev_s * cc;
uint8_t buf[64];
int sta;
-
+
cc = cc1101_init(vsn_sif.spi2, CC1101_PIN_GDO0, GPIO_CC1101_GDO0,
&cc1101_rfsettings_ISM1_868MHzGFSK100kbps);
-
+
if (cc) {
-
+
/* Work-around: enable falling edge, event and interrupt */
stm32_gpiosetevent(GPIO_CC1101_GDO0, false, true, true, cc1101_eventcb);
-
+
/* Enable clock to ARM PLL, allowing to speed-up to 72 MHz */
cc1101_setgdo(cc, CC1101_PIN_GDO2, CC1101_GDO_CLK_XOSC3);
-
+
cc1101_setchannel(cc, 0); /* AV Test Hex, receive on that channel */
cc1101_receive(cc); /* Enter RX mode */
- while (1)
+ while (1)
{
fflush(stdout);
sta = cc1101_read(cc, buf, 64);
if (sta > 0) {
- printf("Received %d bytes: rssi=%d [dBm], LQI=%d (CRC %s)\n",
+ printf("Received %d bytes: rssi=%d [dBm], LQI=%d (CRC %s)\n",
sta, cc1101_calcRSSIdBm(buf[sta-2]), buf[sta-1]&0x7F,
(buf[sta-1]&0x80)?"OK":"BAD");
-
+
cc1101_write(cc, buf, 61);
cc1101_send(cc);
-
+
printf("Packet send back\n");
-
+
cc1101_receive(cc);
}
}
@@ -711,12 +683,12 @@ int sif_main(int argc, char *argv[])
}
fprintf(stderr, "%s:\tinit\n\tgpio\tA B\n\tpwr\tval\n", argv[0]);
-
+
struct timespec t_active;
clock_gettime(CLOCK_ACTIVETIME, &t_active);
-
- fprintf(stderr, "rtc time = %u, active = %u / %u, time / systick = %u / %u\n",
+
+ fprintf(stderr, "rtc time = %u, active = %u / %u, time / systick = %u / %u\n",
up_rtc_time(), t_active.tv_sec, t_active.tv_nsec,
- time(NULL), clock_systimer() );
+ time(NULL), clock_systimer());
return -1;
}
diff --git a/nuttx/drivers/lcd/p14201.c b/nuttx/drivers/lcd/p14201.c
index 6c74a6f7c..094380b59 100644
--- a/nuttx/drivers/lcd/p14201.c
+++ b/nuttx/drivers/lcd/p14201.c
@@ -653,7 +653,7 @@ static inline void rit_clear(FAR struct rit_dev_s *priv)
/* Display each row */
- for(row = 0; row < RIT_YRES; row++)
+ for (row = 0; row < RIT_YRES; row++)
{
/* Display a horizontal run */
@@ -680,7 +680,7 @@ static inline void rit_clear(FAR struct rit_dev_s *priv)
/* Display each row */
- for(row = 0; row < RIT_YRES; row++)
+ for (row = 0; row < RIT_YRES; row++)
{
/* Display a horizontal run */
diff --git a/nuttx/fs/nxffs/nxffs_pack.c b/nuttx/fs/nxffs/nxffs_pack.c
index 7577aa66c..373b480bb 100644
--- a/nuttx/fs/nxffs/nxffs_pack.c
+++ b/nuttx/fs/nxffs/nxffs_pack.c
@@ -286,7 +286,7 @@ static inline int nxffs_startpos(FAR struct nxffs_volume_s *volume,
* compacting.
*/
- for(;;)
+ for (;;)
{
/* Is there wasted space between the offset where the we could have
* valid data and the offset to the beginning of the first valid
diff --git a/nuttx/libc/net/lib_inetpton.c b/nuttx/libc/net/lib_inetpton.c
index c5f117535..a0eca934b 100644
--- a/nuttx/libc/net/lib_inetpton.c
+++ b/nuttx/libc/net/lib_inetpton.c
@@ -133,7 +133,7 @@ int inet_pton(int af, FAR const char *src, FAR void *dst)
numoffset = 0;
ndots = 0;
- for(;;)
+ for (;;)
{
ch = (uint8_t)src[srcoffset++];
@@ -231,7 +231,7 @@ int inet_pton(int af, FAR const char *src, FAR void *dst)
nrsep = 0;
rtime = false;
- for(;;)
+ for (;;)
{
ch = (uint8_t)src[srcoffset++];
diff --git a/nuttx/libc/queue/sq_rem.c b/nuttx/libc/queue/sq_rem.c
index 6d234e6b3..2abf6d34e 100644
--- a/nuttx/libc/queue/sq_rem.c
+++ b/nuttx/libc/queue/sq_rem.c
@@ -66,7 +66,7 @@ void sq_rem(FAR sq_entry_t *node, sq_queue_t *queue)
else
{
FAR sq_entry_t *prev;
- for(prev = (FAR sq_entry_t*)queue->head;
+ for (prev = (FAR sq_entry_t*)queue->head;
prev && prev->flink != node;
prev = prev->flink);
diff --git a/nuttx/libc/queue/sq_remlast.c b/nuttx/libc/queue/sq_remlast.c
index 7c9aa7d16..961da5107 100644
--- a/nuttx/libc/queue/sq_remlast.c
+++ b/nuttx/libc/queue/sq_remlast.c
@@ -65,7 +65,7 @@ FAR sq_entry_t *sq_remlast(sq_queue_t *queue)
else
{
FAR sq_entry_t *prev;
- for(prev = queue->head;
+ for (prev = queue->head;
prev && prev->flink != ret;
prev = prev->flink);
diff --git a/nuttx/libc/stdio/lib_libfgets.c b/nuttx/libc/stdio/lib_libfgets.c
index b6229a4e7..73cf47adc 100644
--- a/nuttx/libc/stdio/lib_libfgets.c
+++ b/nuttx/libc/stdio/lib_libfgets.c
@@ -177,7 +177,7 @@ FAR char *lib_fgets(FAR char *buf, size_t buflen, FILE *stream,
* the next character and one for the null terminator.
*/
- for(;;)
+ for (;;)
{
/* Get the next character */
diff --git a/nuttx/net/uip/uip_neighbor.c b/nuttx/net/uip/uip_neighbor.c
index ecc45a09e..0dbb001dd 100644
--- a/nuttx/net/uip/uip_neighbor.c
+++ b/nuttx/net/uip/uip_neighbor.c
@@ -58,7 +58,7 @@ void uip_neighbor_init(void)
{
int i;
- for(i = 0; i < ENTRIES; ++i)
+ for (i = 0; i < ENTRIES; ++i)
{
entries[i].time = MAX_TIME;
}
@@ -68,7 +68,7 @@ void uip_neighbor_periodic(void)
{
int i;
- for(i = 0; i < ENTRIES; ++i)
+ for (i = 0; i < ENTRIES; ++i)
{
if (entries[i].time < MAX_TIME)
{
@@ -125,7 +125,7 @@ static struct neighbor_entry *find_entry(uip_ipaddr_t ipaddr)
{
int i;
- for(i = 0; i < ENTRIES; ++i)
+ for (i = 0; i < ENTRIES; ++i)
{
if (uip_ipaddr_cmp(entries[i].ipaddr, ipaddr))
{
diff --git a/nuttx/sched/sig_dispatch.c b/nuttx/sched/sig_dispatch.c
index 82c891b46..e59d0e73c 100644
--- a/nuttx/sched/sig_dispatch.c
+++ b/nuttx/sched/sig_dispatch.c
@@ -220,9 +220,9 @@ static FAR sigpendq_t *sig_findpendingsignal(FAR struct task_group_s *group,
/* Seach the list for a sigpendion on this signal */
- for(sigpend = (FAR sigpendq_t*)group->sigpendingq.head;
- (sigpend && sigpend->info.si_signo != signo);
- sigpend = sigpend->flink);
+ for (sigpend = (FAR sigpendq_t*)group->sigpendingq.head;
+ (sigpend && sigpend->info.si_signo != signo);
+ sigpend = sigpend->flink);
irqrestore(saved_state);
return sigpend;
diff --git a/nuttx/sched/sig_findaction.c b/nuttx/sched/sig_findaction.c
index c36c8fbfb..b701d3232 100644
--- a/nuttx/sched/sig_findaction.c
+++ b/nuttx/sched/sig_findaction.c
@@ -89,7 +89,7 @@ FAR sigactq_t *sig_findaction(FAR struct tcb_s *stcb, int signo)
/* Seach the list for a sigaction on this signal */
- for(sigact = (FAR sigactq_t*)stcb->sigactionq.head;
+ for (sigact = (FAR sigactq_t*)stcb->sigactionq.head;
((sigact) && (sigact->signo != signo));
sigact = sigact->flink);
diff --git a/nuttx/tools/kconfig2html.c b/nuttx/tools/kconfig2html.c
index a09fb67b6..ef34e75b2 100644
--- a/nuttx/tools/kconfig2html.c
+++ b/nuttx/tools/kconfig2html.c
@@ -690,7 +690,7 @@ static char *read_line(FILE *stream)
/* Loop to handle continuation lines */
- for(;;)
+ for (;;)
{
/* How long is the line so far? */