/* This API is used to get Water Mark Level in the register 0x3D bit from 0 to 6.  */
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_wm_level(u8 *v_fifo_wm_level_u8)
/* This API is used to get Water Mark Level in the register 0x3D bit from 0 to 6.  */
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_wm_level(u8 *v_fifo_wm_level_u8)
{
    BMG160_RETURN_FUNCTION_TYPE comres = ERROR;
    u8 v_data_u8 = BMG160_INIT_VALUE;
    if (p_bmg160 == BMG160_NULL)
    {
        return  E_BMG160_NULL_PTR;
    }
    else
    {
        comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bmg160->dev_addr,
                                                BMG160_FIFO_CGF1_ADDR_WML__REG,
                                                &v_data_u8, BMG160_GEN_READ_WRITE_DATA_LENGTH);
        *v_fifo_wm_level_u8 = BMG160_GET_BITSLICE(v_data_u8,
                              BMG160_FIFO_CGF1_ADDR_WML);
    }
    return comres;
}