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

Method setRegister

libraries/GY521/GY521.cpp:424–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422
423
424uint8_t GY521::setRegister(uint8_t reg, uint8_t value)
425{
426 _wire->beginTransmission(_address);
427 _wire->write(reg);
428 _wire->write(value);
429 // no need to do anything if not connected.
430 if (_wire->endTransmission() != 0)
431 {
432 _error = GY521_ERROR_WRITE;
433 return _error;
434 }
435 return GY521_OK;
436}
437
438
439uint8_t GY521::getRegister(uint8_t reg)

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected