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 2020/06/05 04:21:54 UTC

[incubator-nuttx] branch master updated (4b9886f -> 871d5c6)

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 4b9886f  drivers: audio: Return -ENOTTY in xxx_ioctl() if not handled
     new 1c17e5f  arch/arm/src/stm32/Kconfig: Fix a trivial typo (I2C -> I2S)
     new a098e03  arch/arm/src/stm32/stm32_i2s.h: file hardware/stm32_i2s.h does not exist.
     new a30b77c  arch/arm/src/stm32/stm32.h: Include stm32_i2s.h
     new 1ca5527  arch/arm/src/stm32/stm32_i2s: Change the initialize function from stm32_i2sdev_initialize to stm32_i2sbus_initiliaze, to be consistent with the way other buses are initialized. The stm32_i2sdev_initiliaze (similar to stm32_spidev_initialize for example) is a board specific function that does any necessary initialization that's board depedent.
     new 871d5c6  Fix PR 1188 nxstyle issues

The 5 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/stm32/Kconfig                         |  2 +-
 arch/arm/src/stm32/stm32.h                         |  5 +--
 arch/arm/src/stm32/stm32_i2s.c                     |  6 ++--
 arch/arm/src/stm32/stm32_i2s.h                     |  5 ++-
 .../arm/stm32/stm32f4discovery/src/stm32_cs43l22.c | 39 ++++++++++++++--------
 .../stm32/stm32f4discovery/src/stm32f4discovery.h  |  2 +-
 6 files changed, 33 insertions(+), 26 deletions(-)


[incubator-nuttx] 03/05: arch/arm/src/stm32/stm32.h: Include stm32_i2s.h

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 a30b77cbb940458cf979083064a9f76cd566fb7b
Author: Ouss4 <ab...@gmail.com>
AuthorDate: Wed Jun 3 20:42:53 2020 +0100

    arch/arm/src/stm32/stm32.h: Include stm32_i2s.h
---
 arch/arm/src/stm32/stm32.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/src/stm32/stm32.h b/arch/arm/src/stm32/stm32.h
index 7df53d8..8fceece 100644
--- a/arch/arm/src/stm32/stm32.h
+++ b/arch/arm/src/stm32/stm32.h
@@ -75,6 +75,7 @@
 #include "stm32_rtc.h"
 #include "stm32_sdio.h"
 #include "stm32_spi.h"
+#include "stm32_i2s.h"
 #include "stm32_tim.h"
 #include "stm32_uart.h"
 #include "stm32_usbdev.h"


[incubator-nuttx] 01/05: arch/arm/src/stm32/Kconfig: Fix a trivial typo (I2C -> I2S)

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 1c17e5f3c3ba6663c635bad1f0d8e8f85e519975
Author: Ouss4 <ab...@gmail.com>
AuthorDate: Wed Jun 3 15:43:30 2020 +0100

    arch/arm/src/stm32/Kconfig: Fix a trivial typo (I2C -> I2S)
---
 arch/arm/src/stm32/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/stm32/Kconfig b/arch/arm/src/stm32/Kconfig
index d918726..7812e88 100644
--- a/arch/arm/src/stm32/Kconfig
+++ b/arch/arm/src/stm32/Kconfig
@@ -9313,7 +9313,7 @@ config STM32_I2S3_DATALEN
 
 #if STM32_I2S
 config STM32_I2S3_RX
-	bool "Enable I2C receiver"
+	bool "Enable I2S receiver"
 	default n
 	---help---
 		Enable I2S receipt logic


[incubator-nuttx] 04/05: arch/arm/src/stm32/stm32_i2s: Change the initialize function from stm32_i2sdev_initialize to stm32_i2sbus_initiliaze, to be consistent with the way other buses are initialized. The stm32_i2sdev_initiliaze (similar to stm32_spidev_initialize for example) is a board specific function that does any necessary initialization that's board depedent.

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 1ca552716c4a66d010db266910e496c9ab38d06a
Author: Ouss4 <ab...@gmail.com>
AuthorDate: Wed Jun 3 20:43:57 2020 +0100

    arch/arm/src/stm32/stm32_i2s: Change the initialize function from
    stm32_i2sdev_initialize to stm32_i2sbus_initiliaze, to be consistent
    with the way other buses are initialized.
    The stm32_i2sdev_initiliaze (similar to stm32_spidev_initialize for
    example) is a board specific function that does any necessary
    initialization that's board depedent.
---
 arch/arm/src/stm32/stm32_i2s.c                           | 6 +++---
 arch/arm/src/stm32/stm32_i2s.h                           | 4 ++--
 boards/arm/stm32/stm32f4discovery/src/stm32_cs43l22.c    | 2 +-
 boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/src/stm32/stm32_i2s.c b/arch/arm/src/stm32/stm32_i2s.c
index 3de5619..4762abd 100644
--- a/arch/arm/src/stm32/stm32_i2s.c
+++ b/arch/arm/src/stm32/stm32_i2s.c
@@ -49,7 +49,7 @@
  *      is configured.
  *   3. Add a calls to up_spiinitialize() in your low level application
  *      initialization logic
- *   4. The handle returned by stm32_i2sdev_initialize() may then be used to
+ *   4. The handle returned by stm32_i2sbus_initialize() may then be used to
  *     bind the I2S driver to higher level logic
  *
  ****************************************************************************/
@@ -2604,7 +2604,7 @@ static void i2s3_configure(struct stm32_i2s_s *priv)
  ****************************************************************************/
 
 /****************************************************************************
- * Name: stm32_i2sdev_initialize
+ * Name: stm32_i2sbus_initialize
  *
  * Description:
  *   Initialize the selected i2S port
@@ -2617,7 +2617,7 @@ static void i2s3_configure(struct stm32_i2s_s *priv)
  *
  ****************************************************************************/
 
-FAR struct i2s_dev_s *stm32_i2sdev_initialize(int port)
+FAR struct i2s_dev_s *stm32_i2sbus_initialize(int port)
 {
   FAR struct stm32_i2s_s *priv = NULL;
   irqstate_t flags;
diff --git a/arch/arm/src/stm32/stm32_i2s.h b/arch/arm/src/stm32/stm32_i2s.h
index 29e1cce..b14a18d 100644
--- a/arch/arm/src/stm32/stm32_i2s.h
+++ b/arch/arm/src/stm32/stm32_i2s.h
@@ -65,7 +65,7 @@ extern "C"
  ************************************************************************************/
 
 /************************************************************************************
- * Name: stm32_i2sdev_initialize
+ * Name: stm32_i2sbus_initialize
  *
  * Description:
  *   Initialize the selected I2S port
@@ -78,7 +78,7 @@ extern "C"
  *
  ************************************************************************************/
 
-FAR struct i2s_dev_s *stm32_i2sdev_initialize(int port);
+FAR struct i2s_dev_s *stm32_i2sbus_initialize(int port);
 
 #undef EXTERN
 #if defined(__cplusplus)
diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_cs43l22.c b/boards/arm/stm32/stm32f4discovery/src/stm32_cs43l22.c
index d66eabe..40e9c44 100644
--- a/boards/arm/stm32/stm32f4discovery/src/stm32_cs43l22.c
+++ b/boards/arm/stm32/stm32f4discovery/src/stm32_cs43l22.c
@@ -297,7 +297,7 @@ int stm32_cs43l22_initialize(int minor)
         }
       /* Get an instance of the I2S interface for the CS43L22 data channel */
 
