ds18b20 advance driver modules
More...
|
| uint8_t | ds18b20_scratchpad_set_alarm_threshold (ds18b20_handle_t *handle, int8_t threshold_high, int8_t threshold_low) |
| | set the alarm threshold in the scratchpad
|
| uint8_t | ds18b20_scrachpad_get_alarm_threshold (ds18b20_handle_t *handle, int8_t *threshold_high, int8_t *threshold_low) |
| | get the alarm threshold in the scratchpad
|
| uint8_t | ds18b20_alarm_convert_to_register (ds18b20_handle_t *handle, float temp, int8_t *reg) |
| | convert the alarm temperature to the register data
|
| uint8_t | ds18b20_alarm_convert_to_data (ds18b20_handle_t *handle, int8_t reg, float *temp) |
| | convert the register data to the alarm temperature
|
| uint8_t | ds18b20_search_rom (ds18b20_handle_t *handle, uint8_t(*rom)[8], uint8_t *num) |
| | search the ds18b20 rom
|
| uint8_t | ds18b20_search_alarm (ds18b20_handle_t *handle, uint8_t(*rom)[8], uint8_t *num) |
| | search the ds18b20 alarm rom
|
| uint8_t | ds18b20_get_power_mode (ds18b20_handle_t *handle, ds18b20_power_mode_t *power_mode) |
| | get the power mode
|
ds18b20 advance driver modules
◆ DS18B20_MAX_SEARCH_SIZE
| #define DS18B20_MAX_SEARCH_SIZE 64 |
ds18b20 max search size definition
max 64 devices
Definition at line 64 of file driver_ds18b20.h.
◆ ds18b20_alarm_convert_to_data()
| uint8_t ds18b20_alarm_convert_to_data |
( |
ds18b20_handle_t * | handle, |
|
|
int8_t | reg, |
|
|
float * | temp ) |
convert the register data to the alarm temperature
- Parameters
-
| [in] | *handle | pointer to a ds18b20 handle structure |
| [in] | reg | register data |
| [out] | *temp | pointer to an alarm temperature buffer |
- Returns
- status code
- 0 success
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 1278 of file driver_ds18b20.c.
◆ ds18b20_alarm_convert_to_register()
| uint8_t ds18b20_alarm_convert_to_register |
( |
ds18b20_handle_t * | handle, |
|
|
float | temp, |
|
|
int8_t * | reg ) |
convert the alarm temperature to the register data
- Parameters
-
| [in] | *handle | pointer to a ds18b20 handle structure |
| [in] | temp | alarm temperature |
| [out] | *reg | pointer to a register data |
- Returns
- status code
- 0 success
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 1251 of file driver_ds18b20.c.
◆ ds18b20_get_power_mode()
get the power mode
- Parameters
-
| [in] | *handle | pointer to a ds18b20 handle structure |
| [out] | *power_mode | pointer to a power mode buffer |
- Returns
- status code
- 0 success
- 1 get power mode failed
- Note
- none
Definition at line 1988 of file driver_ds18b20.c.
◆ ds18b20_scrachpad_get_alarm_threshold()
| uint8_t ds18b20_scrachpad_get_alarm_threshold |
( |
ds18b20_handle_t * | handle, |
|
|
int8_t * | threshold_high, |
|
|
int8_t * | threshold_low ) |
get the alarm threshold in the scratchpad
- Parameters
-
| [in] | *handle | pointer to a ds18b20 handle structure |
| [out] | *threshold_high | pointer to a high threshold buffer |
| [out] | *threshold_low | pointer to a low threshold buffer |
- Returns
- status code
- 0 success
- 1 scratchpad get alarm threshold failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 958 of file driver_ds18b20.c.
◆ ds18b20_scratchpad_set_alarm_threshold()
| uint8_t ds18b20_scratchpad_set_alarm_threshold |
( |
ds18b20_handle_t * | handle, |
|
|
int8_t | threshold_high, |
|
|
int8_t | threshold_low ) |
set the alarm threshold in the scratchpad
- Parameters
-
| [in] | *handle | pointer to a ds18b20 handle structure |
| [in] | threshold_high | high threshold |
| [in] | threshold_low | low threshold |
- Returns
- status code
- 0 success
- 1 scratchpad set alarm threshold failed
- 2 handle is NULL
- 3 handle is not initialized
- Note
- none
Definition at line 773 of file driver_ds18b20.c.
◆ ds18b20_search_alarm()
| uint8_t ds18b20_search_alarm |
( |
ds18b20_handle_t * | handle, |
|
|
uint8_t(*) | rom[8], |
|
|
uint8_t * | num ) |
search the ds18b20 alarm rom
- Parameters
-
| [in] | *handle | pointer to a ds18b20 handle structure |
| [out] | **rom | pointer to a rom array |
| [in,out] | *num | pointer to an array size buffer |
- Returns
- status code
- 0 success
- 1 search alarm failed
- Note
- none
Definition at line 1965 of file driver_ds18b20.c.
◆ ds18b20_search_rom()
| uint8_t ds18b20_search_rom |
( |
ds18b20_handle_t * | handle, |
|
|
uint8_t(*) | rom[8], |
|
|
uint8_t * | num ) |
search the ds18b20 rom
- Parameters
-
| [in] | *handle | pointer to a ds18b20 handle structure |
| [out] | **rom | pointer to a rom array |
| [in,out] | *num | pointer to an array size buffer |
- Returns
- status code
- 0 success
- 1 search rom failed
- Note
- none
Definition at line 1941 of file driver_ds18b20.c.