MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / bitOn

Method bitOn

Tactility/Source/hal/i2c/I2cDevice.cpp:61–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61bool I2cDevice::bitOn(uint8_t reg, uint8_t bitmask) const {
62 uint8_t state;
63 if (readRegister8(reg, state)) {
64 state |= bitmask;
65 return writeRegister8(reg, state);
66 } else {
67 return false;
68 }
69}
70
71bool I2cDevice::bitOff(uint8_t reg, uint8_t bitmask) const {
72 uint8_t state;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected