54#define DS18_ERROR (-1)
Low-level GPIO peripheral driver interface definitions.
int ds18_read(const ds18_t *dev, int16_t *temperature)
Reads the scratchpad for the last conversion.
int ds18_get_temperature(const ds18_t *dev, int16_t *temperature)
convenience function for triggering a conversion and reading the value
int ds18_trigger(const ds18_t *dev)
Triggers a temperature conversion.
int ds18_init(ds18_t *dev, const ds18_params_t *params)
Initialize a ds18 device.
gpio_mode_t
Available pin modes.
Device initialization parameters.
gpio_mode_t in_mode
Pin input mode (usually deduced from output mode)
gpio_t pin
Pin the sensor is connected to.
gpio_mode_t out_mode
Pin output mode.
Device descriptor for a ds18 device.
ds18_params_t params
Device Parameters.