diff --git a/drivers/include/sps30.h b/drivers/include/sps30.h index f9ca3a6cc2..6519a0718b 100644 --- a/drivers/include/sps30.h +++ b/drivers/include/sps30.h @@ -144,8 +144,8 @@ typedef enum { * suboptimal wiring. * */ -#ifndef SPS30_ERROR_RETRY -#define SPS30_ERROR_RETRY (500U) +#ifndef CONFIG_SPS30_ERROR_RETRY +#define CONFIG_SPS30_ERROR_RETRY (500U) #endif /** @} */ diff --git a/drivers/sps30/sps30.c b/drivers/sps30/sps30.c index f5432ee85e..edb8975c4c 100644 --- a/drivers/sps30/sps30.c +++ b/drivers/sps30/sps30.c @@ -142,7 +142,7 @@ static int _rx_tx_data(const sps30_t *dev, uint16_t ptr_addr, uint8_t *data, size_t len, bool read) { int res = 0; - unsigned retr = SPS30_ERROR_RETRY; + unsigned retr = CONFIG_SPS30_ERROR_RETRY; if (i2c_acquire(dev->p.i2c_dev) != 0) { LOG_ERROR("could not acquire I2C bus %d\n", dev->p.i2c_dev);