nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #2888: This commit enables BMP180 suport for ESP32.
Date Mon, 22 Feb 2021 07:43:43 GMT

Ouss4 commented on a change in pull request #2888:
URL: https://github.com/apache/incubator-nuttx/pull/2888#discussion_r580037227



##########
File path: boards/xtensa/esp32/esp32-wrover-kit/src/esp32_bringup.c
##########
@@ -259,6 +264,24 @@ int esp32_bringup(void)
     }
 #endif
 
+#ifdef CONFIG_SENSORS_BMP180
+  ret = board_bmp180_initialize(0, 0);
+
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "Failed to initialize BMP180
+                       Driver for I2C0: %d\n", ret);

Review comment:
       ```suggestion
         syslog(LOG_ERR, "Failed to initialize BMP180"
                          " Driver for I2C0: %d\n", ret);
   ```

##########
File path: boards/xtensa/esp32/esp32-wrover-kit/src/esp32_bringup.c
##########
@@ -259,6 +264,24 @@ int esp32_bringup(void)
     }
 #endif
 
+#ifdef CONFIG_SENSORS_BMP180
+  ret = board_bmp180_initialize(0, 0);
+
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "Failed to initialize BMP180
+                       Driver for I2C0: %d\n", ret);
+      ret2 = board_bmp180_initialize(0, 1);
+
+      if (ret2 < 0)
+        {
+          syslog(LOG_ERR, "Failed to initialize BMP180
+                           Driver for I2C1: %d\n", ret);

Review comment:
       ```suggestion
             syslog(LOG_ERR, "Failed to initialize BMP180"
                              " Driver for I2C1: %d\n", ret);
   ```

##########
File path: boards/xtensa/esp32/esp32-wrover-kit/src/esp32_bringup.c
##########
@@ -119,6 +123,7 @@ static int esp32_init_wifi_storage(void)
 int esp32_bringup(void)
 {
   int ret;
+  int ret2;

Review comment:
       You can reusue the first `ret`, is there any reason you created  `ret2`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message