-      i2s = stm32_i2sdev_initialize(CS43L22_I2S_BUS);
+      i2s = stm32_i2sbus_initialize(CS43L22_I2S_BUS);
       if (!i2s)
         {
           auderr("ERROR: Failed to initialize I2S%d\n", CS43L22_I2S_BUS);
diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h b/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h
index 7b04f90..beed99d 100644
--- a/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h
+++ b/boards/arm/stm32/stm32f4discovery/src/stm32f4discovery.h
@@ -438,7 +438,7 @@ void weak_function stm32_spidev_initialize(void);
  *
  ****************************************************************************/
 
-FAR struct i2s_dev_s *stm32_i2sdev_initialize(int port);
+void weak_function stm32_i2sdev_initialize(void);
 
 /****************************************************************************
  * Name: stm32_bh1750initialize


[incubator-nuttx] 05/05: Fix PR 1188 nxstyle issues

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 871d5c6b728be4a281eb44c4176980189ee9af17
Author: Ouss4 <ab...@gmail.com>
AuthorDate: Wed Jun 3 20:57:01 2020 +0100

    Fix PR 1188 nxstyle issues
---
 arch/arm/src/stm32/stm32.h                         |  4 ---
 .../arm/stm32/stm32f4discovery/src/stm32_cs43l22.c | 37 ++++++++++++++--------
 2 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/arch/arm/src/stm32/stm32.h b/arch/arm/src/stm32/stm32.h
index 8fceece..a0975e9 100644
--- a/arch/arm/src/stm32/stm32.h
+++ b/arch/arm/src/stm32/stm32.h
@@ -49,10 +49,6 @@
 
 #include "arm_internal.h"
 
-/************************************************************************************
- * Pre-processor Definitions
- ************************************************************************************/
-
 /* Peripherals **********************************************************************/
 
 #include "chip.h"
diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_cs43l22.c b/boards/arm/stm32/stm32f4discovery/src/stm32_cs43l22.c
index 40e9c44..9ce4220 100644
--- a/boards/arm/stm32/stm32f4discovery/src/stm32_cs43l22.c
+++ b/boards/arm/stm32/stm32f4discovery/src/stm32_cs43l22.c
@@ -153,7 +153,8 @@ static int cs43l22_attach(FAR const struct cs43l22_lower_s *lower,
   if (isr)
     {
       /* Just save the address of the handler and its argument for now.  The
-       * new handler will called via cs43l22_interrupt() when the interrupt occurs.
+       * new handler will called via cs43l22_interrupt() when the interrupt
+       * occurs.
        */
 
       audinfo("Attaching %p\n", isr);
@@ -171,7 +172,8 @@ static int cs43l22_attach(FAR const struct cs43l22_lower_s *lower,
   return OK;
 }
 
-static bool cs43l22_enable(FAR const struct cs43l22_lower_s *lower, bool enable)
+static bool cs43l22_enable(FAR const struct cs43l22_lower_s *lower,
+                           bool enable)
 {
   static bool enabled;
   irqstate_t flags;
@@ -187,14 +189,17 @@ static bool cs43l22_enable(FAR const struct cs43l22_lower_s *lower, bool enable)
       if (enable && g_cs43l22info.handler)
         {
           audinfo("Enabling\n");
+
           /* TODO: stm32_pioirqenable(IRQ_INT_CS43L22); */
+
           enabled = true;
         }
       else
         {
-
           audinfo("Disabling\n");
+
           /* TODO: stm32_pioirqdisable(IRQ_INT_CS43L22); */
+
           enabled = false;
         }
     }
@@ -207,7 +212,7 @@ static bool cs43l22_enable(FAR const struct cs43l22_lower_s *lower, bool enable)
 #if 0
 static int cs43l22_interrupt(int irq, FAR void *context)
 {
-   Just forward the interrupt to the CS43L22 driver
+  /* Just forward the interrupt to the CS43L22 driver */
 
   audinfo("handler %p\n", g_cs43l22info.handler);
   if (g_cs43l22info.handler)
@@ -215,10 +220,12 @@ static int cs43l22_interrupt(int irq, FAR void *context)
       return g_cs43l22info.handler(&g_cs43l22info.lower, g_cs43l22info.arg);
     }
 
-   We got an interrupt with no handler.  This should not
-   happen.
+  /* We got an interrupt with no handler.  This should not
+   * happen.
+   */
+
+  /* TODO: stm32_pioirqdisable(IRQ_INT_CS43L22); */
 
-   TODO: stm32_pioirqdisable(IRQ_INT_CS43L22);
   return OK;
 }
 #endif
@@ -272,10 +279,11 @@ int stm32_cs43l22_initialize(int minor)
   audinfo("minor %d\n", minor);
   DEBUGASSERT(minor >= 0 && minor <= 25);
 
-  /* Have we already initialized?  Since we never uninitialize we must prevent
-   * multiple initializations.  This is necessary, for example, when the
-   * touchscreen example is used as a built-in application in NSH and can be
-   * called numerous time.  It will attempt to initialize each time.
+  /* Have we already initialized?  Since we never uninitialize we must
+   * prevent multiple initializations.  This is necessary, for example,
+   * when the touchscreen example is used as a built-in application in
+   * NSH and can be called numerous time.  It will attempt to initialize
+   * each time.
    */
 
   if (!initialized)
@@ -295,6 +303,7 @@ int stm32_cs43l22_initialize(int minor)
           ret = -ENODEV;
           goto errout;
         }
+
       /* Get an instance of the I2S interface for the CS43L22 data channel */
 
       i2s = stm32_i2sbus_initialize(CS43L22_I2S_BUS);
@@ -305,8 +314,8 @@ int stm32_cs43l22_initialize(int minor)
           goto errout_with_i2c;
         }
 
-      /* Configure the DAC master clock.  This clock is provided by PCK2 (PB10)
-       * that is connected to the CS43L22 MCLK.
+      /* Configure the DAC master clock.  This clock is provided by
+       * PCK2 (PB10) that is connected to the CS43L22 MCLK.
        */
 
       /* Configure CS43L22 interrupts */
@@ -332,6 +341,7 @@ int stm32_cs43l22_initialize(int minor)
           ret = -ENODEV;
           goto errout_with_irq;
         }
+
       /* No we can embed the CS43L22/I2C/I2S conglomerate into a PCM decoder
        * instance so that we will have a PCM front end for the the CS43L22
        * driver.
@@ -344,6 +354,7 @@ int stm32_cs43l22_initialize(int minor)
           ret = -ENODEV;
           goto errout_with_cs43l22;
         }
+
       /* Create a device name */
 
       snprintf(devname, 12, "pcm%d",  minor);


[incubator-nuttx] 02/05: arch/arm/src/stm32/stm32_i2s.h: file hardware/stm32_i2s.h does not exist.

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 a098e03005a38047a678310143412143a21049f9
Author: Ouss4 <ab...@gmail.com>
AuthorDate: Wed Jun 3 20:15:08 2020 +0100

    arch/arm/src/stm32/stm32_i2s.h: file hardware/stm32_i2s.h does not
    exist.
---
 arch/arm/src/stm32/stm32_i2s.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/src/stm32/stm32_i2s.h b/arch/arm/src/stm32/stm32_i2s.h
index 9361e79..29e1cce 100644
--- a/arch/arm/src/stm32/stm32_i2s.h
+++ b/arch/arm/src/stm32/stm32_i2s.h
@@ -44,7 +44,6 @@
 #include <nuttx/audio/i2s.h>
 
 #include "chip.h"
-#include "hardware/stm32_i2s.h"
 
 #ifndef __ASSEMBLY__