5 #define USE_SOFTWARE_OWI 6 #if defined(USE_SOFTWARE_OWI) 15 #if defined(USE_SOFTWARE_TWI) 16 #include "Software/TWI.h" 18 Software::TWI<BOARD::D8,BOARD::D9>
twi;
20 Software::TWI<BOARD::D18,BOARD::D19>
twi;
23 #include "Hardware/TWI.h" 39 uint8_t rom[owi.
ROM_MAX] = { 0 };
40 int8_t last = owi.
FIRST;
44 if (last == owi.
ERROR)
break;
48 for (
size_t i = 0; i <
sizeof(rom); i++)
49 for (uint8_t mask = 0x80; mask != 0; mask >>= 1, pos++) {
50 Serial.print((rom[i] & mask) != 0);
51 if (pos == last)
Serial.print(
'*');
53 if (pos == last)
Serial.print(
'*');
55 }
while (last != owi.
LAST);
Software::Serial< BOARD::D0 > Serial
int8_t search_rom(uint8_t family, uint8_t *code, int8_t last=FIRST)
Software::OWI< BOARD::D1 > owi
Last position, search completed.
Start position of search.
static const size_t ROM_MAX