// ASTC register void AK8975_setSelfTest(bool enabled) { I2C_writeBit(devAddr, AK8975_RA_ASTC, AK8975_ASTC_SELF_BIT, enabled); }
void setSleepEnabled(unsigned char enabled) { I2C_writeBit(devAddr, MPU6050_RA_PWR_MGMT_1, MPU6050_PWR1_SLEEP_BIT, enabled); }
void mpu_reset() { //todo consider writing byte 0x80 without reading the register before since it is reset anyways I2C_writeBit(devAddr, MPU6050_RA_PWR_MGMT_1, MPU6050_PWR1_DEVICE_RESET_BIT, true); }
void setDMPEnabled(unsigned char enabled) { I2C_writeBit(devAddr, MPU6050_RA_USER_CTRL, MPU6050_USERCTRL_DMP_EN_BIT, enabled); }
void resetDMP() { I2C_writeBit(devAddr, MPU6050_RA_USER_CTRL, MPU6050_USERCTRL_DMP_RESET_BIT, true); }
void resetFIFO() { I2C_writeBit(devAddr, MPU6050_RA_USER_CTRL, MPU6050_USERCTRL_FIFO_RESET_BIT, true); }
void resetI2CMaster() { I2C_writeBit(devAddr, MPU6050_RA_USER_CTRL, MPU6050_USERCTRL_I2C_MST_RESET_BIT, true); }
void setI2CMasterModeEnabled(unsigned char enabled) { I2C_writeBit(devAddr, MPU6050_RA_USER_CTRL, MPU6050_USERCTRL_I2C_MST_EN_BIT, enabled); }
void switchSPIEnabled(char enabled) { I2C_writeBit(devAddr, MPU6050_RA_USER_CTRL, MPU6050_USERCTRL_I2C_IF_DIS_BIT, enabled); }
void setOTPBankValid(unsigned char enabled) { I2C_writeBit(devAddr, MPU6050_RA_XG_OFFS_TC, MPU6050_TC_OTP_BNK_VLD_BIT, enabled); }