![]() |
LibDriver DS18B20
|
ds18b20 base driver modules More...
Data Structures | |
| struct | ds18b20_handle_s |
| ds18b20 handle structure definition More... | |
| struct | ds18b20_info_s |
| ds18b20 info structure definition More... | |
Typedefs | |
| typedef struct ds18b20_handle_s | ds18b20_handle_t |
| ds18b20 handle structure definition | |
| typedef struct ds18b20_info_s | ds18b20_info_t |
| ds18b20 info structure definition | |
Enumerations | |
| enum | ds18b20_mode_t { DS18B20_MODE_SKIP_ROM = 0x00 , DS18B20_MODE_MATCH_ROM = 0x01 } |
| ds18b20 mode enumeration definition More... | |
| enum | ds18b20_power_mode_t { DS18B20_POWER_MODE_PARASITE = 0x00 , DS18B20_POWER_MODE_EXTERNALLY = 0x01 } |
| ds18b20 power mode enumeration definition More... | |
| enum | ds18b20_resolution_t { DS18B20_RESOLUTION_9BIT = 0x00 , DS18B20_RESOLUTION_10BIT = 0x01 , DS18B20_RESOLUTION_11BIT = 0x02 , DS18B20_RESOLUTION_12BIT = 0x03 } |
| ds18b20 resolution enumeration definition More... | |
Functions | |
| uint8_t | ds18b20_info (ds18b20_info_t *info) |
| get chip's information | |
| uint8_t | ds18b20_init (ds18b20_handle_t *handle) |
| initialize the chip | |
| uint8_t | ds18b20_deinit (ds18b20_handle_t *handle) |
| close the chip | |
| uint8_t | ds18b20_read (ds18b20_handle_t *handle, int16_t *raw, float *temp) |
| read data from the chip | |
| uint8_t | ds18b20_set_mode (ds18b20_handle_t *handle, ds18b20_mode_t mode) |
| set the chip mode | |
| uint8_t | ds18b20_get_mode (ds18b20_handle_t *handle, ds18b20_mode_t *mode) |
| get the chip mode | |
| uint8_t | ds18b20_set_rom (ds18b20_handle_t *handle, uint8_t rom[8]) |
| set the handle rom | |
| uint8_t | ds18b20_get_rom (ds18b20_handle_t *handle, uint8_t rom[8]) |
| get the chip rom | |
| uint8_t | ds18b20_scratchpad_set_resolution (ds18b20_handle_t *handle, ds18b20_resolution_t resolution) |
| set the resolution in the scratchpad | |
| uint8_t | ds18b20_scratchpad_get_resolution (ds18b20_handle_t *handle, ds18b20_resolution_t *resolution) |
| get the resolution in the scratchpad | |
| uint8_t | ds18b20_copy_scratchpad_to_eeprom (ds18b20_handle_t *handle) |
| copy the scratchpad content to the eeprom | |
| uint8_t | ds18b20_copy_eeprom_to_scratchpad (ds18b20_handle_t *handle) |
| copy the eeprom content to the scratchpad | |
ds18b20 base driver modules
| typedef struct ds18b20_handle_s ds18b20_handle_t |
ds18b20 handle structure definition
| typedef struct ds18b20_info_s ds18b20_info_t |
ds18b20 info structure definition
| enum ds18b20_mode_t |
ds18b20 mode enumeration definition
| Enumerator | |
|---|---|
| DS18B20_MODE_SKIP_ROM | skip rom mode |
| DS18B20_MODE_MATCH_ROM | match rom mode |
Definition at line 79 of file driver_ds18b20.h.
| enum ds18b20_power_mode_t |
ds18b20 power mode enumeration definition
| Enumerator | |
|---|---|
| DS18B20_POWER_MODE_PARASITE | parasite power mode |
| DS18B20_POWER_MODE_EXTERNALLY | externally power mode |
Definition at line 88 of file driver_ds18b20.h.
| enum ds18b20_resolution_t |
ds18b20 resolution enumeration definition
| Enumerator | |
|---|---|
| DS18B20_RESOLUTION_9BIT | 9 bit resolution |
| DS18B20_RESOLUTION_10BIT | 10 bit resolution |
| DS18B20_RESOLUTION_11BIT | 11 bit resolution |
| DS18B20_RESOLUTION_12BIT | 12 bit resolution |
Definition at line 97 of file driver_ds18b20.h.
| uint8_t ds18b20_copy_eeprom_to_scratchpad | ( | ds18b20_handle_t * | handle | ) |
copy the eeprom content to the scratchpad
| [in] | *handle | pointer to a ds18b20 handle structure |
Definition at line 1164 of file driver_ds18b20.c.
| uint8_t ds18b20_copy_scratchpad_to_eeprom | ( | ds18b20_handle_t * | handle | ) |
copy the scratchpad content to the eeprom
| [in] | *handle | pointer to a ds18b20 handle structure |
Definition at line 1078 of file driver_ds18b20.c.
| uint8_t ds18b20_deinit | ( | ds18b20_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a ds18b20 handle structure |
Definition at line 1392 of file driver_ds18b20.c.
| uint8_t ds18b20_get_mode | ( | ds18b20_handle_t * | handle, |
| ds18b20_mode_t * | mode ) |
get the chip mode
| [in] | *handle | pointer to a ds18b20 handle structure |
| [out] | *mode | pointer to a chip mode buffer |
Definition at line 368 of file driver_ds18b20.c.
| uint8_t ds18b20_get_rom | ( | ds18b20_handle_t * | handle, |
| uint8_t | rom[8] ) |
get the chip rom
| [in] | *handle | pointer to a ds18b20 handle structure |
| [out] | *rom | pointer to a rom buffer |
Definition at line 420 of file driver_ds18b20.c.
| uint8_t ds18b20_info | ( | ds18b20_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a ds18b20 info structure |
Definition at line 2084 of file driver_ds18b20.c.
| uint8_t ds18b20_init | ( | ds18b20_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a ds18b20 handle structure |
Definition at line 1305 of file driver_ds18b20.c.
| uint8_t ds18b20_read | ( | ds18b20_handle_t * | handle, |
| int16_t * | raw, | ||
| float * | temp ) |
read data from the chip
| [in] | *handle | pointer to a ds18b20 handle structure |
| [out] | *raw | pointer to a raw adc buffer |
| [out] | *temp | pointer to a converted temperature buffer |
Definition at line 1426 of file driver_ds18b20.c.
| uint8_t ds18b20_scratchpad_get_resolution | ( | ds18b20_handle_t * | handle, |
| ds18b20_resolution_t * | resolution ) |
get the resolution in the scratchpad
| [in] | *handle | pointer to a ds18b20 handle structure |
| [out] | *resolution | pointer to a chip resolution buffer |
Definition at line 653 of file driver_ds18b20.c.
| uint8_t ds18b20_scratchpad_set_resolution | ( | ds18b20_handle_t * | handle, |
| ds18b20_resolution_t | resolution ) |
set the resolution in the scratchpad
| [in] | *handle | pointer to a ds18b20 handle structure |
| [in] | resolution | chip resolution |
Definition at line 469 of file driver_ds18b20.c.
| uint8_t ds18b20_set_mode | ( | ds18b20_handle_t * | handle, |
| ds18b20_mode_t | mode ) |
set the chip mode
| [in] | *handle | pointer to a ds18b20 handle structure |
| [in] | mode | chip mode |
Definition at line 342 of file driver_ds18b20.c.
| uint8_t ds18b20_set_rom | ( | ds18b20_handle_t * | handle, |
| uint8_t | rom[8] ) |
set the handle rom
| [in] | *handle | pointer to a ds18b20 handle structure |
| [in] | *rom | pointer to a rom buffer |
Definition at line 394 of file driver_ds18b20.c.