/* Finish up a transmit by completing the process of sending data and disabling the interrupt.  */
static void smartcard_emvsim_CompleteSendData(EMVSIM_Type *base, smartcard_context_t *context)
/* Finish up a transmit by completing the process of sending data and disabling the interrupt.  */
static void smartcard_emvsim_CompleteSendData(EMVSIM_Type *base, smartcard_context_t *context)
{
    assert((NULL != context));
    base->INT_MASK |= (EMVSIM_INT_MASK_ETC_IM_MASK | EMVSIM_INT_MASK_TDT_IM_MASK);
    base->CTRL &= ~EMVSIM_CTRL_XMT_EN_MASK;
    base->RX_STATUS = EMVSIM_RX_STATUS_RX_DATA_MASK;
    base->CTRL |= EMVSIM_CTRL_RCV_EN_MASK;
    context->xIsBusy       = false;
    context->transferState = kSMARTCARD_IdleState;
    context->xSize = 0u;
    if (NULL != context->transferCallback)
    {
        context->transferCallback(context, context->transferCallbackParam);
    }
}