bmi2_ois.c
/*!
 * @brief This API gets the status of accelerometer/gyroscope enable for data
 * read through OIS interface.
 */
@brief This API gets the status of accelerometer/gyroscope enable for data
read through OIS interface.
@brief This API gets the status of accelerometer / gyroscope enable for data read through OIS interface .
int8_t bmi2_ois_get_config(struct bmi2_ois_dev *ois_dev)
{
    int8_t rslt;
    uint8_t reg_data = 0;
    rslt = null_ptr_check(ois_dev);
    if (rslt == BMI2_OIS_OK)
    {
        rslt = bmi2_ois_get_regs(BMI2_OIS_CONFIG_ADDR, &reg_data, 1, ois_dev);
        if (rslt == BMI2_OIS_OK)
        {
            ois_dev->lp_filter_en = BMI2_GET_BIT_POS0(reg_data, BMI2_OIS_LP_FILTER_EN);
            ois_dev->lp_filter_config = BMI2_OIS_GET_BITS(reg_data, BMI2_OIS_LP_FILTER_CONFIG);
            ois_dev->lp_filter_mute = BMI2_OIS_GET_BITS(reg_data, BMI2_OIS_LP_FILTER_MUTE);
            ois_dev->acc_en = BMI2_OIS_GET_BITS(reg_data, BMI2_OIS_ACC_EN);
            ois_dev->gyr_en = BMI2_OIS_GET_BITS(reg_data, BMI2_OIS_GYR_EN);
        }
    }
    return rslt;
}
int8_t bmi2_ois_get_config ( struct bmi2_ois_dev * ois_dev ) { int8_t rslt ; uint8_t reg_data = 0 ; rslt = null_ptr_check ( ois_dev ) ; if ( rslt == BMI2_OIS_OK ) { rslt = bmi2_ois_get_regs ( BMI2_OIS_CONFIG_ADDR , & reg_data , 1 , ois_dev ) ; if ( rslt == BMI2_OIS_OK ) { ois_dev -> lp_filter_en = BMI2_GET_BIT_POS0 ( reg_data , BMI2_OIS_LP_FILTER_EN ) ; ois_dev -> lp_filter_config = BMI2_OIS_GET_BITS ( reg_data , BMI2_OIS_LP_FILTER_CONFIG ) ; ois_dev -> lp_filter_mute = BMI2_OIS_GET_BITS ( reg_data , BMI2_OIS_LP_FILTER_MUTE ) ; ois_dev -> acc_en = BMI2_OIS_GET_BITS ( reg_data , BMI2_OIS_ACC_EN ) ; ois_dev -> gyr_en = BMI2_OIS_GET_BITS ( reg_data , BMI2_OIS_GYR_EN ) ; } } return rslt ; }
@brief This API gets the status of accelerometer/gyroscope enable for data
 read through OIS interface.
@brief This API gets the status of accelerometer / gyroscope enable for data read through OIS interface .
/* Variable to define error */ /* Variable to store data */ /* Null-pointer check */ /* Get the status of Low pass filter enable */ /* Get the status of Low pass filter cut-off frequency */ /* Get the status of Low pass filter mute */ /* Get the status of accelerometer enable */ /* Get the status of gyroscope enable */