arch/arm/src/stm32h7: Correct naming of global variables that violations the naming requirements of the coding standard.
This commit is contained in:
parent
e569872358
commit
c09efb2603
@ -705,7 +705,7 @@ static struct up_dev_s g_uart8priv =
|
||||
|
||||
/* This table lets us iterate over the configured USARTs */
|
||||
|
||||
static struct up_dev_s * const uart_devs[STM32_NSERIAL] =
|
||||
static struct up_dev_s * const g_uart_devs[STM32_NSERIAL] =
|
||||
{
|
||||
#ifdef CONFIG_STM32H7_USART1
|
||||
[0] = &g_usart1priv,
|
||||
@ -2145,17 +2145,17 @@ FAR uart_dev_t *stm32_serial_get_uart(int uart_num)
|
||||
{
|
||||
int uart_idx = uart_num - 1;
|
||||
|
||||
if (uart_idx < 0 || uart_idx >= STM32_NSERIAL || !uart_devs[uart_idx])
|
||||
if (uart_idx < 0 || uart_idx >= STM32_NSERIAL || !g_uart_devs[uart_idx])
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!uart_devs[uart_idx]->initialized)
|
||||
if (!g_uart_devs[uart_idx]->initialized)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return &uart_devs[uart_idx]->dev;
|
||||
return &g_uart_devs[uart_idx]->dev;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -2178,16 +2178,16 @@ void up_earlyserialinit(void)
|
||||
|
||||
for (i = 0; i < STM32_NSERIAL; i++)
|
||||
{
|
||||
if (uart_devs[i])
|
||||
if (g_uart_devs[i])
|
||||
{
|
||||
up_disableusartint(uart_devs[i], NULL);
|
||||
up_disableusartint(g_uart_devs[i], NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* Configure whichever one is the console */
|
||||
|
||||
#if CONSOLE_UART > 0
|
||||
up_setup(&uart_devs[CONSOLE_UART - 1]->dev);
|
||||
up_setup(&g_uart_devs[CONSOLE_UART - 1]->dev);
|
||||
#endif
|
||||
#endif /* HAVE UART */
|
||||
}
|
||||
@ -2223,14 +2223,14 @@ void up_serialinit(void)
|
||||
/* Register the console */
|
||||
|
||||
#if CONSOLE_UART > 0
|
||||
(void)uart_register("/dev/console", &uart_devs[CONSOLE_UART - 1]->dev);
|
||||
(void)uart_register("/dev/console", &g_uart_devs[CONSOLE_UART - 1]->dev);
|
||||
|
||||
#ifndef CONFIG_STM32H7_SERIAL_DISABLE_REORDERING
|
||||
/* If not disabled, register the console UART to ttyS0 and exclude
|
||||
* it from initializing it further down
|
||||
*/
|
||||
|
||||
(void)uart_register("/dev/ttyS0", &uart_devs[CONSOLE_UART - 1]->dev);
|
||||
(void)uart_register("/dev/ttyS0", &g_uart_devs[CONSOLE_UART - 1]->dev);
|
||||
minor = 1;
|
||||
#endif
|
||||
|
||||
@ -2244,7 +2244,7 @@ void up_serialinit(void)
|
||||
{
|
||||
/* Don't create a device for non-configured ports. */
|
||||
|
||||
if (uart_devs[i] == 0)
|
||||
if (g_uart_devs[i] == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -2252,7 +2252,7 @@ void up_serialinit(void)
|
||||
#ifndef CONFIG_STM32H7_SERIAL_DISABLE_REORDERING
|
||||
/* Don't create a device for the console - we did that above */
|
||||
|
||||
if (uart_devs[i]->dev.isconsole)
|
||||
if (g_uart_devs[i]->dev.isconsole)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -2261,7 +2261,7 @@ void up_serialinit(void)
|
||||
/* Register USARTs as devices in increasing order */
|
||||
|
||||
devname[9] = '0' + minor++;
|
||||
(void)uart_register(devname, &uart_devs[i]->dev);
|
||||
(void)uart_register(devname, &g_uart_devs[i]->dev);
|
||||
}
|
||||
#endif /* HAVE UART */
|
||||
}
|
||||
@ -2277,7 +2277,7 @@ void up_serialinit(void)
|
||||
int up_putc(int ch)
|
||||
{
|
||||
#if CONSOLE_UART > 0
|
||||
struct up_dev_s *priv = uart_devs[CONSOLE_UART - 1];
|
||||
struct up_dev_s *priv = g_uart_devs[CONSOLE_UART - 1];
|
||||
uint16_t ie;
|
||||
|
||||
up_disableusartint(priv, &ie);
|
||||
|
@ -47,11 +47,15 @@ STATUS
|
||||
- There is a fragmentary NSH here. However, it does not have any serial
|
||||
console selected and is not expected to be usable.
|
||||
|
||||
This logic has set on a branch for some time with little progress. I
|
||||
have decided to bring it into the master but only with the option to
|
||||
select the STM32 H7 architecture dependent on CONFIG_EXPERMIMENTAL.
|
||||
That should eliminate the possibility of anyone accidentally enabling
|
||||
this know incomplete port.
|
||||
This logic has set on a branch for some time with little progress. I
|
||||
have decided to bring it into the master but only with the option to
|
||||
select the STM32 H7 architecture dependent on CONFIG_EXPERMIMENTAL.
|
||||
That should eliminate the possibility of anyone accidentally enabling
|
||||
this know incomplete port.
|
||||
|
||||
2018-07-12: After several commits focused primarily on the H7 RCC and
|
||||
serial driver, Mateusz Szafoni states the basic NSH configuration is
|
||||
now functional.
|
||||
|
||||
Serial Console
|
||||
==============
|
||||
|
Loading…
Reference in New Issue
Block a user