sdi_nfc.h
Last updated: 17-Apr-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Â 137Â void NFC_Free_Poll_Data(pollRes *outPollRes); 138Â 143Â void NFC_Free_Poll_Data_Full(pollResFull *outPollRes); 144Â 152Â ResponseCodes NFC_PT_Cancel_Polling(void); // unsupported for instance 153Â 163Â ResponseCodes NFC_PT_Activation(NFC_CARD_TYPE cardtype, rawData* rd_activationData); 164Â 170Â ResponseCodes NFC_PT_FtechBaud(NFC_F_BAUD baud); 171Â 177Â ResponseCodes NFC_PT_TxRx(NFC_CARD_TYPE cardtype, rawData* inBuff, rawData* outBuff); // unsupported 178Â 186Â ResponseCodes NFC_Mifare_Authenticate(unsigned char blockNumber, MIFARE_KEY_TYPE keyType, rawData* Key); 187Â 196Â ResponseCodes NFC_Mifare_Read (I_MIFARE_CARD_TYPE m_cardType, unsigned int StartBlockNum, unsigned int blockAmount, rawData* out_buff); 197Â 206Â ResponseCodes NFC_Mifare_Write(I_MIFARE_CARD_TYPE m_cardType, unsigned int StartBlockNum, unsigned int blockAmount, rawData* in_buff); 207Â 214Â ResponseCodes NFC_Mifare_Increment(unsigned int blockNum, int amount); 215Â 222Â ResponseCodes NFC_Mifare_Decrement(unsigned int blockNum, int amount); 223Â 230Â ResponseCodes NFC_Mifare_Increment_Only(unsigned int blockNum, int amount); 231Â 238Â ResponseCodes NFC_Mifare_Decrement_Only(unsigned int blockNum, int amount); 239Â 245Â ResponseCodes NFC_Mifare_Transfer(unsigned int blockNum); 246Â 252Â ResponseCodes NFC_Mifare_Restore(unsigned int blockNum); 253Â 260Â ResponseCodes NFC_Felica_Exchange(felicaTxData* in_buff, felicaRxData* out_buff); 261Â 269Â ResponseCodes NFC_Felica_Polling(unsigned int pollTimeout ,felicaPolling* inData , felicaPollingOutput* outData); 270Â 278Â ResponseCodes NFC_APDU_Exchange(apduTxData* txData, apduRxData* rxData); // unsupported 279Â 286Â VasStatus NFC_Terminal_Config(rawData *input, rawData *output); 287Â 296Â VasStatus NFC_TERMINAL_ReadConfig(rawData* id, rawData *output); 297Â 304Â VasStatus NFC_VAS_ReadConfig(rawData* id, rawData *output); 305Â 313Â VasStatus NFC_VAS_Activate(rawData* id,rawData *input, rawData *output); 314Â 322Â VasStatus NFC_VAS_Cancel(void); 323Â 331Â VasStatus NFC_VAS_UpdateConfig(rawData* id, rawData *input, rawData *output); 332Â 338Â VasStatus NFC_VAS_CancelConfig(rawData* id); 339Â 349Â VasStatus NFC_VAS_PreLoad(rawData* id, rawData *input, rawData *output); 350Â 357Â VasStatus NFC_VAS_CancelPreLoad(rawData* id); 358Â 366Â VasStatus NFC_VAS_Decrypt(rawData* id, rawData *input, rawData *output); 367Â 373Â VasStatus NFC_VAS_Action(rawData* id, int action,rawData* inData, rawData* outBuff); 374Â 375Â } // namespace libsdi 376Â 377Â 378Â // By default extern "C" NFC API is supported for migration. If this is 379Â // not required or if there are conflicts set SDI_NFC_NAMEPACE_ONLY to 380Â // have only the C++ variant in name space libsdi. 381Â #ifndef SDI_NFC_NAMESPACE_ONLY // enable if applicable 382Â 383Â #define NFC_Client_Init libsdi::NFC_Client_Init 384Â #define NFC_Client_Init_CheckVer libsdi::NFC_Client_Init_CheckVer 385Â #define NFC_SerialOpen libsdi::NFC_SerialOpen 386Â #define NFC_SerialClose libsdi::NFC_SerialClose 387Â 388Â #define NFC_Ping libsdi::NFC_Ping 389Â #define NFC_Get_Version libsdi::NFC_Get_Version 390Â #define NFC_Config_Init libsdi::NFC_Config_Init 391Â #define NFC_Set_Callback_Function libsdi::NFC_Set_Callback_Function 392Â #define NFC_Callback_Test libsdi::NFC_Callback_Test 393Â 394Â #define NFC_PT_Open libsdi::NFC_PT_Open 395Â #define NFC_PT_Close libsdi::NFC_PT_Close 396Â #define NFC_PT_FieldOn libsdi::NFC_PT_FieldOn 397Â #define NFC_PT_FieldOff libsdi::NFC_PT_FieldOff 398Â #define NFC_PT_Polling libsdi::NFC_PT_Polling 399Â #define NFC_PT_PollingFull libsdi::NFC_PT_PollingFull 400Â #define NFC_Free_Poll_Data libsdi::NFC_Free_Poll_Data 401Â #define NFC_Free_Poll_Data_Full libsdi::NFC_Free_Poll_Data_Full 402Â #define NFC_PT_Cancel_Polling libsdi::NFC_PT_Cancel_Polling 403Â #define NFC_PT_Activation libsdi::NFC_PT_Activation 404Â #define NFC_PT_FtechBaud libsdi::NFC_PT_FtechBaud 405Â #define NFC_PT_TxRx libsdi::NFC_PT_TxRx 406Â 407Â #define NFC_Mifare_Authenticate libsdi::NFC_Mifare_Authenticate 408Â #define NFC_Mifare_Read libsdi::NFC_Mifare_Read 409Â #define NFC_Mifare_Write libsdi::NFC_Mifare_Write 410Â #define NFC_Mifare_Increment libsdi::NFC_Mifare_Increment 411Â #define NFC_Mifare_Decrement libsdi::NFC_Mifare_Decrement 412Â #define NFC_Mifare_Increment_Only libsdi::NFC_Mifare_Increment_Only 413Â #define NFC_Mifare_Decrement_Only libsdi::NFC_Mifare_Decrement_Only 414Â #define NFC_Mifare_Transfer libsdi::NFC_Mifare_Transfer 415Â #define NFC_Mifare_Restore libsdi::NFC_Mifare_Restore 416Â 417Â #define NFC_Felica_Exchange libsdi::NFC_Felica_Exchange 418Â #define NFC_Felica_Polling libsdi::NFC_Felica_Polling 419Â #define NFC_APDU_Exchange libsdi::NFC_APDU_Exchange 420Â 421Â #define NFC_Terminal_Config libsdi::NFC_Terminal_Config 422Â #define NFC_TERMINAL_ReadConfig libsdi::NFC_TERMINAL_ReadConfig 423Â #define NFC_VAS_ReadConfig libsdi::NFC_VAS_ReadConfig 424Â #define NFC_VAS_Activate libsdi::NFC_VAS_Activate 425Â #define NFC_VAS_Cancel libsdi::NFC_VAS_Cancel 426Â #define NFC_VAS_UpdateConfig libsdi::NFC_VAS_UpdateConfig 427Â #define NFC_VAS_CancelConfig libsdi::NFC_VAS_CancelConfig 428Â #define NFC_VAS_PreLoad libsdi::NFC_VAS_PreLoad 429Â #define NFC_VAS_CancelPreLoad libsdi::NFC_VAS_CancelPreLoad 430Â #define NFC_VAS_Decrypt libsdi::NFC_VAS_Decrypt 431Â #define NFC_VAS_Action libsdi::NFC_VAS_Action 432Â 433Â #endif // SDI_NFC_NAMESPACE_ONLY 434Â #endif // CLIENT_SDI_NFC_H_
Rate this article: