You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "fdcavalcanti (via GitHub)" <gi...@apache.org> on 2023/05/07 23:27:07 UTC

[GitHub] [nuttx] fdcavalcanti opened a new pull request, #9206: Added MPU6050 to TM4C bring up sequence.

fdcavalcanti opened a new pull request, #9206:
URL: https://github.com/apache/nuttx/pull/9206

   ## Summary
   This is a board I'm currently using and it is has only one sensor in its bring up sequence.
   This commit adds the MPU6050 driver allocation and also fixes a simple linter error found.
   
   ## Impact
   One more function to the tm4c_bringup.c file.
   
   ## Testing
   Tested on the MPU6050 IMU. No issues were found.
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #9206: boards/arm/tiva: mpu6050 driver binding to TM4C1294

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #9206:
URL: https://github.com/apache/nuttx/pull/9206#discussion_r1197064063


##########
boards/arm/tiva/tm4c1294-launchpad/src/tm4c_bringup.c:
##########
@@ -192,6 +193,58 @@ static int tm4c_bmi160_setup(int bus)
 }
 #endif
 
+/****************************************************************************
+ * Name: tm4c_mpu60x0_setup
+ *
+ * Description:
+ *   Initialize and register the Invensense MPU60x0 sensor.
+ *
+ * Input Parameters:
+ *   bus - A number identifying the I2C bus.
+ *
+ * Returned Value:
+ *   On success, zero (OK) is returned. On failure, a negated errno value
+ *   is returned to indicate the nature of the failure.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_SENSORS_MPU60X0
+static int tm4c_mpu60x0_setup(int bus)
+{
+  int ret;
+  struct i2c_master_s *i2c;
+  struct mpu_config_s *mpu_config;
+
+  /* Initialize i2c device */
+
+  i2c = tiva_i2cbus_initialize(bus);
+  if (!i2c)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to initialize i2c%d.\n", bus);
+      return -ENODEV;
+    }
+
+  mpu_config = kmm_zalloc(sizeof(struct mpu_config_s));
+  if (mpu_config == NULL)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to allocate mpu60x0 driver\n");
+      return -ENOMEM;
+    }
+    else

Review Comment:
   remove 2 extra spaces



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [nuttx] acassis commented on pull request #9206: boards/arm/tiva: mpu6050 driver binding to TM4C1294

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #9206:
URL: https://github.com/apache/nuttx/pull/9206#issuecomment-1538484930

   Welcome @fdcavalcanti !!!


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #9206: Added MPU6050 to TM4C bring up sequence.

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #9206:
URL: https://github.com/apache/nuttx/pull/9206#issuecomment-1537642365

   @fdcavalcanti please squash your patchset and fix nxstyle warning.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [nuttx] acassis merged pull request #9206: boards/arm/tiva: mpu6050 driver binding to TM4C1294

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #9206:
URL: https://github.com/apache/nuttx/pull/9206


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [nuttx] aerothings commented on pull request #9206: Added MPU6050 to TM4C bring up sequence.

Posted by "aerothings (via GitHub)" <gi...@apache.org>.
aerothings commented on PR #9206:
URL: https://github.com/apache/nuttx/pull/9206#issuecomment-1538166919

   Hi @fdcavalcanti nice to see another "brazuca" here!
   
   Please check your modifications' code style, it is failing in the CI.
   
   You can do it this way:
   
   $ ./tools/checkpatch.sh -f path/to/file.c
   
   After that you will need to rebase and squash, these steps are documented here:
   
   https://nuttx.apache.org/docs/latest/contributing/making-changes.html#how-to-include-the-suggestions-on-your-pull-request


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [nuttx] fdcavalcanti commented on pull request #9206: Added MPU6050 to TM4C bring up sequence.

Posted by "fdcavalcanti (via GitHub)" <gi...@apache.org>.
fdcavalcanti commented on PR #9206:
URL: https://github.com/apache/nuttx/pull/9206#issuecomment-1538200553

   @xiaoxiang781216 @jerpelea done.
   @aerothings Nice to be here, happy to contribute!
   
   Is this commit message appropriate?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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