You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/04/14 16:19:21 UTC

[incubator-nuttx] branch master updated (e1138e3 -> 61f6fa7)

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

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


    from e1138e3  arch/arm/src/stm32l4/stm32l4_spi.c: add missing ret declaration
     new 552ca28  arch/arm/src/stm32l4/stm32l4_1wire.c: fix build error, fix typo
     new 61f6fa7  nxstyle fixes for previous commit.

The 2 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/lc823450/lc823450_i2c.c | 18 +++++++++++++-----
 arch/arm/src/stm32/stm32_1wire.c     |  2 +-
 arch/arm/src/stm32/stm32_i2c.c       |  2 +-
 arch/arm/src/stm32/stm32_i2c_alt.c   |  2 +-
 arch/arm/src/stm32/stm32f40xxx_i2c.c |  2 +-
 arch/arm/src/stm32h7/stm32_i2c.c     |  2 +-
 arch/arm/src/stm32l4/stm32l4_1wire.c |  8 +++++---
 arch/arm/src/stm32l4/stm32l4_i2c.c   |  2 +-
 8 files changed, 24 insertions(+), 14 deletions(-)


[incubator-nuttx] 02/02: nxstyle fixes for previous commit.

Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 61f6fa769a0cd9ee95e86d094b7991d477d425ff
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Tue Apr 14 09:42:35 2020 -0600

    nxstyle fixes for previous commit.
---
 arch/arm/src/lc823450/lc823450_i2c.c | 16 ++++++++++++----
 arch/arm/src/stm32l4/stm32l4_1wire.c |  4 +++-
 arch/arm/src/stm32l4/stm32l4_i2c.c   |  2 +-
 3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/arch/arm/src/lc823450/lc823450_i2c.c b/arch/arm/src/lc823450/lc823450_i2c.c
