You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2022/05/05 19:23:43 UTC

[incubator-nuttx] 04/05: drivers/sensors: Fix incompatible pointer type for bool

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

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

commit 346c3a1e83832e4f9384bf417afe2c8167a75f07
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Thu May 5 16:12:24 2022 +0800

    drivers/sensors: Fix incompatible pointer type for bool
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/sensors/ds18b20.c | 4 ++--
 drivers/sensors/hyt271.c  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/sensors/ds18b20.c b/drivers/sensors/ds18b20.c
index 6067c6bb48..31e228dbe9 100644
--- a/drivers/sensors/ds18b20.c
+++ b/drivers/sensors/ds18b20.c
@@ -158,7 +158,7 @@ struct ds18b20_dev_s
 /* Sensor functions */
 
 static int ds18b20_active(FAR struct sensor_lowerhalf_s *lower,
-                          unsigned char enabled);
+                          bool enabled);
 
 static int ds18b20_fetch(FAR struct sensor_lowerhalf_s *lower,
                          FAR char *buffer, size_t buflen);
@@ -740,7 +740,7 @@ static int ds18b20_control(FAR struct sensor_lowerhalf_s *lower,
  ****************************************************************************/
 
 static int ds18b20_active(FAR struct sensor_lowerhalf_s *lower,
-                         unsigned char enabled)
+                          bool enabled)
 {
 #ifdef CONFIG_SENSORS_DS18B20_POLL
   bool start_thread = false;
diff --git a/drivers/sensors/hyt271.c b/drivers/sensors/hyt271.c
index 5d4ea7d9c8..a2a0744d19 100644
--- a/drivers/sensors/hyt271.c
+++ b/drivers/sensors/hyt271.c
@@ -110,7 +110,7 @@ struct hyt271_dev_s
 /* Sensor functions */
 
 static int hyt271_active(FAR struct sensor_lowerhalf_s *lower,
-                         unsigned char enabled);
+                         bool enabled);
 
 static int hyt271_fetch(FAR struct sensor_lowerhalf_s *lower,
                         FAR char *buffer, size_t buflen);
@@ -712,7 +712,7 @@ static int hyt271_control(FAR struct sensor_lowerhalf_s *lower,
  ****************************************************************************/
 
 static int hyt271_active(FAR struct sensor_lowerhalf_s *lower,
-                         unsigned char enabled)
+                         bool enabled)
 {
 #ifdef CONFIG_SENSORS_HYT271_POLL
   bool start_thread = false;