You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/03/17 15:40:31 UTC
[incubator-nuttx] 15/21: boards: renesas: nxstyle fixes
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 06a0059d87f490753ccc13c38905ae8dcda54150
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Tue Mar 16 21:37:33 2021 +0100
boards: renesas: nxstyle fixes
Fixes to pass CI
Signed-off-by: Alin Jerpelea <al...@sony.com>
---
boards/renesas/m16c/skp16c26/include/board.h | 3 ++-
boards/renesas/m16c/skp16c26/src/m16c_lcd.c | 4 ++--
boards/renesas/m16c/skp16c26/src/m16c_leds.c | 12 ++++++------
boards/renesas/sh1/us7032evb1/include/board.h | 2 +-
boards/renesas/sh1/us7032evb1/shterm/shterm.c | 17 ++++++++++-------
5 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/boards/renesas/m16c/skp16c26/include/board.h b/boards/renesas/m16c/skp16c26/include/board.h
index 7c4cc34..dd60f10 100644
--- a/boards/renesas/m16c/skp16c26/include/board.h
+++ b/boards/renesas/m16c/skp16c26/include/board.h
@@ -38,7 +38,8 @@
* For details, please see ICD (RTA-FoUSB-MON) User Manual on Target M16C
* ROM Monitor Resources or related ICD application notes."
*
- * However, the schematic appears to show that SIO/UART2 is actual connection.
+ * However, the schematic appears to show that SIO/UART2 is actual
+ * connection.
* To be safe, we will error out on either selection:
*/
diff --git a/boards/renesas/m16c/skp16c26/src/m16c_lcd.c b/boards/renesas/m16c/skp16c26/src/m16c_lcd.c
index 49f5794..cf063e7 100644
--- a/boards/renesas/m16c/skp16c26/src/m16c_lcd.c
+++ b/boards/renesas/m16c/skp16c26/src/m16c_lcd.c
@@ -150,7 +150,7 @@ static inline void up_enpulse(bool data)
void up_lcdwrite(bool data, uint8_t ch)
{
- up_setrs(data); /* Set RS appropriately */
+ up_setrs(data); /* Set RS appropriately */
/* Write upper nibble first. Only the lower 4 bits of P9 are valid.
* The upper four bits are reserved and must be zero.
@@ -233,7 +233,7 @@ void up_lcdinit(void)
up_lcddelay(20);
up_lcdwrite(false, 0x32);
up_lcddelay(20);
- up_lcdwrite(false, FUNCTION_SET); /* reset sequence */
+ up_lcdwrite(false, FUNCTION_SET); /* reset sequence */
up_lcdwrite(false, FUNCTION_SET);
up_lcdwrite(false, LCD_CURSOR_OFF);
up_lcdwrite(false, LCD_CLEAR);
diff --git a/boards/renesas/m16c/skp16c26/src/m16c_leds.c b/boards/renesas/m16c/skp16c26/src/m16c_leds.c
index 3800731..62d373f 100644
--- a/boards/renesas/m16c/skp16c26/src/m16c_leds.c
+++ b/boards/renesas/m16c/skp16c26/src/m16c_leds.c
@@ -81,10 +81,9 @@ static const uint8_t g_ledstate[7] =
(GREEN_LED_ON | YELLOW_LED_OFF | RED_LED_OFF), /* LED_HEAPALLOCATE */
(GREEN_LED_OFF | YELLOW_LED_ON | RED_LED_OFF), /* LED_IRQSENABLED */
(GREEN_LED_ON | YELLOW_LED_ON | RED_LED_OFF), /* LED_STACKCREATED */
-
- (GREEN_LED_ON | YELLOW_LED_OFF | RED_LED_ON ), /* LED_INIRQ */
- (GREEN_LED_OFF | YELLOW_LED_ON | RED_LED_ON ), /* LED_SIGNAL */
- (GREEN_LED_ON | YELLOW_LED_ON | RED_LED_ON ) /* LED_ASSERTION */
+ (GREEN_LED_ON | YELLOW_LED_OFF | RED_LED_ON), /* LED_INIRQ */
+ (GREEN_LED_OFF | YELLOW_LED_ON | RED_LED_ON), /* LED_SIGNAL */
+ (GREEN_LED_ON | YELLOW_LED_ON | RED_LED_ON) /* LED_ASSERTION */
};
static uint8_t g_prevled[3];
@@ -154,8 +153,8 @@ void board_autoled_on(int led)
{
uint8_t ledset;
- /* If this is the ASSERTION led, preserve the Y&G bits from the last setting
- * and set the RED LED on.
+ /* If this is the ASSERTION led, preserve the Y&G bits from the last
+ * setting and set the RED LED on.
*/
if (led == LED_ASSERTION)
@@ -178,6 +177,7 @@ void board_autoled_on(int led)
{
g_nestlevel++;
}
+
g_prevled[g_nestlevel] = led;
}
}
diff --git a/boards/renesas/sh1/us7032evb1/include/board.h b/boards/renesas/sh1/us7032evb1/include/board.h
index 06e3aee..1d1461b 100644
--- a/boards/renesas/sh1/us7032evb1/include/board.h
+++ b/boards/renesas/sh1/us7032evb1/include/board.h
@@ -69,7 +69,7 @@ extern "C"
#endif
/****************************************************************************
- * Public Functions
+ * Public Functions Definitions
****************************************************************************/
#undef EXTERN
diff --git a/boards/renesas/sh1/us7032evb1/shterm/shterm.c b/boards/renesas/sh1/us7032evb1/shterm/shterm.c
index 018c584..2fcb525 100644
--- a/boards/renesas/sh1/us7032evb1/shterm/shterm.c
+++ b/boards/renesas/sh1/us7032evb1/shterm/shterm.c
@@ -461,8 +461,8 @@ static void interrupt(int signo)
static void show_usage(const char *progname, int exitcode)
{
fprintf(stderr,
- "\nUSAGE: %s [-h] [-d] [-t <ttyname>] [-b <baud>] [-l <log-file>]\n",
- progname);
+ "\nUSAGE: %s [-h] [-d] [-t <ttyname>] [-b <baud>] [-l <log-file>]\n",
+ progname);
fprintf(stderr, "\nWhere:\n");
fprintf(stderr, "\t-h: Prints this message then exit.\n");
fprintf(stderr, "\t-d: Enable debug output (twice for verbose output).\n");
@@ -512,7 +512,8 @@ int main(int argc, char **argv, char **envp)
break;
case ':':
- fprintf(stderr, "ERROR: Missing argument to option '%c'\n", optopt);
+ fprintf(stderr, "ERROR: Missing argument to option '%c'\n",
+ optopt);
show_usage(argv[0], 1);
break;
@@ -723,8 +724,8 @@ int main(int argc, char **argv, char **envp)
}
#endif
- /* Catch attempts to control-C out of the program so that we can restore the
- * TTY settings.
+ /* Catch attempts to control-C out of the program so that we can restore
+ * the TTY settings.
*/
signal(SIGINT, interrupt);
@@ -752,8 +753,9 @@ int main(int argc, char **argv, char **envp)
ret = readbyte(g_fdnb, &ch);
if (ret == 0)
{
- printconsole("ERROR: Unexpected number of bytes read(%d) from %s\n",
- ret, g_ttydev);
+ printconsole(
+ "ERROR: Unexpected number of bytes read(%d) from %s\n",
+ ret, g_ttydev);
close_tty();
return 15;
}
@@ -807,5 +809,6 @@ int main(int argc, char **argv, char **envp)
}
}
}
+
return 0;
}