/* param base I2C base pointer. param handle pointer to i2c_master_handle_t structure to store the transfer state. param callback pointer to user callback function. param userData user parameter passed to the callback function.  */
void I2C_MasterTransferCreateHandle(I2C_Type *base, i2c_master_handle_t *handle, i2c_master_transfer_callback_t callback, void *userData)
/* param base I2C base pointer. param handle pointer to i2c_master_handle_t structure to store the transfer state. param callback pointer to user callback function. param userData user parameter passed to the callback function.  */
void I2C_MasterTransferCreateHandle(I2C_Type *base, i2c_master_handle_t *handle, i2c_master_transfer_callback_t callback, void *userData)
{
    assert(NULL != handle);
    uint32_t instance = I2C_GetInstance(base);
    (void)memset(handle, 0, sizeof(*handle));
    handle->completionCallback = callback;
    handle->userData           = userData;
    s_i2cHandle[instance] = handle;
    s_i2cMasterIsr = I2C_MasterTransferHandleIRQ;
    (void)EnableIRQ(s_i2cIrqs[instance]);
}