MCPcopy Create free account
hub / github.com/DanielOgorchock/ST_Anything / reset_search

Method reset_search

Arduino/libraries/OneWire/OneWire.cpp:325–335  ·  view source on GitHub ↗

You need to use this function to start a search again from the beginning. You do not need to do it for the first search, though you could.

Source from the content-addressed store, hash-verified

323// You do not need to do it for the first search, though you could.
324//
325void OneWire::reset_search()
326{
327 // reset the search state
328 LastDiscrepancy = 0;
329 LastDeviceFlag = FALSE;
330 LastFamilyDiscrepancy = 0;
331 for(int i = 7; ; i--) {
332 ROM_NO[i] = 0;
333 if ( i == 0) break;
334 }
335}
336
337// Setup the search to find the device type 'family_code' on the next call
338// to search(*newAddr) if it is present.

Callers 2

beginMethod · 0.80
getAddressMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected