/* This API gives data to the given register and the data is written in the corresponding register address.  */
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_write_reg(u8 adr_u8, u8 *data_u8, u8 len_u8)
/* This API gives data to the given register and the data is written in the corresponding register address.  */
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_write_reg(u8 adr_u8, u8 *data_u8, u8 len_u8)
{
    BMA2x2_RETURN_FUNCTION_TYPE com_rslt = ERROR;
    if (p_bma2x2 == BMA2x2_NULL)
    {
        return E_BMA2x2_NULL_PTR;
    }
    else
    {
        com_rslt = p_bma2x2->BMA2x2_BUS_WRITE_FUNC
                   (p_bma2x2->dev_addr, adr_u8, data_u8, len_u8);
        if (p_bma2x2->power_mode_u8 != BMA2x2_MODE_NORMAL)
        {
            p_bma2x2->delay_msec(BMA2x2_INTERFACE_IDLE_TIME_DELAY);
        }
    }
    return com_rslt;
}