You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by bt...@apache.org on 2021/01/18 04:49:32 UTC

[incubator-nuttx] branch master updated (0f1c026 -> 7df322c)

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

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


    from 0f1c026  nrf52_i2c: add support for I2C_M_NOSTART flags
     new eda15d2  boards/imxrt1020-evk: Don't include the unused bt_uart_shim.h
     new 9103184  bluetooth: Rename *bt_uart_shim_getdevice to btuart_shim_getdevice
     new 7df322c  bluetooth: Move the lower half null check to common place

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:
 boards/arm/imxrt/imxrt1020-evk/src/imxrt_bringup.c    | 10 ++++------
 boards/arm/stm32/stm32f4discovery/src/stm32_hciuart.c | 16 ++++------------
 boards/arm/tiva/tm4c1294-launchpad/src/tm4c_hciuart.c | 16 ++++------------
 drivers/wireless/bluetooth/bt_uart_bcm4343x.c         |  6 +++++-
 drivers/wireless/bluetooth/bt_uart_cc2564.c           |  6 +++++-
 drivers/wireless/bluetooth/bt_uart_generic.c          |  6 +++++-
 drivers/wireless/bluetooth/bt_uart_shim.c             |  4 ++--
 include/nuttx/wireless/bluetooth/bt_uart_shim.h       |  2 +-
 8 files changed, 30 insertions(+), 36 deletions(-)


[incubator-nuttx] 02/03: bluetooth: Rename *bt_uart_shim_getdevice to btuart_shim_getdevice

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

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

commit 910318472210d2ad95c597425d2c9769b2ec3aa5
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Jan 18 03:58:53 2021 +0800

    bluetooth: Rename *bt_uart_shim_getdevice to btuart_shim_getdevice
    
    follow other bluetooth driver convention(e.g. btuart_register)
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/wireless/bluetooth/bt_uart_shim.c       | 4 ++--
 include/nuttx/wireless/bluetooth/bt_uart_shim.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/wireless/bluetooth/bt_uart_shim.c b/drivers/wireless/bluetooth/bt_uart_shim.c
index 8f1cb15..a52d174 100644
--- a/drivers/wireless/bluetooth/bt_uart_shim.c
+++ b/drivers/wireless/bluetooth/bt_uart_shim.c
@@ -383,7 +383,7 @@ static int hcicollecttask(int argc, FAR char **argv)
  ****************************************************************************/
 
 /****************************************************************************
- * Name: bt_uart_shim_getdevice
+ * Name: btuart_shim_getdevice
  *
  * Description:
  *   Get a pointer to the device that will be used to communicate with the
@@ -397,7 +397,7 @@ static int hcicollecttask(int argc, FAR char **argv)
  *
  ****************************************************************************/
 
