MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / readBytes

Method readBytes

libraries/SHT31/SHT31.cpp:322–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320
321
322bool SHT31::readBytes(uint8_t n, uint8_t *val)
323{
324 int rv = _wire->requestFrom(_address, (uint8_t) n);
325 if (rv == n)
326 {
327 for (uint8_t i = 0; i < n; i++)
328 {
329 val[i] = _wire->read();
330 }
331 return true;
332 }
333 _error = SHT31_ERR_READBYTES;
334 return false;
335}
336
337
338// -- END OF FILE --

Callers 1

deviceTypeMethod · 0.45

Calls 1

readMethod · 0.45

Tested by

no test coverage detected