/* This API used to get the data rate of the sensor in the register 0x4C bit 3 to 5.  */
BMM050_RETURN_FUNCTION_TYPE bmm050_get_data_rate(u8 *v_data_rate_u8)
/* This API used to get the data rate of the sensor in the register 0x4C bit 3 to 5.  */
BMM050_RETURN_FUNCTION_TYPE bmm050_get_data_rate(u8 *v_data_rate_u8)
{
    BMM050_RETURN_FUNCTION_TYPE com_rslt = ERROR;
    u8 v_data_u8 = BMM050_INIT_VALUE;
    if (p_bmm050 == BMM050_NULL)
    {
        return  E_BMM050_NULL_PTR;
    }
    else
    {
        com_rslt = p_bmm050->BMM050_BUS_READ_FUNC(
                       p_bmm050->dev_addr,
                       BMM050_CONTROL_DATA_RATE__REG,
                       &v_data_u8, BMM050_GEN_READ_WRITE_DATA_LENGTH);
        *v_data_rate_u8 = BMM050_GET_BITSLICE(v_data_u8,
                                              BMM050_CONTROL_DATA_RATE);
    }
    return com_rslt;
}