From 5f4838e7160f7ca6d3a81409a3848627c8b72b40 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 10 Jul 2020 14:44:15 +0200 Subject: [PATCH] drivers/sht3x: fix conflict with libc function name --- drivers/sht3x/sht3x_saul.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/sht3x/sht3x_saul.c b/drivers/sht3x/sht3x_saul.c index 2c22fff369..350c511889 100644 --- a/drivers/sht3x/sht3x_saul.c +++ b/drivers/sht3x/sht3x_saul.c @@ -51,7 +51,7 @@ static unsigned _dev2index (const sht3x_dev_t *dev) return SHT3X_NUM; } -static int read(int dev) +static int _read(int dev) { /* read both sensor values */ unsigned res = sht3x_read(&sht3x_devs[dev], &_temp[dev], &_hum[dev]); @@ -74,7 +74,7 @@ static int read_temp(const void *dev, phydat_t *data) } /* either local variable is valid or fetching it was successful */ - if (_temp_valid[dev_index] || read(dev_index) == SHT3X_OK) { + if (_temp_valid[dev_index] || _read(dev_index) == SHT3X_OK) { /* mark local variable as invalid */ _temp_valid[dev_index] = false; @@ -96,7 +96,7 @@ static int read_hum(const void *dev, phydat_t *data) } /* either local variable is valid or fetching it was successful */ - if (_hum_valid[dev_index] || read(dev_index) == SHT3X_OK) { + if (_hum_valid[dev_index] || _read(dev_index) == SHT3X_OK) { /* mark local variable as invalid */ _hum_valid[dev_index] = false;