stm32-async-1wire 3.2.0
Non-blocking 1-Wire master for STM32 with DS18B20 temperature and DS2431 EEPROM drivers
Loading...
Searching...
No Matches
DS18B20 Simultaneous Multi-Device Conversion

Convert every discovered sensor at the same time with one broadcast Convert T (Skip ROM), then read each sensor back through Match ROM. A single conversion time covers all devices: N x 750ms becomes 750ms + N x read. Each sensor's temperature is reported through ds18b20_complete() in device-table order. More...

Functions

void ds18b20_scan_start (void)
 Arm simultaneous conversion of every discovered device.
uint8_t ds18b20_device_count (void)
 Number of DS18B20 devices stored by the driver.
const uint8_t * ds18b20_device_rom (uint8_t index)
 ROM address of a discovered device.
uint8_t ds18b20_scan_index (void)
 Index of the device whose result ds18b20_complete() just reported.

Detailed Description

Convert every discovered sensor at the same time with one broadcast Convert T (Skip ROM), then read each sensor back through Match ROM. A single conversion time covers all devices: N x 750ms becomes 750ms + N x read. Each sensor's temperature is reported through ds18b20_complete() in device-table order.

The device table is filled by the non-blocking device search (ds18b20_search_*). Scan mode assumes a single resolution across all sensors (the driver writes the config broadcast) and is mutually exclusive with the single-device ds18b20_select() addressing.

Function Documentation

◆ ds18b20_device_count()

uint8_t ds18b20_device_count ( void )

Number of DS18B20 devices stored by the driver.

Returns
Count of discovered devices (valid once the search finished)

◆ ds18b20_device_rom()

const uint8_t * ds18b20_device_rom ( uint8_t index)

ROM address of a discovered device.

Parameters
[in]indexDevice index (0 .. ds18b20_device_count()-1)
Returns
Pointer to the 8-byte ROM (LSB first), or NULL for an out-of-range index
Note
The pointer is valid until the next device search.

◆ ds18b20_scan_index()

uint8_t ds18b20_scan_index ( void )

Index of the device whose result ds18b20_complete() just reported.

Returns
Current device index inside ds18b20_complete() during scan mode

◆ ds18b20_scan_start()

void ds18b20_scan_start ( void )

Arm simultaneous conversion of every discovered device.

Note
Selects scan mode without starting a round. Call ds18b20_start_measure() to request the next broadcast Convert T (Skip ROM); the driver then reads each sensor via Match ROM. Ignored mid-cycle or while a device search / resolution change owns the timer.
ds18b20_select() (single-device addressing) clears scan mode; call ds18b20_scan_start() again to resume simultaneous conversion.