/* allocate memory for copy io_i2c_data_t, data field in io_i2c_data_t is also included  */
static int _alloc_i2c_data_arg(io_i2c_data_t *dst, io_i2c_data_t *src)
/* allocate memory for copy io_i2c_data_t, data field in io_i2c_data_t is also included  */
static int _alloc_i2c_data_arg(io_i2c_data_t *dst, io_i2c_data_t *src)
{
        return -EINVAL;
    }
    aos_ipc_copy(dst, src, sizeof(io_i2c_data_t));
    if (!dst->data || !dst->length) {
        return -EINVAL;
    }
    dst->data = malloc(dst->length);
    if (!dst->data)
        return -ENOMEM;
    return 0;
}