From 06a0059d87f490753ccc13c38905ae8dcda54150 Mon Sep 17 00:00:00 2001 From: Alin Jerpelea Date: Tue, 16 Mar 2021 21:37:33 +0100 Subject: [PATCH] boards: renesas: nxstyle fixes Fixes to pass CI Signed-off-by: Alin Jerpelea --- 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 7c4cc34f4b..dd60f109f4 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 49f57947c1..cf063e7f34 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 3800731913..62d373fd10 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 06e3aee010..1d1461bf22 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 018c5841ec..2fcb525e58 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 ] [-b ] [-l ]\n", - progname); + "\nUSAGE: %s [-h] [-d] [-t ] [-b ] [-l ]\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; }