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

Method read

libraries/MAX44007/Max44007.cpp:232–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230
231
232uint8_t Max44007::read(uint8_t reg)
233{
234 _wire->beginTransmission(_address);
235 _wire->write(reg);
236 _error = _wire->endTransmission();
237 if (_error != MAX44007_OK)
238 {
239 return _data; // last value
240 }
241 if (_wire->requestFrom(_address, (uint8_t) 1) != 1)
242 {
243 _error = MAX44007_ERROR_WIRE_REQUEST;
244 return _data; // last value
245 }
246 _data = _wire->read();
247 return _data;
248}
249
250
251void Max44007::write(uint8_t reg, uint8_t value)

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected