sdi_nfc.h
Last updated: 02-Oct-2025
Go to the documentation of this file.
1Â #ifndef CLIENT_SDI_NFC_H_ 2Â #define CLIENT_SDI_NFC_H_ 3Â 4Â #include <stddef.h> 5Â #include <stdlib.h> 6Â #include <nfc/NFC_Interface.h> 7Â #include <nfc/NFC_Client.h> 8Â 9Â // TODO doxygen 10Â namespace libsdi 11Â { 12Â 25Â CL_STATUS NFC_Client_Init(CONNECTION_TYPE type); 26Â 31Â CL_STATUS NFC_Client_Init_CheckVer(CONNECTION_TYPE type, int maj, int min, int bld); 32Â 37Â CL_STATUS NFC_SerialOpen(void); 38Â 43Â CL_STATUS NFC_SerialClose(void); 44Â 48Â ResponseCodes NFC_Ping(rawData *output); 49Â 57Â ResponseCodes NFC_Get_Version(rawData *output); 58Â 64Â ResponseCodes NFC_Config_Init(void); 65Â 71Â ResponseCodes NFC_Set_Callback_Function(rawData* id, NfcCallbackFunction *callbackFunction ); 72Â 77Â ResponseCodes NFC_Callback_Test(void); // unsupported 78Â 86Â ResponseCodes NFC_PT_Open(); 87Â 95Â ResponseCodes NFC_PT_Close(); 96Â 104Â ResponseCodes NFC_PT_FieldOn(); 105Â 113Â ResponseCodes NFC_PT_FieldOff(); 114Â 122Â ResponseCodes NFC_PT_Polling(pollReq* inPollReq, pollRes* outPollRes); 123Â 131Â ResponseCodes NFC_PT_PollingFull(pollReq* inPollReq, pollResFull* outPollRes); 132Â 140Â ResponseCodes NFC_PT_PollingABF(pollABFParams* inPollReq, pollABFRes* outPollRes); 141Â 146Â void NFC_Free_Poll_Data(pollRes *outPollRes); 147Â 152Â void NFC_Free_Poll_Data_Full(pollResFull *outPollRes); 153Â 161Â ResponseCodes NFC_PT_Cancel_Polling(void); // unsupported for instance 162Â 172Â ResponseCodes NFC_PT_Activation(NFC_CARD_TYPE cardtype, rawData* rd_activationData); 173Â 179Â ResponseCodes NFC_PT_FtechBaud(NFC_F_BAUD baud); 180Â 186Â ResponseCodes NFC_PT_TxRx(NFC_CARD_TYPE cardtype, rawData* inBuff, rawData* outBuff); // unsupported 187Â 195Â ResponseCodes NFC_Mifare_Authenticate(unsigned char blockNumber, MIFARE_KEY_TYPE keyType, rawData* Key); 196Â 205Â ResponseCodes NFC_Mifare_Read (I_MIFARE_CARD_TYPE m_cardType, unsigned int StartBlockNum, unsigned int blockAmount, rawData* out_buff); 206Â 215Â ResponseCodes NFC_Mifare_Write(I_MIFARE_CARD_TYPE m_cardType, unsigned int StartBlockNum, unsigned int blockAmount, rawData* in_buff); 216Â 223Â ResponseCodes NFC_Mifare_Increment(unsigned int blockNum, int amount); 224Â 231Â ResponseCodes NFC_Mifare_Decrement(unsigned int blockNum, int amount); 232Â 239Â ResponseCodes NFC_Mifare_Increment_Only(unsigned int blockNum, int amount); 240Â 247Â ResponseCodes NFC_Mifare_Decrement_Only(unsigned int blockNum, int amount); 248Â 254Â ResponseCodes NFC_Mifare_Transfer(unsigned int blockNum); 255Â 261Â ResponseCodes NFC_Mifare_Restore(unsigned int blockNum); 262Â 269Â ResponseCodes NFC_Felica_Exchange(felicaTxData* in_buff, felicaRxData* out_buff); 270Â 278Â ResponseCodes NFC_Felica_Polling(unsigned int pollTimeout ,felicaPolling* inData , felicaPollingOutput* outData); 279Â 287Â ResponseCodes NFC_APDU_Exchange(apduTxData* txData, apduRxData* rxData); // unsupported 288Â 296Â ResponseCodes NFC_Target_Action(NFC_TARGET_ACTION action, unsigned int timeout, rawData* rd_inData, rawData* rd_outData); 297Â 305Â ResponseCodes NFC_Create_Ndef(NFC_NDEF_TYPES type, rawData* rd_inData, rawData* rd_outData); 306Â 313Â VasStatus NFC_Terminal_Config(rawData *input, rawData *output); 314Â 323Â VasStatus NFC_TERMINAL_ReadConfig(rawData* id, rawData *output); 324Â 331Â VasStatus NFC_VAS_ReadConfig(rawData* id, rawData *output); 332Â 340Â VasStatus NFC_VAS_Activate(rawData* id,rawData *input, rawData *output); 341Â 349Â VasStatus NFC_VAS_Cancel(void); 350Â 358Â VasStatus NFC_VAS_UpdateConfig(rawData* id, rawData *input, rawData *output); 359Â 365Â VasStatus NFC_VAS_CancelConfig(rawData* id); 366Â 376Â VasStatus NFC_VAS_PreLoad(rawData* id, rawData *input, rawData *output); 377Â 384Â VasStatus NFC_VAS_CancelPreLoad(rawData* id); 385Â 393Â VasStatus NFC_VAS_Decrypt(rawData* id, rawData *input, rawData *output); 394Â 400Â VasStatus NFC_VAS_Action(rawData* id, int action,rawData* inData, rawData* outBuff); 401Â 402Â } // namespace libsdi 403Â 404Â 405Â // By default extern "C" NFC API is supported for migration. If this is 406Â // not required or if there are conflicts set SDI_NFC_NAMEPACE_ONLY to 407Â // have only the C++ variant in name space libsdi. 408Â #ifndef SDI_NFC_NAMESPACE_ONLY // enable if applicable 409Â 410Â #define NFC_Client_Init libsdi::NFC_Client_Init 411Â #define NFC_Client_Init_CheckVer libsdi::NFC_Client_Init_CheckVer 412Â #define NFC_SerialOpen libsdi::NFC_SerialOpen 413Â #define NFC_SerialClose libsdi::NFC_SerialClose 414Â 415Â #define NFC_Ping libsdi::NFC_Ping 416Â #define NFC_Get_Version libsdi::NFC_Get_Version 417Â #define NFC_Config_Init libsdi::NFC_Config_Init 418Â #define NFC_Set_Callback_Function libsdi::NFC_Set_Callback_Function 419Â #define NFC_Callback_Test libsdi::NFC_Callback_Test 420Â 421Â #define NFC_PT_Open libsdi::NFC_PT_Open 422Â #define NFC_PT_Close libsdi::NFC_PT_Close 423Â #define NFC_PT_FieldOn libsdi::NFC_PT_FieldOn 424Â #define NFC_PT_FieldOff libsdi::NFC_PT_FieldOff 425Â #define NFC_PT_Polling libsdi::NFC_PT_Polling 426Â #define NFC_PT_PollingFull libsdi::NFC_PT_PollingFull 427Â #define NFC_Free_Poll_Data libsdi::NFC_Free_Poll_Data 428Â #define NFC_Free_Poll_Data_Full libsdi::NFC_Free_Poll_Data_Full 429Â #define NFC_PT_Cancel_Polling libsdi::NFC_PT_Cancel_Polling 430Â #define NFC_PT_Activation libsdi::NFC_PT_Activation 431Â #define NFC_PT_FtechBaud libsdi::NFC_PT_FtechBaud 432Â #define NFC_PT_TxRx libsdi::NFC_PT_TxRx 433Â 434Â #define NFC_Mifare_Authenticate libsdi::NFC_Mifare_Authenticate 435Â #define NFC_Mifare_Read libsdi::NFC_Mifare_Read 436Â #define NFC_Mifare_Write libsdi::NFC_Mifare_Write 437Â #define NFC_Mifare_Increment libsdi::NFC_Mifare_Increment 438Â #define NFC_Mifare_Decrement libsdi::NFC_Mifare_Decrement 439Â #define NFC_Mifare_Increment_Only libsdi::NFC_Mifare_Increment_Only 440Â #define NFC_Mifare_Decrement_Only libsdi::NFC_Mifare_Decrement_Only 441Â #define NFC_Mifare_Transfer libsdi::NFC_Mifare_Transfer 442Â #define NFC_Mifare_Restore libsdi::NFC_Mifare_Restore 443Â 444Â #define NFC_Felica_Exchange libsdi::NFC_Felica_Exchange 445Â #define NFC_Felica_Polling libsdi::NFC_Felica_Polling 446Â #define NFC_APDU_Exchange libsdi::NFC_APDU_Exchange 447Â #define NFC_PT_PollingABF libsdi::NFC_PT_PollingABF 448Â 449Â #define NFC_Target_Action libsdi::NFC_Target_Action 450Â #define NFC_Create_Ndef libsdi::NFC_Create_Ndef 451Â 452Â #define NFC_Terminal_Config libsdi::NFC_Terminal_Config 453Â #define NFC_TERMINAL_ReadConfig libsdi::NFC_TERMINAL_ReadConfig 454Â #define NFC_VAS_ReadConfig libsdi::NFC_VAS_ReadConfig 455Â #define NFC_VAS_Activate libsdi::NFC_VAS_Activate 456Â #define NFC_VAS_Cancel libsdi::NFC_VAS_Cancel 457Â #define NFC_VAS_UpdateConfig libsdi::NFC_VAS_UpdateConfig 458Â #define NFC_VAS_CancelConfig libsdi::NFC_VAS_CancelConfig 459Â #define NFC_VAS_PreLoad libsdi::NFC_VAS_PreLoad 460Â #define NFC_VAS_CancelPreLoad libsdi::NFC_VAS_CancelPreLoad 461Â #define NFC_VAS_Decrypt libsdi::NFC_VAS_Decrypt 462Â #define NFC_VAS_Action libsdi::NFC_VAS_Action 463Â 464Â #endif // SDI_NFC_NAMESPACE_ONLY 465Â #endif // CLIENT_SDI_NFC_H_
Rate this article: