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.
| 323 | // You do not need to do it for the first search, though you could. |
| 324 | // |
| 325 | void 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. |
no outgoing calls
no test coverage detected