mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/hdc1000 : Add CONFIG_
Add CONFIG_ Prefix for configuring the Compile time macros
This commit is contained in:
parent
5de5cea83a
commit
7a4191a8d5
@ -130,7 +130,7 @@ int hdc1000_read(const hdc1000_t *dev, int16_t *temp, int16_t *hum)
|
|||||||
if (hdc1000_trigger_conversion(dev) != HDC1000_OK) {
|
if (hdc1000_trigger_conversion(dev) != HDC1000_OK) {
|
||||||
return HDC1000_BUSERR;
|
return HDC1000_BUSERR;
|
||||||
}
|
}
|
||||||
xtimer_usleep(HDC1000_CONVERSION_TIME);
|
xtimer_usleep(CONFIG_HDC1000_CONVERSION_TIME);
|
||||||
return hdc1000_get_results(dev, temp, hum);
|
return hdc1000_get_results(dev, temp, hum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ extern "C" {
|
|||||||
#define HDC1000_PARAM_I2C I2C_DEV(0)
|
#define HDC1000_PARAM_I2C I2C_DEV(0)
|
||||||
#endif
|
#endif
|
||||||
#ifndef HDC1000_PARAM_ADDR
|
#ifndef HDC1000_PARAM_ADDR
|
||||||
#define HDC1000_PARAM_ADDR (HDC1000_I2C_ADDRESS)
|
#define HDC1000_PARAM_ADDR (CONFIG_HDC1000_I2C_ADDRESS)
|
||||||
#endif
|
#endif
|
||||||
#ifndef HDC1000_PARAM_RES
|
#ifndef HDC1000_PARAM_RES
|
||||||
#define HDC1000_PARAM_RES HDC1000_14BIT
|
#define HDC1000_PARAM_RES HDC1000_14BIT
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
* simplified `hdc1000_read()` function, or the conversion can be triggered
|
* simplified `hdc1000_read()` function, or the conversion can be triggered
|
||||||
* manually using the `hdc1000_trigger_conversion()` and `hdc1000_get_results()`
|
* manually using the `hdc1000_trigger_conversion()` and `hdc1000_get_results()`
|
||||||
* functions sequentially. If using the second method, on must wait at least
|
* functions sequentially. If using the second method, on must wait at least
|
||||||
* `HDC1000_CONVERSION_TIME` between triggering the conversion and reading the
|
* `CONFIG_HDC1000_CONVERSION_TIME` between triggering the conversion and reading the
|
||||||
* results.
|
* results.
|
||||||
*
|
*
|
||||||
* @note The driver does currently not support using the devices heating
|
* @note The driver does currently not support using the devices heating
|
||||||
@ -62,8 +62,8 @@ extern "C"
|
|||||||
* The address value depends on the state of ADR0 and ADR1 Pins
|
* The address value depends on the state of ADR0 and ADR1 Pins
|
||||||
* For more details refer Section 8.5.1 of datasheet
|
* For more details refer Section 8.5.1 of datasheet
|
||||||
*/
|
*/
|
||||||
#ifndef HDC1000_I2C_ADDRESS
|
#ifndef CONFIG_HDC1000_I2C_ADDRESS
|
||||||
#define HDC1000_I2C_ADDRESS (0x43)
|
#define CONFIG_HDC1000_I2C_ADDRESS (0x43)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -73,8 +73,8 @@ extern "C"
|
|||||||
* conversions (worst case) to allow for timer imprecision:
|
* conversions (worst case) to allow for timer imprecision:
|
||||||
* (convert temp + convert hum) * 2 -> (6.5ms + 6.5ms) * 2 := 26ms.
|
* (convert temp + convert hum) * 2 -> (6.5ms + 6.5ms) * 2 := 26ms.
|
||||||
*/
|
*/
|
||||||
#ifndef HDC1000_CONVERSION_TIME
|
#ifndef CONFIG_HDC1000_CONVERSION_TIME
|
||||||
#define HDC1000_CONVERSION_TIME (26000)
|
#define CONFIG_HDC1000_CONVERSION_TIME (26000)
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ int hdc1000_init(hdc1000_t *dev, const hdc1000_params_t *params);
|
|||||||
* @brief Trigger a new conversion
|
* @brief Trigger a new conversion
|
||||||
*
|
*
|
||||||
* After the conversion is triggered, one has to wait
|
* After the conversion is triggered, one has to wait
|
||||||
* @ref HDC1000_CONVERSION_TIME us until the results can be read using
|
* @ref CONFIG_HDC1000_CONVERSION_TIME us until the results can be read using
|
||||||
* @ref hdc1000_get_results().
|
* @ref hdc1000_get_results().
|
||||||
*
|
*
|
||||||
* @param[in] dev device descriptor of sensor
|
* @param[in] dev device descriptor of sensor
|
||||||
|
Loading…
Reference in New Issue
Block a user