arch/arm/src/stm32, stm32f0, stm32f7, stm32: Correct naming of global variables that violations the naming requirements of the coding standard.
This commit is contained in:
parent
562637391c
commit
f3c12215cf
@ -997,7 +997,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_NUSART] =
|
||||
static struct up_dev_s * const g_uart_devs[STM32_NUSART] =
|
||||
{
|
||||
#ifdef CONFIG_STM32_USART1_SERIALDRIVER
|
||||
[0] = &g_usart1priv,
|
||||
@ -2690,17 +2690,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_NUSART || !uart_devs[uart_idx])
|
||||
if (uart_idx < 0 || uart_idx >= STM32_NUSART || !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;
|
||||
}
|
||||
#endif /* HAVE_SERIALDRIVER */
|
||||
|
||||
@ -2724,16 +2724,16 @@ void up_earlyserialinit(void)
|
||||
|
||||
for (i = 0; i < STM32_NUSART; 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 */
|
||||
}
|
||||
@ -2769,21 +2769,21 @@ 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_STM32_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
|
||||
|
||||
#ifdef SERIAL_HAVE_CONSOLE_DMA
|
||||
/* If we need to re-initialise the console to enable DMA do that here. */
|
||||
|
||||
up_dma_setup(&uart_devs[CONSOLE_UART - 1]->dev);
|
||||
up_dma_setup(&g_uart_devs[CONSOLE_UART - 1]->dev);
|
||||
#endif
|
||||
#endif /* CONSOLE_UART > 0 */
|
||||
|
||||
@ -2795,7 +2795,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;
|
||||
}
|
||||
@ -2803,7 +2803,7 @@ void up_serialinit(void)
|
||||
#ifndef CONFIG_STM32_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;
|
||||
}
|
||||
@ -2812,7 +2812,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 */
|
||||
}
|
||||
@ -2906,7 +2906,7 @@ void stm32_serial_dma_poll(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);
|
||||
|
@ -719,7 +719,7 @@ static struct stm32f0_serial_s g_usart5priv =
|
||||
|
||||
/* This table lets us iterate over the configured USARTs */
|
||||
|
||||
FAR static struct stm32f0_serial_s * const uart_devs[STM32F0_NUSART] =
|
||||
FAR static struct stm32f0_serial_s * const g_uart_devs[STM32F0_NUSART] =
|
||||
{
|
||||
#ifdef CONFIG_STM32F0_USART1
|
||||
[0] = &g_usart1priv,
|
||||
@ -2380,16 +2380,16 @@ void up_earlyserialinit(void)
|
||||
|
||||
for (i = 0; i < STM32F0_NUSART; i++)
|
||||
{
|
||||
if (uart_devs[i])
|
||||
if (g_uart_devs[i])
|
||||
{
|
||||
stm32f0serial_disableusartint(uart_devs[i], NULL);
|
||||
stm32f0serial_disableusartint(g_uart_devs[i], NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* Configure whichever one is the console */
|
||||
|
||||
#if CONSOLE_USART > 0
|
||||
stm32f0serial_setup(&uart_devs[CONSOLE_USART - 1]->dev);
|
||||
stm32f0serial_setup(&g_uart_devs[CONSOLE_USART - 1]->dev);
|
||||
#endif
|
||||
#endif /* HAVE USART */
|
||||
}
|
||||
@ -2425,21 +2425,21 @@ void up_serialinit(void)
|
||||
/* Register the console */
|
||||
|
||||
#if CONSOLE_USART > 0
|
||||
(void)uart_register("/dev/console", &uart_devs[CONSOLE_USART - 1]->dev);
|
||||
(void)uart_register("/dev/console", &g_uart_devs[CONSOLE_USART - 1]->dev);
|
||||
|
||||
#ifndef CONFIG_STM32F0_SERIAL_DISABLE_REORDERING
|
||||
/* If not disabled, register the console USART to ttyS0 and exclude
|
||||
* it from initializing it further down
|
||||
*/
|
||||
|
||||
(void)uart_register("/dev/ttyS0", &uart_devs[CONSOLE_USART - 1]->dev);
|
||||
(void)uart_register("/dev/ttyS0", &g_uart_devs[CONSOLE_USART - 1]->dev);
|
||||
minor = 1;
|
||||
#endif
|
||||
|
||||
#ifdef SERIAL_HAVE_CONSOLE_DMA
|
||||
/* If we need to re-initialise the console to enable DMA do that here. */
|
||||
|
||||
stm32f0serial_dmasetup(&uart_devs[CONSOLE_USART - 1]->dev);
|
||||
stm32f0serial_dmasetup(&g_uart_devs[CONSOLE_USART - 1]->dev);
|
||||
#endif
|
||||
#endif /* CONSOLE_USART > 0 */
|
||||
|
||||
@ -2451,7 +2451,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;
|
||||
}
|
||||
@ -2459,7 +2459,7 @@ void up_serialinit(void)
|
||||
#ifndef CONFIG_STM32F0_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;
|
||||
}
|
||||
@ -2468,7 +2468,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 USART */
|
||||
}
|
||||
@ -2541,7 +2541,7 @@ void stm32f0serial_dmapoll(void)
|
||||
int up_putc(int ch)
|
||||
{
|
||||
#if CONSOLE_USART > 0
|
||||
struct stm32f0_serial_s *priv = uart_devs[CONSOLE_USART - 1];
|
||||
struct stm32f0_serial_s *priv = g_uart_devs[CONSOLE_USART - 1];
|
||||
uint16_t ie;
|
||||
|
||||
stm32f0serial_disableusartint(priv, &ie);
|
||||
|
@ -1039,7 +1039,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_STM32F7_USART1
|
||||
[0] = &g_usart1priv,
|
||||
@ -2681,17 +2681,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;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -2714,16 +2714,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 */
|
||||
}
|
||||
@ -2759,21 +2759,21 @@ 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_STM32F7_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
|
||||
|
||||
#ifdef SERIAL_HAVE_CONSOLE_DMA
|
||||
/* If we need to re-initialise the console to enable DMA do that here. */
|
||||
|
||||
up_dma_setup(&uart_devs[CONSOLE_UART - 1]->dev);
|
||||
up_dma_setup(&g_uart_devs[CONSOLE_UART - 1]->dev);
|
||||
#endif
|
||||
#endif /* CONSOLE_UART > 0 */
|
||||
|
||||
@ -2785,7 +2785,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;
|
||||
}
|
||||
@ -2793,7 +2793,7 @@ void up_serialinit(void)
|
||||
#ifndef CONFIG_STM32F7_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;
|
||||
}
|
||||
@ -2802,7 +2802,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 */
|
||||
}
|
||||
@ -2896,7 +2896,7 @@ void stm32_serial_dma_poll(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);
|
||||
|
@ -742,7 +742,7 @@ static struct stm32l4_serial_s g_uart5priv =
|
||||
|
||||
/* This table lets us iterate over the configured USARTs */
|
||||
|
||||
FAR static struct stm32l4_serial_s * const uart_devs[STM32L4_NUSART + STM32L4_NUART] =
|
||||
FAR static struct stm32l4_serial_s * const g_uart_devs[STM32L4_NUSART + STM32L4_NUART] =
|
||||
{
|
||||
#ifdef CONFIG_STM32L4_USART1_SERIALDRIVER
|
||||
[0] = &g_usart1priv,
|
||||
@ -1200,7 +1200,7 @@ void stm32l4serial_pm_setsuspend(bool suspend)
|
||||
|
||||
for (n = 0; n < STM32L4_NUSART + STM32L4_NUART; n++)
|
||||
{
|
||||
struct stm32l4_serial_s *priv = uart_devs[n];
|
||||
struct stm32l4_serial_s *priv = g_uart_devs[n];
|
||||
|
||||
if (!priv || !priv->initialized)
|
||||
{
|
||||
@ -2682,7 +2682,7 @@ static int stm32l4serial_pmprepare(FAR struct pm_callback_s *cb, int domain,
|
||||
|
||||
for (n = 0; n < STM32L4_NUSART + STM32L4_NUART; n++)
|
||||
{
|
||||
struct stm32l4_serial_s *priv = uart_devs[n];
|
||||
struct stm32l4_serial_s *priv = g_uart_devs[n];
|
||||
|
||||
if (!priv || !priv->initialized)
|
||||
{
|
||||
@ -2745,16 +2745,16 @@ void up_earlyserialinit(void)
|
||||
|
||||
for (i = 0; i < STM32L4_NUSART + STM32L4_NUART; i++)
|
||||
{
|
||||
if (uart_devs[i])
|
||||
if (g_uart_devs[i])
|
||||
{
|
||||
stm32l4serial_disableusartint(uart_devs[i], NULL);
|
||||
stm32l4serial_disableusartint(g_uart_devs[i], NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* Configure whichever one is the console */
|
||||
|
||||
#if CONSOLE_UART > 0
|
||||
stm32l4serial_setup(&uart_devs[CONSOLE_UART - 1]->dev);
|
||||
stm32l4serial_setup(&g_uart_devs[CONSOLE_UART - 1]->dev);
|
||||
#endif
|
||||
#endif /* HAVE UART */
|
||||
}
|
||||
@ -2790,21 +2790,21 @@ 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_STM32L4_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
|
||||
|
||||
#ifdef SERIAL_HAVE_CONSOLE_DMA
|
||||
/* If we need to re-initialise the console to enable DMA do that here. */
|
||||
|
||||
stm32l4serial_dmasetup(&uart_devs[CONSOLE_UART - 1]->dev);
|
||||
stm32l4serial_dmasetup(&g_uart_devs[CONSOLE_UART - 1]->dev);
|
||||
#endif
|
||||
#endif /* CONSOLE_UART > 0 */
|
||||
|
||||
@ -2816,7 +2816,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;
|
||||
}
|
||||
@ -2824,7 +2824,7 @@ void up_serialinit(void)
|
||||
#ifndef CONFIG_STM32L4_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;
|
||||
}
|
||||
@ -2833,7 +2833,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 */
|
||||
}
|
||||
@ -2906,7 +2906,7 @@ void stm32l4_serial_dma_poll(void)
|
||||
int up_putc(int ch)
|
||||
{
|
||||
#if CONSOLE_UART > 0
|
||||
struct stm32l4_serial_s *priv = uart_devs[CONSOLE_UART - 1];
|
||||
struct stm32l4_serial_s *priv = g_uart_devs[CONSOLE_UART - 1];
|
||||
uint16_t ie;
|
||||
|
||||
stm32l4serial_disableusartint(priv, &ie);
|
||||
|
@ -7,7 +7,7 @@ README
|
||||
- STM32F107VCT6, or
|
||||
- STM32F103VCT6
|
||||
|
||||
The board is vary modular with connectors for a variety of peripherals.
|
||||
The board is very modular with connectors for a variety of peripherals.
|
||||
Features on the base board include:
|
||||
|
||||
- User and Wake-Up Keys
|
||||
|
Loading…
Reference in New Issue
Block a user