I would like to perform 5 consecutive reads to a slave devices and check if
those 5 read results are all equal. If not the w1_read_state function should be called
again till all the 5 read results are equal. What is the best solution? I started with some code like this…
static w1_slave slave;
static int tmp[5];
unsigned int i;
for (i=0; i < sizeof tmp / sizeof char; i++)
w1_read_state(&slave, &tmp[i]);
...
...
1 Answer