Maxim Search ROM (0xF0) state machine, driven from the main loop like the measurement state machine. It filters by family code, validates the CRC and reports each found DS18B20 via a callback. When the search finishes the driver stays idle until the application requests the next operation (ds18b20_start_measure(), a new search or a command).
More...
|
| typedef uint8_t(* | ds18b20_search_sink_t) (const uint8_t *rom) |
| | Callback invoked for every DS18B20 found by the search.
|
Maxim Search ROM (0xF0) state machine, driven from the main loop like the measurement state machine. It filters by family code, validates the CRC and reports each found DS18B20 via a callback. When the search finishes the driver stays idle until the application requests the next operation (ds18b20_start_measure(), a new search or a command).
◆ ds18b20_search_sink_t
| typedef uint8_t(* ds18b20_search_sink_t) (const uint8_t *rom) |
Callback invoked for every DS18B20 found by the search.
- Parameters
-
| [in] | rom | Pointer to the 8-byte ROM address (LSB first) |
- Returns
- 0 to continue the search, non-zero to stop
- Note
- The pointer is only valid for the duration of the callback.
◆ ds18b20_search_count()
| uint8_t ds18b20_search_count |
( |
void | | ) |
|
Number of DS18B20 devices found (valid once the search finished).
- Returns
- Count of found devices
◆ ds18b20_search_poll()
| uint8_t ds18b20_search_poll |
( |
void | | ) |
|
Advance the non-blocking device search by one hardware operation.
- Returns
- 1 when the search is finished, 0 while still running
◆ ds18b20_search_start()
Start a non-blocking device search.
- Parameters
-
| [in] | sink | Callback invoked per found DS18B20 device (may be NULL) |
| [in] | max_devices | Maximum number of devices to report (0 aborts) |