return 0;
}
- while (size--)
- {
- /*
- * The last byte read does not have an ACK
- * to stop communication.
- */
- int c = i2c_get(size);
- if (c == EOF)
- break;
-
- *buf++ = c;
- fd->fd.seek_pos++;
- rd_len++;
+ if (i2c_recv(buf, size))
+ {
+ fd->fd.seek_pos += size;
+ rd_len += size;
}
i2c_stop();