|
stm32-async-1wire 3.2.0
Non-blocking 1-Wire master for STM32 with DS18B20 temperature and DS2431 EEPROM drivers
|
Change the temperature conversion resolution (9..12 bit) between measurement cycles. The sensor answers Convert T (0x44) after 93.75ms (9 bit) / 187.5ms (10 bit) / 375ms (11 bit) / 750ms (12 bit); this driver waits exactly as long as the configured resolution requires and parks until the application starts the next measurement cycle. More...
Functions | |
| void | ds18b20_set_resolution (uint8_t bits) |
| Start a non-blocking resolution change. | |
| uint8_t | ds18b20_set_resolution_poll (void) |
| Advance the non-blocking resolution change by one hardware operation. | |
| uint8_t | ds18b20_get_resolution (void) |
| Current conversion resolution in bits. | |
Change the temperature conversion resolution (9..12 bit) between measurement cycles. The sensor answers Convert T (0x44) after 93.75ms (9 bit) / 187.5ms (10 bit) / 375ms (11 bit) / 750ms (12 bit); this driver waits exactly as long as the configured resolution requires and parks until the application starts the next measurement cycle.
The configuration is written to the volatile scratchpad (Write Scratchpad 0x4E): it takes effect immediately and is not persisted to the EEPROM. Alarm trigger registers TH/TL are reset to 0x00 (disabled).
| uint8_t ds18b20_get_resolution | ( | void | ) |
Current conversion resolution in bits.
| void ds18b20_set_resolution | ( | uint8_t | bits | ) |
Start a non-blocking resolution change.
| [in] | bits | New resolution in bits: DS18B20_RES_MIN (9) .. DS18B20_RES_MAX (12) |
| uint8_t ds18b20_set_resolution_poll | ( | void | ) |
Advance the non-blocking resolution change by one hardware operation.