我已经有一个应用程序可以实现 EMV 的完整流程,现在我想实现 EMV 非接触式,到目前为止我已经这样做了:
- 在编译中导入库:“%VRX_IMPORT%\lib\ctls.o”
- 添加这一行“-l CTLS.LIB = N: /CTLS.LIB”
- 在终端中加载库“libEMV_CT_Framework.vsl”和“libEMV_CTLS_Client.vsl”。
此函数出现错误:
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);
}
}