Device driver interface for the Maxim DS75LX temperature sensor.
More...
Device driver interface for the Maxim DS75LX temperature sensor.
This driver provides [S]ensor [A]ctuator [U]ber [L]ayer capabilities.
◆ anonymous enum
Status and error return codes.
Enumerator |
---|
DS75LX_OK | everything was fine
|
DS75LX_ERR_I2C | error when reading/writing I2C bus
|
Definition at line 62 of file ds75lx.h.
◆ ds75lx_resolution_t
Thermometer resolution.
Enumerator |
---|
DS75LX_RESOLUTION_9 | 9 bits resolution, 25ms max conversion time
|
DS75LX_RESOLUTION_10 | 10 bits resolution, 50ms max conversion time
|
DS75LX_RESOLUTION_11 | 11 bits resolution, 100ms max conversion time
|
DS75LX_RESOLUTION_12 | 12 bits resolution, 200ms max conversion time
|
Definition at line 36 of file ds75lx.h.
◆ ds75lx_init()
Initialize the given DS75LX device.
- Parameters
-
[out] | dev | Initialized device descriptor of DS75LX device |
[in] | params | Initialization parameters |
- Returns
- DS75LX_OK on success
-
-DS75LX_ERR_I2C if an error occurred when reading/writing
◆ ds75lx_read_temperature()
int ds75lx_read_temperature |
( |
const ds75lx_t * |
dev, |
|
|
int16_t * |
temperature |
|
) |
| |
Read temperature value from the given DS75LX device, returned in c°C.
- Parameters
-
[in] | dev | Device descriptor of DS75LX device |
[out] | temperature | Temperature in c°C |
- Returns
- DS75LX_OK on success
-
-DS75LX_ERR_I2C if an error occurred when reading/writing
◆ ds75lx_shutdown()
int ds75lx_shutdown |
( |
const ds75lx_t * |
dev | ) |
|
Shutdown the sensor.
- Parameters
-
[in] | dev | Device descriptor of DS75LX device |
- Returns
- DS75LX_OK on success
-
-DS75LX_ERR_I2C if an error occurred when reading/writing
◆ ds75lx_wakeup()
int ds75lx_wakeup |
( |
const ds75lx_t * |
dev | ) |
|
Wakeup the sensor.
- Parameters
-
[in] | dev | Device descriptor of DS75LX device |
- Returns
- DS75LX_OK on success
-
-DS75LX_ERR_I2C if an error occurred when reading/writing