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

Method readReg

libraries/PCA9635/PCA9635.cpp:303–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301
302
303uint8_t PCA9635::readReg(uint8_t reg)
304{
305 _wire->beginTransmission(_address);
306 _wire->write(reg);
307 _error = _wire->endTransmission();
308 if (_wire->requestFrom(_address, (uint8_t)1) != 1)
309 {
310 _error = PCA9635_ERROR;
311 return 0;
312 }
313 _error = PCA9635_OK;
314 _data = _wire->read();
315 return _data;
316}
317
318
319// -- END OF FILE --

Callers

nothing calls this directly

Calls 2

writeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected