我已经有一个完整的EMV应用程序,现在我想实现EMV Contactless,到目前为止,我已经做到了:
此函数中发生错误:
EMV_CTLS_Init_Framework (64, (EMV_CT_CALLBACK_FnT) FrameworkEMVCallbackFunction, (void *) NULL, options, & Result);
呼叫后:
EMV_CT_Init_Framework (64, (EMV_CT_CALLBACK_FnT) FrameworkEMVCallbackFunction, (void *) NULL, options);
终端有时会保持黑色,有时会重新启动。
这是完整的EMV初始化功能代码:
unsigned long initializeApplication(unsigned char virtualTerminal, unsigned char EnableTRACE, int autoRetap)
{
EMV_ADK_INFO erg;
unsigned long virtTerm;
unsigned long Result;
unsigned long options;
virtTerm = ((virtualTerminal << 24) & 0xFF000000);
initializeEmvParameters();
// Init Framework
options = virtTerm | EMV_CT_INIT_OPT_CONFIG_MODE | EMV_CT_INIT_OPT_L1_DUMP;
if (EnableTRACE)
options |= EMV_CT_INIT_OPT_TRACE | EMV_CT_INIT_OPT_TRACE_CLT;
erg = EMV_CT_Init_Framework(64, (EMV_CT_CALLBACK_FnT)FrameworkEMVCallbackFunction, (void*)NULL, options);
if(erg != EMV_ADK_OK)
{
APP_TRACE("Init EMV framework returned %d", erg);
return(EMV_INIT_ERR_INIT_KERNEL);
}
options = virtTerm | EMV_CTLS_INIT_OPT_CONFIG_MODE | EMV_CTLS_INIT_OPT_L1_DUMP | autoRetap;
if (EnableTRACE)
options |= EMV_CTLS_INIT_OPT_TRACE | EMV_CTLS_INIT_OPT_TRACE_CLT; /*|EMV_CTLS_LED_CALLBACK_EXT*/
erg = EMV_CTLS_Init_Framework(64, (EMV_CT_CALLBACK_FnT)FrameworkEMVCallbackFunction, (void*)NULL, options, &Result );
if(erg != EMV_ADK_OK)
{
APP_TRACE("Init EMV framework (CTLS) returned %d", erg);
return(EMV_INIT_ERR_CTLS_ONLY);
}
}