drivers/sps30 : Add CONFIG_

Add CONFIG_ prefix to SPS30_ERROR_RETRY
This commit is contained in:
Akshai M 2020-04-26 21:23:00 +05:30
parent a0a4091b2a
commit 819a36d513
2 changed files with 3 additions and 3 deletions

View File

@ -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
/** @} */

View File

@ -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);