Skip to content

Commit

Permalink
drivers/bme680: fix conflict with libc function name
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Jul 10, 2020
1 parent cde098f commit b9ed7e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/bme680/bme680_saul.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static unsigned _dev2index (const bme680_t *dev)
return BME680_NUMOF;
}

static int read(int dev)
static int _read(int dev)
{
/* measure and read sensor values */
int res;
Expand Down Expand Up @@ -101,7 +101,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) == BME680_OK) {
if (_temp_valid[dev_index] || _read(dev_index) == BME680_OK) {
/* mark local variable as invalid */
_temp_valid[dev_index] = false;

Expand All @@ -123,7 +123,7 @@ static int read_press(const void *dev, phydat_t *data)
}

/* either local variable is valid or fetching it was successful */
if (_press_valid[dev_index] || read(dev_index) == BME680_OK) {
if (_press_valid[dev_index] || _read(dev_index) == BME680_OK) {
/* mark local variable as invalid */
_press_valid[dev_index] = false;

Expand All @@ -145,7 +145,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) == BME680_OK) {
if (_hum_valid[dev_index] || _read(dev_index) == BME680_OK) {
/* mark local variable as invalid */
_hum_valid[dev_index] = false;

Expand All @@ -167,7 +167,7 @@ static int read_gas(const void *dev, phydat_t *data)
}

/* either local variable is valid or fetching it was successful */
if (_gas_valid[dev_index] || read(dev_index) == BME680_OK) {
if (_gas_valid[dev_index] || _read(dev_index) == BME680_OK) {
/* mark local variable as invalid */
_gas_valid[dev_index] = false;

Expand Down

0 comments on commit b9ed7e9

Please sign in to comment.