|
3-phase PV router
|
The ROM search of a 1-Wire bus, on the bit primitives of the bus. More...
#include <stdint.h>

Go to the source code of this file.
Classes | |
| class | RomSearch< Bus > |
| The successive searches of a 1-Wire bus, one device each. More... | |
The ROM search of a 1-Wire bus, on the bit primitives of the bus.
The firmware builds the OneWire library without its own search (-DONEWIRE_SEARCH=0 in platformio.ini): its object would keep 11 bytes of search state for good, and the firmware addresses its sensors by the ROM codes of config.h. Calibration mode lists the sensors on the bus with this one instead, whose state lives on the stack.
The algorithm of Maxim's application note 187 ("1-Wire Search Algorithm"): each search walks the 64 bits of the ROM codes; at each bit, every device still in the search sends its bit, then its complement. 0 and 1 means a conflict: some devices have a 0 there, others a 1. The search takes the 0 branch at a new conflict, and the 1 branch at the last one taken as 0 before, so each search finds the next device.
No Arduino dependency: the native tests run it on a simulated bus.
Definition in file onewire_search.h.