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/04/10 11:46:38 UTC

[incubator-nuttx] branch master updated (56abcb2 -> aa7c1dc)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 56abcb2  tools/ci/testlist/sim01.dat: ignore FOC example (CONFIG_SIM_M32=y)
     new 6f5537e  arch: lpc2378: Fix for Mixed Case Identifier errors
     new 7424683  arch: lpc17xx_40xx: Mixed Case Identifier fix
     new aa7c1dc  boards: stm32l4: Fix nxstyle warning

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/arm/src/lpc17xx_40xx/lpc17_40_adc.c           | 86 +++++++++++-----------
 arch/arm/src/lpc2378/lpc23xx_head.S                |  4 +-
 arch/arm/src/lpc2378/lpc23xx_io.c                  |  4 +-
 arch/arm/src/lpc2378/lpc23xx_pllsetup.c            | 18 ++---
 .../stm32l4/stm32l4r9ai-disco/src/stm32_dfsdm.c    | 38 +++++++++-
 5 files changed, 90 insertions(+), 60 deletions(-)

[incubator-nuttx] 01/03: arch: lpc2378: Fix for Mixed Case Identifier errors

Posted by xi...@apache.org.
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 6f5537eae25578d802e6b651170e2b52ad4a8da9
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Fri Apr 9 12:58:07 2021 +0200

    arch: lpc2378: Fix for Mixed Case Identifier errors
    
    Fix for Mixed Case Identifier errors reported by nxstyle tool
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 arch/arm/src/lpc2378/lpc23xx_head.S     |  4 ++--
 arch/arm/src/lpc2378/lpc23xx_io.c       |  4 ++--
 arch/arm/src/lpc2378/lpc23xx_pllsetup.c | 18 +++++++++---------
 3 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/arch/arm/src/lpc2378/lpc23xx_head.S b/arch/arm/src/lpc2378/lpc23xx_head.S
index 3042631..bc11ed0 100644
--- a/arch/arm/src/lpc2378/lpc23xx_head.S
+++ b/arch/arm/src/lpc2378/lpc23xx_head.S
@@ -137,8 +137,8 @@ __start:
 
 	/* Call lowlevel init C-function */
 
-	.extern ConfigurePLL
-	ldr	r0, =ConfigurePLL
+	.extern configure_pll
+	ldr	r0, =configure_pll
 	mov	lr, pc
 	bx	r0
 
diff --git a/arch/arm/src/lpc2378/lpc23xx_io.c b/arch/arm/src/lpc2378/lpc23xx_io.c
index 509a785..c824e1d 100644
--- a/arch/arm/src/lpc2378/lpc23xx_io.c
+++ b/arch/arm/src/lpc2378/lpc23xx_io.c
@@ -53,14 +53,14 @@
  ****************************************************************************/
 
 /****************************************************************************
- * Name: IO_Init()
+ * Name: io_init()
  *
  * Description:
  *   Initialize the target board before running the main()
  *
  ****************************************************************************/
 
-void IO_Init(void)
+void io_init(void)
 {
   uint32_t regval;
 
diff --git a/arch/arm/src/lpc2378/lpc23xx_pllsetup.c b/arch/arm/src/lpc2378/lpc23xx_pllsetup.c
index ca9de41..5aa3810 100644
--- a/arch/arm/src/lpc2378/lpc23xx_pllsetup.c
+++ b/arch/arm/src/lpc2378/lpc23xx_pllsetup.c
@@ -70,7 +70,7 @@
 #include "lpc23xx_pinsel.h"
 #include "lpc23xx_scb.h"
 
-void IO_Init(void);
+void io_init(void);
 
 /****************************************************************************
  * Pre-processor Definitions
@@ -163,13 +163,13 @@ static inline void up_scbpllfeed(void)
 }
 
 /****************************************************************************
- * Name: ConfigurePLL
+ * Name: configure_pll
  ****************************************************************************/
 
-void ConfigurePLL(void)
+void configure_pll(void)
 {
-  uint32_t MSel;
-  uint32_t NSel;
+  uint32_t m_sel;
+  uint32_t n_sel;
 
   /* LPC2378 Rev.'-' errata Enable the Ethernet block to enable 16k EnetRAM */
 
@@ -232,9 +232,9 @@ void ConfigurePLL(void)
 
   while ((SCB_PLLSTAT & (1 << 26)) == 0);
 
-  MSel = SCB_PLLSTAT & 0x00007fff;
-  NSel = (SCB_PLLSTAT & 0x00ff0000) >> 16;
-  while ((MSel != PLL_M) && (NSel != PLL_N));
+  m_sel = SCB_PLLSTAT & 0x00007fff;
+  n_sel = (SCB_PLLSTAT & 0x00ff0000) >> 16;
+  while ((m_sel != PLL_M) && (n_sel != PLL_N));
 
   /* Enable and connect */
 
@@ -255,7 +255,7 @@ void ConfigurePLL(void)
 
   SCB_SCS |= 0x01;
 
-  IO_Init();
+  io_init();
 
   return;
 }

[incubator-nuttx] 03/03: boards: stm32l4: Fix nxstyle warning

Posted by xi...@apache.org.
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 aa7c1dc67fb8afb4efe7d6a47d80824e515644cb
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Fri Apr 9 13:35:59 2021 +0200

    boards: stm32l4: Fix nxstyle warning
    
    Port from a0fae8c4d61ce6f2915a7439141f3dff6905f46d
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 .../stm32l4/stm32l4r9ai-disco/src/stm32_dfsdm.c    | 38 +++++++++++++++++++---
 1 file changed, 34 insertions(+), 4 deletions(-)

diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_dfsdm.c b/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_dfsdm.c
index f6be8c6..7819952 100644
--- a/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_dfsdm.c
+++ b/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_dfsdm.c
@@ -69,6 +69,33 @@ int stm32_dfsdm_setup(void)
     {
       int ret;
       struct adc_dev_s *adc;
+#ifdef CONFIG_STM32L4_DFSDM1_FLT0
+      const uint8_t chanlist0[1] =
+      {
+        0
+      };
+#endif
+
+#ifdef CONFIG_STM32L4_DFSDM1_FLT1
+      const uint8_t chanlist1[2] =
+      {
+        0, 1
+      };
+#endif
+
+#ifdef CONFIG_STM32L4_DFSDM1_FLT2
+      const uint8_t chanlist2[8] =
+      {
+        0, 1, 2, 3, 4, 5, 6, 7
+      };
+#endif
+
+#ifdef CONFIG_STM32L4_DFSDM1_FLT3
+      const uint8_t chanlist3[4] =
+      {
+        6, 5, 4, 3
+      };
+#endif
 
       ainfo("Initializing DFSDM\n");
 
@@ -78,7 +105,7 @@ int stm32_dfsdm_setup(void)
        */
 
 #ifdef CONFIG_STM32L4_DFSDM1_FLT0
-      adc = stm32l4_dfsdm_initialize(0, (const uint8_t[1]){0}, 1);
+      adc = stm32l4_dfsdm_initialize(0, chanlist0, 1);
       if (adc == NULL)
         {
           aerr("Failed to get DFSDM FLT0 interface\n");
@@ -92,8 +119,9 @@ int stm32_dfsdm_setup(void)
           return ret;
         }
 #endif
+
 #ifdef CONFIG_STM32L4_DFSDM1_FLT1
-      adc = stm32l4_dfsdm_initialize(1, (const uint8_t[2]){0,1}, 2);
+      adc = stm32l4_dfsdm_initialize(1, chanlist1, 2);
       if (adc == NULL)
         {
           aerr("Failed to get DFSDM FLT1 interface\n");
@@ -107,8 +135,9 @@ int stm32_dfsdm_setup(void)
           return ret;
         }
 #endif
+
 #ifdef CONFIG_STM32L4_DFSDM1_FLT2
-      adc = stm32l4_dfsdm_initialize(2, (const uint8_t[8]){0,1,2,3,4,5,6,7}, 8);
+      adc = stm32l4_dfsdm_initialize(2, chanlist2, 8);
       if (adc == NULL)
         {
           aerr("Failed to get DFSDM FLT2 interface\n");
@@ -122,8 +151,9 @@ int stm32_dfsdm_setup(void)
           return ret;
         }
 #endif
+
 #ifdef CONFIG_STM32L4_DFSDM1_FLT3
-      adc = stm32l4_dfsdm_initialize(3, (const uint8_t[4]){6,5,4,3}, 4);
+      adc = stm32l4_dfsdm_initialize(3, chanlist3, 4);
       if (adc == NULL)
         {
           aerr("Failed to get DFSDM FLT3 interface\n");

[incubator-nuttx] 02/03: arch: lpc17xx_40xx: Mixed Case Identifier fix

Posted by xi...@apache.org.
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 7424683d2968899e0072052e54c764d7b99619cd
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Fri Apr 9 13:25:04 2021 +0200

    arch: lpc17xx_40xx: Mixed Case Identifier fix
    
    Fix for Mixed Case Identifier reported by nxstyle.
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 arch/arm/src/lpc17xx_40xx/lpc17_40_adc.c | 86 ++++++++++++++++----------------
 1 file changed, 43 insertions(+), 43 deletions(-)

diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_adc.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_adc.c
index 7608229..4071384 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_adc.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_adc.c
@@ -480,35 +480,35 @@ static int adc_interrupt(int irq, void *context, FAR void *arg)
 #else /* CONFIG_LPC17_40_ADC_BURSTMODE */
 
   FAR struct up_dev_s *priv = (FAR struct up_dev_s *)g_adcdev.ad_priv;
-  volatile uint32_t regVal;
-  volatile uint32_t regVal2;
-  volatile uint32_t regVal3;
+  volatile uint32_t reg_val;
+  volatile uint32_t reg_val2;
+  volatile uint32_t reg_val3;
 
   /* Verify that an interrupt has actually occurred */
 
-  regVal2 = getreg32(LPC17_40_ADC_STAT);  /* Read ADSTAT will clear the interrupt flag */
-  if ((regVal2) & (1 << 16))
+  reg_val2 = getreg32(LPC17_40_ADC_STAT);  /* Read ADSTAT will clear the interrupt flag */
+  if ((reg_val2) & (1 << 16))
     {
       if ((priv->mask & 0x01) != 0)
         {
-          regVal = getreg32(LPC17_40_ADC_DR0);
+          reg_val = getreg32(LPC17_40_ADC_DR0);
 
 #ifdef CONFIG_ADC_DIRECT_ACCESS
           /* Store the data value plus the status bits */
 
-          ADC0Buffer0[0] = regVal;
-          ADC0IntDone = 1;
+          adc0_buffer0[0] = reg_val;
+          adc0_int_done = 1;
 #else /* CONFIG_ADC_DIRECT_ACCESS */
 #ifdef CONFIG_ADC_WORKER_THREAD
           /* Store the data value plus the status bits */
 
-          ADC0Buffer0[0] = regVal;
-          ADC0IntDone = 1;
+          adc0_buffer0[0] = reg_val;
+          adc0_int_done = 1;
 
 #else /* CONFIG_ADC_WORKER_THREAD */
-      if ((regVal) & (1 << 31))
+      if ((reg_val) & (1 << 31))
         {
-          adc_receive(priv, 0, (regVal >> 4) & 0xfff);
+          adc_receive(priv, 0, (reg_val >> 4) & 0xfff);
         }
 
 #endif /* CONFIG_ADC_WORKER_THREAD */
@@ -517,25 +517,25 @@ static int adc_interrupt(int irq, void *context, FAR void *arg)
 
       if ((priv->mask & 0x02) != 0)
         {
-          regVal = getreg32(LPC17_40_ADC_DR1);
+          reg_val = getreg32(LPC17_40_ADC_DR1);
 
 #ifdef CONFIG_ADC_DIRECT_ACCESS
           /* Store the data value plus the status bits */
 
-          ADC1Buffer0[0] = regVal;
-          ADC0IntDone = 1;
+          adc1_buffer0[0] = reg_val;
+          adc0_int_done = 1;
 
 #else /* CONFIG_ADC_DIRECT_ACCESS */
 #ifdef CONFIG_ADC_WORKER_THREAD
           /* Store the data value plus the status bits */
 
-          ADC1Buffer0[0] = regVal;
-          ADC0IntDone = 1;
+          adc1_buffer0[0] = reg_val;
+          adc0_int_done = 1;
 
 #else /* CONFIG_ADC_WORKER_THREAD */
-          if ((regVal) & (1 << 31))
+          if ((reg_val) & (1 << 31))
             {
-              adc_receive(priv, 1, (regVal >> 4) & 0xfff);
+              adc_receive(priv, 1, (reg_val >> 4) & 0xfff);
             }
 
 #endif /* CONFIG_ADC_WORKER_THREAD */
@@ -544,25 +544,25 @@ static int adc_interrupt(int irq, void *context, FAR void *arg)
 
       if ((priv->mask & 0x04) != 0)
         {
-          regVal = getreg32(LPC17_40_ADC_DR2);
+          reg_val = getreg32(LPC17_40_ADC_DR2);
 
 #ifdef CONFIG_ADC_DIRECT_ACCESS
           /* Store the data value plus the status bits */
 
-          ADC2Buffer0[0] = regVal;
-          ADC0IntDone = 1;
+          adc2_buffer0[0] = reg_val;
+          adc0_int_done = 1;
 
 #else /* CONFIG_ADC_DIRECT_ACCESS */
 #ifdef CONFIG_ADC_WORKER_THREAD
           /* Store the data value plus the status bits */
 
-          ADC2Buffer0[0] = regVal;
-          ADC0IntDone = 1;
+          adc2_buffer0[0] = reg_val;
+          adc0_int_done = 1;
 
 #else /* CONFIG_ADC_WORKER_THREAD */
-          if ((regVal) & (1 << 31))
+          if ((reg_val) & (1 << 31))
             {
-              adc_receive(priv, 2, (regVal >> 4) & 0xfff);
+              adc_receive(priv, 2, (reg_val >> 4) & 0xfff);
             }
 
 #endif /* CONFIG_ADC_WORKER_THREAD */
@@ -571,51 +571,51 @@ static int adc_interrupt(int irq, void *context, FAR void *arg)
 
       if ((priv->mask & 0x08) != 0)
         {
-          regVal = getreg32(LPC17_40_ADC_DR3);
-          if ((regVal) & (1 << 31))
+          reg_val = getreg32(LPC17_40_ADC_DR3);
+          if ((reg_val) & (1 << 31))
             {
-              adc_receive(priv, 3, (regVal >> 4) & 0xfff);
+              adc_receive(priv, 3, (reg_val >> 4) & 0xfff);
             }
         }
 
       if ((priv->mask & 0x10) != 0)
         {
-          regVal = getreg32(LPC17_40_ADC_DR4);
-          if ((regVal) & (1 << 31))
+          reg_val = getreg32(LPC17_40_ADC_DR4);
+          if ((reg_val) & (1 << 31))
             {
-              adc_receive(priv, 4, (regVal >> 4) & 0xfff);
+              adc_receive(priv, 4, (reg_val >> 4) & 0xfff);
             }
         }
 
       if ((priv->mask & 0x20) != 0)
         {
-          regVal = getreg32(LPC17_40_ADC_DR5);
-          if ((regVal) & (1 << 31))
+          reg_val = getreg32(LPC17_40_ADC_DR5);
+          if ((reg_val) & (1 << 31))
             {
-              adc_receive(priv, 5, (regVal >> 4) & 0xfff);
+              adc_receive(priv, 5, (reg_val >> 4) & 0xfff);
             }
         }
 
       if ((priv->mask & 0x40) != 0)
         {
-          regVal = getreg32(LPC17_40_ADC_DR6);
-          if ((regVal) & (1 << 31))
+          reg_val = getreg32(LPC17_40_ADC_DR6);
+          if ((reg_val) & (1 << 31))
             {
-              adc_receive(priv, 6, (regVal >> 4) & 0xfff);
+              adc_receive(priv, 6, (reg_val >> 4) & 0xfff);
             }
         }
 
       if ((priv->mask & 0x80) != 0)
         {
-          regVal = getreg32(LPC17_40_ADC_DR7);
-          if ((regVal) & (1 << 31))
+          reg_val = getreg32(LPC17_40_ADC_DR7);
+          if ((reg_val) & (1 << 31))
             {
-              adc_receive(priv, 7, (regVal >> 4) & 0xfff);
+              adc_receive(priv, 7, (reg_val >> 4) & 0xfff);
             }
         }
 
 #ifdef CONFIG_ADC_WORKER_THREAD
-      if (ADC0IntDone == 1)
+      if (adc0_int_done == 1)
         {
           work_queue(HPWORK, &priv->irqwork, (worker_t)adc_irqworker,
                      (FAR void *)priv, 0);
@@ -624,7 +624,7 @@ static int adc_interrupt(int irq, void *context, FAR void *arg)
 #endif /* CONFIG_ADC_WORKER_THREAD */
     }
 
-  regVal3 = getreg32(LPC17_40_ADC_GDR);         /* Read ADGDR clear the DONE and OVERRUN bits */
+  reg_val3 = getreg32(LPC17_40_ADC_GDR);        /* Read ADGDR clear the DONE and OVERRUN bits */
   putreg32((priv->mask) |                       /* Select channels 0 to 7 on ADC0 */
            (32 << 8) |                          /* CLKDIV = 16 */
            (0 << 16) |                          /* BURST = 1, BURST capture all selected channels */