-FAR struct btuart_lowerhalf_s *bt_uart_shim_getdevice(FAR const char *path)
+FAR struct btuart_lowerhalf_s *btuart_shim_getdevice(FAR const char *path)
 {
   FAR struct hciuart_config_s *n;
   FAR struct hciuart_state_s *s;
diff --git a/include/nuttx/wireless/bluetooth/bt_uart_shim.h b/include/nuttx/wireless/bluetooth/bt_uart_shim.h
index 536335f..69cf38e 100644
--- a/include/nuttx/wireless/bluetooth/bt_uart_shim.h
+++ b/include/nuttx/wireless/bluetooth/bt_uart_shim.h
@@ -49,7 +49,7 @@
  * Public Function Prototypes
  ****************************************************************************/
 
-FAR struct btuart_lowerhalf_s *bt_uart_shim_getdevice(FAR const char *path);
+FAR struct btuart_lowerhalf_s *btuart_shim_getdevice(FAR const char *path);
 
 #endif
 #endif


[incubator-nuttx] 01/03: boards/imxrt1020-evk: Don't include the unused bt_uart_shim.h

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

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

commit eda15d23c2418484afa35aaa2ed75b2d0ef09d21
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Jan 18 03:57:18 2021 +0800

    boards/imxrt1020-evk: Don't include the unused bt_uart_shim.h
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 boards/arm/imxrt/imxrt1020-evk/src/imxrt_bringup.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_bringup.c b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_bringup.c
index 058336e..ef5745b 100644
--- a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_bringup.c
+++ b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_bringup.c
@@ -47,7 +47,10 @@
 
 #include <nuttx/i2c/i2c_master.h>
 #include <nuttx/wireless/bluetooth/bt_uart.h>
-#include <nuttx/wireless/bluetooth/bt_uart_shim.h>
+
+#include "hardware/imxrt_pinmux.h"
+#include "hardware/imxrt_ccm.h"
+#include "imxrt_periphclks.h"
 
 #include "imxrt_lpi2c.h"
 #include "imxrt_flexspi_nor_boot.h"
@@ -164,11 +167,6 @@ int imxrt_bringup(void)
    * capabilities.
    */
 
-#include "arm_arch.h"
-#include "hardware/imxrt_pinmux.h"
-#include "hardware/imxrt_ccm.h"
-#include "imxrt_periphclks.h"
-
 #ifdef CONFIG_USBHOST
   ret = imxrt_usbhost_initialize();
   if (ret < 0)


[incubator-nuttx] 03/03: bluetooth: Move the lower half null check to common place

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

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

commit 7df322c6be655981812716b564874d98f0c9ec2e
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Jan 18 04:07:37 2021 +0800

    bluetooth: Move the lower half null check to common place
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 boards/arm/stm32/stm32f4discovery/src/stm32_hciuart.c | 16 ++++------------
 boards/arm/tiva/tm4c1294-launchpad/src/tm4c_hciuart.c | 16 ++++------------
 drivers/wireless/bluetooth/bt_uart_bcm4343x.c         |  6 +++++-
 drivers/wireless/bluetooth/bt_uart_cc2564.c           |  6 +++++-
 drivers/wireless/bluetooth/bt_uart_generic.c          |  6 +++++-
 5 files changed, 23 insertions(+), 27 deletions(-)

diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_hciuart.c b/boards/arm/stm32/stm32f4discovery/src/stm32_hciuart.c
index 72892a6..8a7f3e4 100644
--- a/boards/arm/stm32/stm32f4discovery/src/stm32_hciuart.c
+++ b/boards/arm/stm32/stm32f4discovery/src/stm32_hciuart.c
@@ -75,25 +75,17 @@
 
 int hciuart_dev_initialize(void)
 {
-  const struct btuart_lowerhalf_s *lower;
   int ret;
 
   /* Perform one-time initialization */
 
   hciuart_initialize();
 
-  /* Instantiate the HCI UART lower half interface */
+  /* Instantiate the HCI UART lower half interface
+   * Then initialize the HCI UART upper half driver with the bluetooth stack
+   */
 
-  lower = hciuart_instantiate(HCIUART_SERDEV);
-  if (lower == NULL)
-    {
-      wlerr("ERROR: Failed to instantiate HCIUART%d\n", HCIUART_SERDEV + 1);
-      return -ENODEV;
-    }
-
-  /* Then initialize the HCI UART upper half driver with the bluetooth stack */
-
-  ret = btuart_register(lower);
+  ret = btuart_register(hciuart_instantiate(HCIUART_SERDEV));
   if (ret < 0)
     {
       wlerr("ERROR: btuart_register() failed: %d\n", ret);
diff --git a/boards/arm/tiva/tm4c1294-launchpad/src/tm4c_hciuart.c b/boards/arm/tiva/tm4c1294-launchpad/src/tm4c_hciuart.c
index 74da902..b63d0d5 100644
--- a/boards/arm/tiva/tm4c1294-launchpad/src/tm4c_hciuart.c
+++ b/boards/arm/tiva/tm4c1294-launchpad/src/tm4c_hciuart.c
@@ -75,25 +75,17 @@
 
 int hciuart_dev_initialize(void)
 {
-  const struct btuart_lowerhalf_s *lower;
   int ret;
 
   /* Perform one-time initialization */
 
   hciuart_initialize();
 
-  /* Instantiate the HCI UART lower half interface */
+  /* Instantiate the HCI UART lower half interface
+   * Then initialize the HCI UART upper half driver with the bluetooth stack
+   */
 
-  lower = hciuart_instantiate(HCIUART_SERDEV);
-  if (lower == NULL)
-    {
-      wlerr("ERROR: Failed to instantiate HCIUART%d\n", HCIUART_SERDEV + 1);
-      return -ENODEV;
-    }
-
-  /* Then initialize the HCI UART upper half driver with the bluetooth stack */
-
-  ret = btuart_register(lower);
+  ret = btuart_register(hciuart_instantiate(HCIUART_SERDEV));
   if (ret < 0)
     {
       wlerr("ERROR: btuart_register() failed: %d\n", ret);
diff --git a/drivers/wireless/bluetooth/bt_uart_bcm4343x.c b/drivers/wireless/bluetooth/bt_uart_bcm4343x.c
index 8c96894..43e0f49 100644
--- a/drivers/wireless/bluetooth/bt_uart_bcm4343x.c
+++ b/drivers/wireless/bluetooth/bt_uart_bcm4343x.c
@@ -416,7 +416,11 @@ int btuart_register(FAR const struct btuart_lowerhalf_s *lower)
 
   wlinfo("lower %p\n", lower);
 
-  DEBUGASSERT(lower != NULL);
+  if (lower == NULL)
+    {
+      wlerr("ERROR: btuart lower half is NULL\n");
+      return -ENODEV;
+    }
 
   /* Allocate a new instance of the upper half driver state structure */
 
diff --git a/drivers/wireless/bluetooth/bt_uart_cc2564.c b/drivers/wireless/bluetooth/bt_uart_cc2564.c
index 2388784..fd49117 100644
--- a/drivers/wireless/bluetooth/bt_uart_cc2564.c
+++ b/drivers/wireless/bluetooth/bt_uart_cc2564.c
@@ -181,7 +181,11 @@ int btuart_register(FAR const struct btuart_lowerhalf_s *lower)
 
   wlinfo("lower %p\n", lower);
 
-  DEBUGASSERT(lower != NULL);
+  if (lower == NULL)
+    {
+      wlerr("ERROR: btuart lower half is NULL\n");
+      return -ENODEV;
+    }
 
   /* Allocate a new instance of the upper half driver state structure */
 
diff --git a/drivers/wireless/bluetooth/bt_uart_generic.c b/drivers/wireless/bluetooth/bt_uart_generic.c
index fcc7cfb..3f86481 100644
--- a/drivers/wireless/bluetooth/bt_uart_generic.c
+++ b/drivers/wireless/bluetooth/bt_uart_generic.c
@@ -75,7 +75,11 @@ int btuart_register(FAR const struct btuart_lowerhalf_s *lower)
 
   wlinfo("lower %p\n", lower);
 
-  DEBUGASSERT(lower != NULL);
+  if (lower == NULL)
+    {
+      wlerr("ERROR: btuart lower half is NULL\n");
+      return -ENODEV;
+    }
 
   /* Allocate a new instance of the upper half driver state structure */