index 8716903..009ef95 100644
--- a/arch/arm/src/lc823450/lc823450_i2c.c
+++ b/arch/arm/src/lc823450/lc823450_i2c.c
@@ -589,7 +589,9 @@ static void lc823450_i2c_starttransfer(FAR struct lc823450_i2c_priv_s *priv)
     {
       if (priv->dcnt > 1)
         {
-          /* If the next byte to be received is not final, we have to send ACK. */
+          /* If the next byte to be received is not final, we have to send
+           * ACK.
+           */
 
           modifyreg32(priv->config->base + I2CCTL, I2C_CTL_ACK,
                       I2C_CTL_ACK);
@@ -665,7 +667,9 @@ static int lc823450_i2c_poll(FAR struct lc823450_i2c_priv_s *priv)
 
       if (flags & I2C_M_READ)
         {
-          /* When READ transaction, terminate it with NACK and then STOP condition */
+          /* When READ transaction, terminate it with NACK and then STOP
+           * condition.
+           */
 
           lc823450_i2c_sendnack(priv);
         }
@@ -765,7 +769,9 @@ static int lc823450_i2c_poll(FAR struct lc823450_i2c_priv_s *priv)
 
           if (priv->msgv->flags & I2C_M_NOSTART)
             {
-              /* In this case, we don't have to restart using START condition. */
+              /* In this case, we don't have to restart using START
+               * condition.
+               */
 
               i2cinfo("no re-START condition\n");
 
@@ -931,7 +937,9 @@ static int lc823450_i2c_deinit(FAR struct lc823450_i2c_priv_s *priv,
   modifyreg32(priv->config->base + I2CSTR, I2C_CTL_SCLR, I2C_CTL_SCLR);
   modifyreg32(priv->config->base + I2CCTL, I2C_CTL_SRST, I2C_CTL_SRST);
 
-  /* Change pinmux from I2C to GPIO, and i2c mode to Push-Pull to Open Drain */
+  /* Change pinmux from I2C to GPIO, and i2c mode to Push-Pull to Open
+   * Drain.
+   */
 
   if (port == 0)
     {
diff --git a/arch/arm/src/stm32l4/stm32l4_1wire.c b/arch/arm/src/stm32l4/stm32l4_1wire.c
index 82ecf63..4a47798 100644
--- a/arch/arm/src/stm32l4/stm32l4_1wire.c
+++ b/arch/arm/src/stm32l4/stm32l4_1wire.c
@@ -1183,7 +1183,9 @@ static int stm32_1wire_pm_prepare(FAR struct pm_callback_s *cb, int domain,
 
       if (sval <= 0)
         {
-          /* Exclusive lock is held, do not allow entry to deeper PM states. */
+          /* Exclusive lock is held, do not allow entry to deeper PM
+           * states.
+           */
 
           return -EBUSY;
         }
diff --git a/arch/arm/src/stm32l4/stm32l4_i2c.c b/arch/arm/src/stm32l4/stm32l4_i2c.c
index 19cc04a..c0d2159 100644
--- a/arch/arm/src/stm32l4/stm32l4_i2c.c
+++ b/arch/arm/src/stm32l4/stm32l4_i2c.c
@@ -931,7 +931,7 @@ static inline int stm32l4_i2c_sem_waitdone(FAR struct stm32l4_i2c_priv_s *priv)
  ************************************************************************************/
 
 static inline void
-stm32l4_i2c_set_7bit_address(FAR struct stm32l4_i2c_priv_s *priv)
+  stm32l4_i2c_set_7bit_address(FAR struct stm32l4_i2c_priv_s *priv)
 {
   stm32l4_i2c_modifyreg32(priv, STM32L4_I2C_CR2_OFFSET, I2C_CR2_SADD7_MASK,
                           ((priv->msgv->addr & 0x7f) << I2C_CR2_SADD7_SHIFT));


[incubator-nuttx] 01/02: arch/arm/src/stm32l4/stm32l4_1wire.c: fix build error, fix typo

Posted by ag...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 552ca28d22ea2155fd298458a190232c477ec292
Author: Juha Niskanen <ju...@haltian.com>
AuthorDate: Tue Apr 14 09:38:19 2020 -0600

    arch/arm/src/stm32l4/stm32l4_1wire.c: fix build error, fix typo
---
 arch/arm/src/lc823450/lc823450_i2c.c | 2 +-
 arch/arm/src/stm32/stm32_1wire.c     | 2 +-
 arch/arm/src/stm32/stm32_i2c.c       | 2 +-
 arch/arm/src/stm32/stm32_i2c_alt.c   | 2 +-
 arch/arm/src/stm32/stm32f40xxx_i2c.c | 2 +-
 arch/arm/src/stm32h7/stm32_i2c.c     | 2 +-
 arch/arm/src/stm32l4/stm32l4_1wire.c | 4 ++--
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/src/lc823450/lc823450_i2c.c b/arch/arm/src/lc823450/lc823450_i2c.c
index a6d5831..8716903 100644
--- a/arch/arm/src/lc823450/lc823450_i2c.c
+++ b/arch/arm/src/lc823450/lc823450_i2c.c
@@ -134,7 +134,7 @@ struct lc823450_i2c_priv_s
 
   FAR const struct lc823450_i2c_config_s *config;
 
-  int   refs;                      /* Referernce count */
+  int   refs;                      /* Reference count */
   sem_t sem_excl;                  /* Mutual exclusion semaphore */
 #ifndef CONFIG_I2C_POLLED
   sem_t sem_isr;                   /* Interrupt wait semaphore */
diff --git a/arch/arm/src/stm32/stm32_1wire.c b/arch/arm/src/stm32/stm32_1wire.c
index 98c98c3..e6691d3 100644
--- a/arch/arm/src/stm32/stm32_1wire.c
+++ b/arch/arm/src/stm32/stm32_1wire.c
@@ -129,7 +129,7 @@ struct stm32_1wire_config_s
 struct stm32_1wire_priv_s
 {
   const struct stm32_1wire_config_s *config; /* Port configuration */
-  volatile int refs;                         /* Referernce count */
+  volatile int refs;                         /* Reference count */
   sem_t    sem_excl;                         /* Mutual exclusion semaphore */
   sem_t    sem_isr;                          /* Interrupt wait semaphore */
   int      baud;                             /* Baud rate */
diff --git a/arch/arm/src/stm32/stm32_i2c.c b/arch/arm/src/stm32/stm32_i2c.c
index 9320daf..a82f6eb 100644
--- a/arch/arm/src/stm32/stm32_i2c.c
+++ b/arch/arm/src/stm32/stm32_i2c.c
@@ -250,7 +250,7 @@ struct stm32_i2c_priv_s
 
   const struct stm32_i2c_config_s *config;
 
-  int refs;                    /* Referernce count */
+  int refs;                    /* Reference count */
   sem_t sem_excl;              /* Mutual exclusion semaphore */
 #ifndef CONFIG_I2C_POLLED
   sem_t sem_isr;               /* Interrupt wait semaphore */
diff --git a/arch/arm/src/stm32/stm32_i2c_alt.c b/arch/arm/src/stm32/stm32_i2c_alt.c
index d3e61b5..239d79d 100644
--- a/arch/arm/src/stm32/stm32_i2c_alt.c
+++ b/arch/arm/src/stm32/stm32_i2c_alt.c
@@ -278,7 +278,7 @@ struct stm32_i2c_priv_s
 
   const struct stm32_i2c_config_s *config;
 
-  int refs;                    /* Referernce count */
+  int refs;                    /* Reference count */
   sem_t sem_excl;              /* Mutual exclusion semaphore */
 #ifndef CONFIG_I2C_POLLED
   sem_t sem_isr;               /* Interrupt wait semaphore */
diff --git a/arch/arm/src/stm32/stm32f40xxx_i2c.c b/arch/arm/src/stm32/stm32f40xxx_i2c.c
index b783d40..302124b 100644
--- a/arch/arm/src/stm32/stm32f40xxx_i2c.c
+++ b/arch/arm/src/stm32/stm32f40xxx_i2c.c
@@ -265,7 +265,7 @@ struct stm32_i2c_priv_s
 
   const struct stm32_i2c_config_s *config;
 
-  int refs;                    /* Referernce count */
+  int refs;                    /* Reference count */
   sem_t sem_excl;              /* Mutual exclusion semaphore */
 #ifndef CONFIG_I2C_POLLED
   sem_t sem_isr;               /* Interrupt wait semaphore */
diff --git a/arch/arm/src/stm32h7/stm32_i2c.c b/arch/arm/src/stm32h7/stm32_i2c.c
index a588e0e..5fc7155 100644
--- a/arch/arm/src/stm32h7/stm32_i2c.c
+++ b/arch/arm/src/stm32h7/stm32_i2c.c
@@ -384,7 +384,7 @@ struct stm32_i2c_priv_s
 
   const struct stm32_i2c_config_s *config;
 
-  int refs;                    /* Referernce count */
+  int refs;                    /* Reference count */
   sem_t sem_excl;              /* Mutual exclusion semaphore */
 #ifndef CONFIG_I2C_POLLED
   sem_t sem_isr;               /* Interrupt wait semaphore */
diff --git a/arch/arm/src/stm32l4/stm32l4_1wire.c b/arch/arm/src/stm32l4/stm32l4_1wire.c
index d615e57..82ecf63 100644
--- a/arch/arm/src/stm32l4/stm32l4_1wire.c
+++ b/arch/arm/src/stm32l4/stm32l4_1wire.c
@@ -122,7 +122,7 @@ struct stm32_1wire_config_s
 struct stm32_1wire_priv_s
 {
   const struct stm32_1wire_config_s *config; /* Port configuration */
-  volatile int refs;                         /* Referernce count */
+  volatile int refs;                         /* Reference count */
   sem_t    sem_excl;                         /* Mutual exclusion semaphore */
   sem_t    sem_isr;                          /* Interrupt wait semaphore */
   int      baud;                             /* Baud rate */
@@ -681,7 +681,7 @@ static inline void stm32_1wire_sem_destroy(
  *
  ****************************************************************************/
 
-static int void stm32_1wire_sem_wait(FAR struct stm32_1wire_priv_s *priv)
+static inline int stm32_1wire_sem_wait(FAR struct stm32_1wire_priv_s *priv)
 {
   return nxsem_wait_uninterruptible(&priv->sem_excl);
 }