File tree 1 file changed +1
-5
lines changed
tests/validation/i2c_master
1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,6 @@ void test_api() {
254
254
}
255
255
256
256
bool device_found () {
257
- std::vector<uint8_t > found_addresses;
258
257
uint8_t err;
259
258
260
259
for (uint8_t address = 1 ; address < 127 ; ++address) {
@@ -263,16 +262,13 @@ bool device_found() {
263
262
log_d (" Address: 0x%02X, Error: %d" , address, err);
264
263
if (err == 0 ) {
265
264
log_i (" Found device at address: 0x%02X" , address);
266
- found_addresses.push_back (address);
267
265
} else if (address == DS1307_ADDR) {
268
266
log_e (" Failed to find DS1307" );
269
267
return false ;
270
268
}
271
269
}
272
270
273
- // Find DS1307_ADDR in found_addresses
274
- auto it = std::find (found_addresses.begin (), found_addresses.end (), DS1307_ADDR);
275
- return it != found_addresses.end ();
271
+ return true ;
276
272
}
277
273
278
274
void scan_bus () {
You can’t perform that action at this time.
0 commit comments