Lines Matching refs:reg

149   uint8_t reg = m_i2c.readReg(REG_REG2);  in setHPCF()  local
151 reg &= ~(REG2_HPCF0 | REG2_HPCF1); in setHPCF()
152 reg |= (val << REG2_HPCF_SHIFT); in setHPCF()
154 if (m_i2c.writeReg(REG_REG2, reg)) in setHPCF()
166 uint8_t reg = m_i2c.readReg(REG_REG2); in setHPM() local
168 reg &= ~(REG2_HPM0 | REG2_HPM1); in setHPM()
169 reg |= (val << REG2_HPM_SHIFT); in setHPM()
171 if (m_i2c.writeReg(REG_REG2, reg)) in setHPM()
183 uint8_t reg = m_i2c.readReg(REG_REG2); in boot() local
185 reg |= REG2_BOOT; in boot()
187 if (m_i2c.writeReg(REG_REG2, reg)) in boot()
196 reg = m_i2c.readReg(REG_REG2); in boot()
198 } while (reg & REG2_BOOT); in boot()
205 uint8_t reg = m_i2c.readReg(REG_REG2); in enableHPF1() local
208 reg |= REG2_HPEN1; in enableHPF1()
210 reg &= ~REG2_HPEN1; in enableHPF1()
212 if (m_i2c.writeReg(REG_REG2, reg)) in enableHPF1()
224 uint8_t reg = m_i2c.readReg(REG_REG2); in enableHPF2() local
227 reg |= REG2_HPEN2; in enableHPF2()
229 reg &= ~REG2_HPEN2; in enableHPF2()
231 if (m_i2c.writeReg(REG_REG2, reg)) in enableHPF2()
243 uint8_t reg = m_i2c.readReg(REG_REG2); in enableFDS() local
246 reg |= REG2_FDS; in enableFDS()
248 reg &= ~REG2_FDS; in enableFDS()
250 if (m_i2c.writeReg(REG_REG2, reg)) in enableFDS()
262 uint8_t reg = m_i2c.readReg(REG_REG3); in setInterruptActiveLow() local
265 reg |= REG3_IHL; in setInterruptActiveLow()
267 reg &= ~REG3_IHL; in setInterruptActiveLow()
269 if (m_i2c.writeReg(REG_REG3, reg)) in setInterruptActiveLow()
281 uint8_t reg = m_i2c.readReg(REG_REG3); in setInterruptOpenDrain() local
284 reg |= REG3_PP_OD; in setInterruptOpenDrain()
286 reg &= ~REG3_PP_OD; in setInterruptOpenDrain()
288 if (m_i2c.writeReg(REG_REG3, reg)) in setInterruptOpenDrain()
300 uint8_t reg = m_i2c.readReg(REG_REG3); in setInterrupt1Latch() local
303 reg |= REG3_LIR1; in setInterrupt1Latch()
305 reg &= ~REG3_LIR1; in setInterrupt1Latch()
307 if (m_i2c.writeReg(REG_REG3, reg)) in setInterrupt1Latch()
319 uint8_t reg = m_i2c.readReg(REG_REG3); in setInterrupt2Latch() local
322 reg |= REG3_LIR2; in setInterrupt2Latch()
324 reg &= ~REG3_LIR2; in setInterrupt2Latch()
326 if (m_i2c.writeReg(REG_REG3, reg)) in setInterrupt2Latch()
338 uint8_t reg = m_i2c.readReg(REG_REG3); in setInterrupt1PadConfig() local
340 reg &= ~(REG3_I1_CFG0 | REG3_I1_CFG1); in setInterrupt1PadConfig()
341 reg |= (val << REG3_I1_CFG_SHIFT); in setInterrupt1PadConfig()
343 if (m_i2c.writeReg(REG_REG3, reg)) in setInterrupt1PadConfig()
355 uint8_t reg = m_i2c.readReg(REG_REG3); in setInterrupt2PadConfig() local
357 reg &= ~(REG3_I2_CFG0 | REG3_I2_CFG1); in setInterrupt2PadConfig()
358 reg |= (val << REG3_I2_CFG_SHIFT); in setInterrupt2PadConfig()
360 if (m_i2c.writeReg(REG_REG3, reg)) in setInterrupt2PadConfig()
373 uint8_t reg = m_i2c.readReg(REG_REG4); in enableBDU() local
376 reg |= REG4_BDU; in enableBDU()
378 reg &= ~REG4_BDU; in enableBDU()
380 if (m_i2c.writeReg(REG_REG4, reg)) in enableBDU()
392 uint8_t reg = m_i2c.readReg(REG_REG4); in enableBLE() local
395 reg |= REG4_BLE; in enableBLE()
397 reg &= ~REG4_BLE; in enableBLE()
399 if (m_i2c.writeReg(REG_REG4, reg)) in enableBLE()
411 uint8_t reg = m_i2c.readReg(REG_REG5); in enableSleepToWake() local
414 reg |= (REG5_TURNON0 | REG5_TURNON1); in enableSleepToWake()
416 reg &= ~(REG5_TURNON0 | REG5_TURNON1); in enableSleepToWake()
418 if (m_i2c.writeReg(REG_REG5, reg)) in enableSleepToWake()
435 uint8_t reg = m_i2c.readReg(REG_INT1_CFG); in setInterrupt1Config() local
438 reg = (val & ~0x40); in setInterrupt1Config()
440 if (m_i2c.writeReg(REG_INT1_CFG, reg)) in setInterrupt1Config()
452 uint8_t reg = m_i2c.readReg(REG_INT1_SRC); in setInterrupt1Source() local
455 reg = (val & ~0x80); in setInterrupt1Source()
457 if (m_i2c.writeReg(REG_INT1_SRC, reg)) in setInterrupt1Source()
493 uint8_t reg = m_i2c.readReg(REG_INT2_CFG); in setInterrupt2Config() local
496 reg = (val & ~0x40); in setInterrupt2Config()
498 if (m_i2c.writeReg(REG_INT2_CFG, reg)) in setInterrupt2Config()
510 uint8_t reg = m_i2c.readReg(REG_INT2_SRC); in setInterrupt2Source() local
513 reg = (val & ~0x80); in setInterrupt2Source()
515 if (m_i2c.writeReg(REG_INT2_SRC, reg)) in setInterrupt2Source()