CuVoodoo STM32F1 firmware template
|
library for Maxim DS18B20 digital temperature sensor (using 1-Wire protocol) (API) More...
Go to the source code of this file.
Functions | |
void | sensor_ds18b20_setup (void) |
setup 1-Wire peripheral to communicate with sensors on bus | |
uint64_t | sensor_ds18b20_number (void) |
get number of DS18B20 sensors on bus More... | |
bool | sensor_ds18b20_only (void) |
verify if only DS18B20 sensors are on the bus More... | |
bool | sensor_ds18b20_list (uint64_t *code) |
send all DS18B20 slaves on the bus More... | |
bool | sensor_ds18b20_convert (uint64_t code) |
start converting (e.g. More... | |
float | sensor_ds18b20_temperature (uint64_t code) |
get converted temperature More... | |
bool | sensor_ds18b20_precision (uint64_t code, uint8_t precision) |
set conversion precision More... | |
library for Maxim DS18B20 digital temperature sensor (using 1-Wire protocol) (API)
Definition in file sensor_ds18b20.h.
bool sensor_ds18b20_convert | ( | uint64_t | code | ) |
start converting (e.g.
measuring) temperature
[in] | code | ROM code of sensor to start conversion on (0 for all, if only DS18B20 sensors are on the bus) |
Definition at line 87 of file sensor_ds18b20.c.
bool sensor_ds18b20_list | ( | uint64_t * | code | ) |
send all DS18B20 slaves on the bus
[out] | code | ROM code for sensor (0 if error occurred) |
Definition at line 78 of file sensor_ds18b20.c.
uint64_t sensor_ds18b20_number | ( | void | ) |
get number of DS18B20 sensors on bus
Definition at line 46 of file sensor_ds18b20.c.
bool sensor_ds18b20_only | ( | void | ) |
verify if only DS18B20 sensors are on the bus
Definition at line 72 of file sensor_ds18b20.c.
bool sensor_ds18b20_precision | ( | uint64_t | code, |
uint8_t | precision | ||
) |
set conversion precision
[in] | code | ROM code of sensor to start conversion on (0 for all, if only DS18B20 sensors are on the bus) |
[in] | precision | precision in bits (9-12) |
Definition at line 144 of file sensor_ds18b20.c.
float sensor_ds18b20_temperature | ( | uint64_t | code | ) |
get converted temperature
[in] | code | ROM code of sensor |
Definition at line 113 of file sensor_ds18b20.c.