/* This API is used to get the interrupt enable of flat hold time(flat_hold_time) in the register 0x2F bit 4 and 5.  */
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_flat_hold_time(u8 *flat_hold_time_u8)
/* This API is used to get the interrupt enable of flat hold time(flat_hold_time) in the register 0x2F bit 4 and 5.  */
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_get_flat_hold_time(u8 *flat_hold_time_u8)
{
    u8 data_u8 = BMA2x2_INIT_VALUE;
    BMA2x2_RETURN_FUNCTION_TYPE com_rslt = ERROR;
    if (p_bma2x2 == BMA2x2_NULL)
    {
        return E_BMA2x2_NULL_PTR;
    }
    else
    {
        com_rslt = p_bma2x2->BMA2x2_BUS_READ_FUNC
                   (p_bma2x2->dev_addr,
                    BMA2x2_FLAT_HOLD_TIME_REG,
                    &data_u8, BMA2x2_GEN_READ_WRITE_LENGTH);
        *flat_hold_time_u8 = BMA2x2_GET_BITSLICE
                             (data_u8, BMA2x2_FLAT_HOLD_TIME);
    }
    return com_rslt;
}