25 AT24CXX::poll(
const void* addr,
const void* buf,
size_t size)
33 if (m > 0)
return (
true);
37 m =
twi.
write((uint16_t) addr, (
void*) buf, size);
39 if (m > 0)
return (
true);
59 if (!poll(src))
return (
EIO);
69 uint8_t* q = (uint8_t*) dest;
70 uint8_t* p = (uint8_t*) src;
71 size_t n = WRITE_MAX - (((uint16_t) dest) & WRITE_MASK);
73 if (!poll(q, p, n))
return (
EIO);
78 n = (s < WRITE_MAX ? s : WRITE_MAX);
79 if (!poll(q, p, n))
return (
EIO);
void(* delay)(uint32_t ms)
int read(void *buf, size_t size)
int write(void *buf, size_t size)
virtual int write(void *dest, const void *src, size_t size)
void acquire(TWI::Driver *dev)
virtual int read(void *dest, const void *src, size_t size)