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 2024/05/20 02:13:48 UTC
(nuttx) 01/04: sensors/bh1749nuc_uorb.c: add sensor reset
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/nuttx.git
commit 9d768498ce278aaeae7cd32d347da55b142683d8
Author: raiden00pl <ra...@railab.me>
AuthorDate: Wed May 1 18:49:14 2024 +0200
sensors/bh1749nuc_uorb.c: add sensor reset
---
drivers/sensors/bh1749nuc_uorb.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/sensors/bh1749nuc_uorb.c b/drivers/sensors/bh1749nuc_uorb.c
index 2936168c42..eb0872cc04 100644
--- a/drivers/sensors/bh1749nuc_uorb.c
+++ b/drivers/sensors/bh1749nuc_uorb.c
@@ -505,6 +505,11 @@ int bh1749nuc_register_uorb(int devno, FAR struct bh1749nuc_config_s *config)
goto ir_err;
}
+ /* SW Reset */
+
+ bh1749nuc_putreg8(&dev->dev, BH1749NUC_SYSTEM_CONTROL,
+ BH1749NUC_SYSTEM_CONTROL_SW_RESET);
+
#ifdef CONFIG_SENSORS_BH1749NUC_POLL
/* Create thread for polling sensor data */