Driver for Maxim Integrated DS1822 and DS18B20 temperature sensors. More...

Detailed Description

Driver for Maxim Integrated DS1822 and DS18B20 temperature sensors.

Author
Frits Kuipers frits.nosp@m..kui.nosp@m.pers@.nosp@m.gmai.nosp@m.l.com

Definition in file ds18.h.

#include "periph/gpio.h"
+ Include dependency graph for ds18.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ds18_params_t
 Device initialization parameters. More...
 
struct  ds18_t
 Device descriptor for a ds18 device. More...
 

Functions

int ds18_init (ds18_t *dev, const ds18_params_t *params)
 Initialize a ds18 device. More...
 
int ds18_trigger (const ds18_t *dev)
 Triggers a temperature conversion. More...
 
int ds18_read (const ds18_t *dev, int16_t *temperature)
 Reads the scratchpad for the last conversion. More...
 
int ds18_get_temperature (const ds18_t *dev, int16_t *temperature)
 convenience function for triggering a conversion and reading the value More...
 

ds18 status return codes

#define DS18_OK   (0)
 
#define DS18_ERROR   (-1)