示例#1
0
// ASTC register
void AK8975_setSelfTest(bool enabled) {
    I2C_writeBit(devAddr, AK8975_RA_ASTC, AK8975_ASTC_SELF_BIT, enabled);
}
示例#2
0
void setSleepEnabled(unsigned char enabled)
{
    I2C_writeBit(devAddr, MPU6050_RA_PWR_MGMT_1, MPU6050_PWR1_SLEEP_BIT, enabled);
}
示例#3
0
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);
}
示例#4
0
void setDMPEnabled(unsigned char enabled)
{
    I2C_writeBit(devAddr, MPU6050_RA_USER_CTRL, MPU6050_USERCTRL_DMP_EN_BIT, enabled);
}
示例#5
0
void resetDMP()
{
    I2C_writeBit(devAddr, MPU6050_RA_USER_CTRL, MPU6050_USERCTRL_DMP_RESET_BIT, true);
}
示例#6
0
void resetFIFO()
{
    I2C_writeBit(devAddr, MPU6050_RA_USER_CTRL, MPU6050_USERCTRL_FIFO_RESET_BIT, true);
}
示例#7
0
void resetI2CMaster()
{
    I2C_writeBit(devAddr, MPU6050_RA_USER_CTRL, MPU6050_USERCTRL_I2C_MST_RESET_BIT, true);
}
示例#8
0
void setI2CMasterModeEnabled(unsigned char enabled)
{
    I2C_writeBit(devAddr, MPU6050_RA_USER_CTRL, MPU6050_USERCTRL_I2C_MST_EN_BIT, enabled);
}
示例#9
0
void switchSPIEnabled(char enabled)
{
    I2C_writeBit(devAddr, MPU6050_RA_USER_CTRL, MPU6050_USERCTRL_I2C_IF_DIS_BIT, enabled);
}
示例#10
0
void setOTPBankValid(unsigned char enabled)
{
    I2C_writeBit(devAddr, MPU6050_RA_XG_OFFS_TC, MPU6050_TC_OTP_BNK_VLD_BIT, enabled);
}