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

Method setMode

libraries/INA226/INA226.cpp:280–288  ·  view source on GitHub ↗

/////////////////////////////////////////////////// operating mode

Source from the content-addressed store, hash-verified

278// operating mode
279//
280bool INA226::setMode(uint8_t mode)
281{
282 if (mode > 7) return false;
283 uint16_t config = _readRegister(INA226_CONFIGURATION);
284 config &= ~INA226_CONF_MODE_MASK;
285 config |= mode;
286 _writeRegister(INA226_CONFIGURATION, config);
287 return true;
288}
289
290
291uint8_t INA226::getMode()

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36