2 * Copyright (C) 2010 NXP Semiconductors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 *\brief Contains FRI1.1 API details.
21 * $Workfile:: phLibNfc_1.1.h $
25 * $Aliases: NFC_FRI1.1_WK1014_SDK,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1019_SDK,NFC_FRI1.1_WK1024_SDK $
26 *\defgroup grp_lib_nfc LIBNFC Component
28 /* \page LibNfc_release_label FRI1.1 API Release Label
29 * $Aliases: NFC_FRI1.1_WK1014_SDK,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1019_SDK,NFC_FRI1.1_WK1024_SDK $
30 *\note This is the TAG (label, alias) of the FRI1.1.
31 *If the string is empty, the current documentation
32 * has not been generated for official release.
36 #include <phNfcTypes.h>
37 #include <phLibNfcStatus.h>
38 #include <phFriNfc_NdefRecord.h>
39 #include <phNfcLlcpTypes.h>
40 #include <phNfcConfig.h>
46 *\def PHLIBNFC_MAXNO_OF_SE
47 *Defines maximum no of secured elements supported by PN544.
49 #define LIBNFC_READONLY_NDEF
50 #define PHLIBNFC_MAXNO_OF_SE (0x02)
52 typedef uint32_t phLibNfc_Handle;
54 extern const unsigned char *nxp_nfc_full_version;
60 *\brief Defines Testmode Init configuration values
65 phLibNfc_TstMode_Off = 0x00, /**< Test mode is off */
66 phLibNfc_TstMode_On /**< Testmode is on */
68 } phLibNfc_Cfg_Testmode_t;
74 *\brief Defines Secure Element configurable states
79 phLibNfc_SE_Active = 0x00, /**< state of the SE is active */
80 phLibNfc_SE_Inactive= 0x01 /**< state of the SE is In active*/
82 } phLibNfc_SE_State_t;
87 *\brief Defines Secure Element types.
91 phLibNfc_SE_Type_Invalid=0x00,/**< Indicates SE type is Invalid */
92 phLibNfc_SE_Type_SmartMX=0x01,/**< Indicates SE type is SmartMX */
93 phLibNfc_SE_Type_UICC =0x02,/**<Indicates SE type is UICC */
94 phLibNfc_SE_Type_Unknown=0x03/**< Indicates SE type is Unknown */
100 *\brief Defines Ndef Card Offset.
104 phLibNfc_Ndef_EBegin = 0x01, /**< Start from Beginning position */
105 phLibNfc_Ndef_ECurrent /**< Start from Current position */
107 } phLibNfc_Ndef_EOffset_t;
110 * \ingroup grp_lib_nfc
112 *\brief This function allows to activate specific Secure element.
114 *\b VirtualMode: Virtual mode is used to communicated with secure elements from external reader.
115 * This mode is also called as card emulation mode.when secure element mode is set
116 * to this mode,external reader can communicate with this SE.
118 *\b WiredMode: Wired mode is used to communicate with the Secure Element internally.
119 * No RF field is generated. In this mode, PN544 acts as reader and discovers
120 * SmartMX as MIFARE tag.External reader cannot access any of the SE's in this mode.
121 * This mode is applicable to only SmartMX secure element.
126 phLibNfc_SE_ActModeWired=0x00, /**< Enables Wired Mode communication.This mode shall
128 phLibNfc_SE_ActModeDefault = 0x01, /**< Enables Virtual Mode communication.
129 This can be applied to UICC as well as SmartMX*/
130 phLibNfc_SE_ActModeVirtual=0x02, /**< Enables Virtual Mode communication.
131 This can be applied to UICC as well as SmartMX*/
132 phLibNfc_SE_ActModeOff =0x03, /**< Inactivate SE.This means,put SE in in-active state
133 This can be applied to UICC as well as SmartMX*/
134 phLibNfc_SE_ActModeVirtualVolatile = 0x04 /**< Enabled virtual mode communication for SE through an event
135 This can be applied to UICC as well as SmartMX*/
137 }phLibNfc_eSE_ActivationMode;
140 * \ingroup grp_lib_nfc
142 *\brief Defines SE low power mode types.
146 phLibNfc_SE_LowPowerMode_Off= 0x01, /**< Indicates no SE to be selected in low power mode */
147 phLibNfc_SE_LowPowerMode_On = 0x02 /**< Indicates requested SE to be selected in low power mode */
149 } phLibNfc_SE_LowPowerMode_t;
152 * \ingroup grp_lib_nfc
154 *\brief Defines Secure element event info .
156 typedef union phLibNfc_uSeEvtInfo
158 phNfc_sUiccInfo_t UiccEvtInfo; /**< Indicates UICC event info for Evt_Transaction event */
159 }phLibNfc_uSeEvtInfo_t;
162 * \ingroup grp_lib_nfc
164 *\brief Types of SE transaction events sent to SE notification handler .
168 phLibNfc_eSE_EvtStartTransaction=0x00, /**< Indicates transaction started on
170 phLibNfc_eSE_EvtEndTransaction=0x01, /**<Indicates transaction ended on secure
172 phLibNfc_eSE_EvtTypeTransaction=0x02, /**<Indicates external reader trying to access secure element */
174 phLibNfc_eSE_EvtConnectivity, /**<This event notifies the terminal host that it shall
175 send a connectivity event from UICC as defined in
176 ETSI TS 102 622 V7.4.0 */
177 phLibNfc_eSE_EvtFieldOn, // consider using phLibNfc_eSE_EvtConnectivity
178 phLibNfc_eSE_EvtFieldOff,
180 phLibNfc_eSE_EvtApduReceived, /* PAYPASS MagStripe or MCHIP_4 transaction */
182 phLibNfc_eSE_EvtCardRemoval, /* Indicates the beginning of an EMV Card Removal sequence */
184 phLibNfc_eSE_EvtMifareAccess /* Indicates when the SMX Emulation MIFARE is accessed */
185 } phLibNfc_eSE_EvtType_t;
188 * \ingroup grp_lib_nfc
190 *\brief Defines possible registration details for notifications.
192 typedef phNfc_sSupProtocol_t phLibNfc_Registry_Info_t;
195 * \ingroup grp_lib_nfc
197 *\brief Generic Data buffer definition.
199 typedef phNfc_sData_t phLibNfc_Data_t;
201 * \ingroup grp_lib_nfc
203 * Application Identifier (phLibNfc_AID)
205 * The application identifier defines a specific application on a SE.
208 typedef phNfc_sData_t phLibNfc_AID;
210 * \ingroup grp_lib_nfc
212 *\brief Remote Device Info definition .
214 typedef phNfc_sRemoteDevInformation_t phLibNfc_sRemoteDevInformation_t;
216 * \ingroup grp_lib_nfc
218 typedef phNfc_eDiscoveryConfigMode_t phLibNfc_eDiscoveryConfigMode_t;
221 * \ingroup grp_lib_nfc
223 *\brief Transceive info definition.
225 typedef phNfc_sTransceiveInfo_t phLibNfc_sTransceiveInfo_t;
227 * \ingroup grp_lib_nfc
229 *\brief Automatic Device Discovery Definition.
231 typedef phNfc_sADD_Cfg_t phLibNfc_sADD_Cfg_t;
233 *\ingroup grp_lib_nfc
235 *\brief Release mode definition.
237 typedef phNfc_eReleaseType_t phLibNfc_eReleaseType_t;
240 *\ingroup grp_lib_nfc
242 *\brief device capabilities details.
244 typedef phNfc_sDeviceCapabilities_t phLibNfc_sDeviceCapabilities_t;
247 * \ingroup grp_lib_nfc
249 *\brief Defines supported tag types for NDEF mapping and formatting feature.
251 typedef struct SupportedTagInfo
253 unsigned MifareUL:1; /**<TRUE indicates specified feature (mapping or formatting)for MIFARE UL tag supported else not supported.*/
254 unsigned MifareStd:1; /**<TRUE indicates specified feature (mapping or formatting)for Mifare Std tag supported else not supported.*/
255 unsigned MifareULC:1; /**<TRUE indicates specified feature (mapping or formatting)for MIFARE UL2 tag supported else not supported.*/
256 unsigned ISO14443_4A:1; /**<TRUE indicates specified feature (mapping or formatting)for ISO14443_4A tag supported else not supported.*/
257 unsigned ISO14443_4B:1; /**<TRUE indicates specified feature (mapping or formatting)for ISO14443_4B tag supported else not supported.*/
258 unsigned ISO15693:1; /**<TRUE indicates specified feature (mapping or formatting)for ISO15693 tag supported else not supported.*/
259 unsigned FeliCa:1; /**<TRUE indicates specified feature (mapping or formatting)for FeliCa tag supported else not supported.*/
260 unsigned Jewel:1; /**<TRUE indicates specified feature (mapping or formatting)for JEWEL tag supported else not supported.*/
261 unsigned Desfire:1; /**<TRUE indicates specified feature (mapping or formatting)for desfire tag supported else not supported.*/
263 }phLibNfc_sSupportedTagInfo_t;
267 * \ingroup grp_lib_nfc
269 *\brief Defines supported tag types for NDEF mapping feature.
271 typedef phLibNfc_sSupportedTagInfo_t phLibNfc_sNDEFMappingInfo_t;
274 * \ingroup grp_lib_nfc
276 *\brief Defines supported tag types for NDEF formatting feature.
279 typedef phLibNfc_sSupportedTagInfo_t phLibNfc_sTagFormattingInfo_t;
282 * \ingroup grp_lib_nfc
284 *\brief Stack capabilities details contains device capabilities and supported tags for NDEF mapping and formatting feature.
287 typedef struct StackCapabilities
289 phLibNfc_sDeviceCapabilities_t psDevCapabilities;
290 phLibNfc_sNDEFMappingInfo_t psMappingCapabilities;
291 phLibNfc_sTagFormattingInfo_t psFormatCapabilities;
292 }phLibNfc_StackCapabilities_t;
296 * \ingroup grp_lib_nfc
298 *\brief Defines Secure Element list type.
300 typedef struct phLibNfc_SecureElementInfo
302 phLibNfc_Handle hSecureElement; /**< handle to Secure Element */
303 phLibNfc_SE_Type_t eSE_Type; /**< type of Secure Element(SE)*/
304 phLibNfc_SE_State_t eSE_CurrentState;/**< state of the secure element indicates activated or not*/
305 } phLibNfc_SE_List_t;
308 * \ingroup grp_lib_nfc
310 *\brief Defines target specific info obtained during device discovery.
312 typedef struct phLibNfc_RemoteDev
314 phLibNfc_Handle hTargetDev; /**< discovered Target handle */
315 phLibNfc_sRemoteDevInformation_t* psRemoteDevInfo; /**< discovered Target details */
317 }phLibNfc_RemoteDevList_t;
319 typedef phNfc_sNfcIPCfg_t phLibNfc_sNfcIPCfg_t;
322 *\ingroup grp_lib_nfc
323 *\brief NDEF registration structure definition.
325 typedef struct phLibNfc_Ndef_SrchType
327 uint8_t Tnf; /**< Type Name Format of this NDEF record */
328 uint8_t *Type; /**< Type field of this NDEF record */
329 uint8_t TypeLength; /**< Length of the Type field of this NDEF record */
330 } phLibNfc_Ndef_SrchType_t;
333 *\ingroup grp_lib_nfc
334 * \brief NDEF information structure definition. \n
336 typedef struct phLibNfc_Ndef_Info
338 uint32_t NdefMessageLengthActual; /**< Actual length of the NDEF message */
339 uint32_t NdefMessageLengthMaximum; /**< Maximum length of the NDEF message */
340 uint8_t *pNdefMessage; /**< Pointer to raw NDEF Data buffer */
341 uint32_t NdefRecordCount; /**< Number of NDEF records pointed by pNdefRecord */
342 phFriNfc_NdefRecord_t *pNdefRecord; /**< Pointer to the NDEF Records contained within the NDEF message */
344 } phLibNfc_Ndef_Info_t;
346 /* As per NFC forum specification, the card can be in either of the below mentioned states
347 INVALID - means card is NOT NFC forum specified tag. NDEF FORMAT can only be performed for
348 the factory cards, other cards may or may not be formatted for NDEF FORMAT function.
349 INITIALISED - means card is NFC forum specified tag. But, in this state
350 the user has to first call NDEF WRITE, because in INITIALISED state, there
351 wont be any data i.e.,ACTUAL NDEF FILE SIZE is 0. After the first
352 NDEF WRITE, NDEF READ and WRITE functions can be called any number of times.
353 READ WRITE - means card is NFC forum specified tag. User can use both
354 NDEF READ and WRITE functions
355 READ ONLY - means card is NFC forum specified tag. User can only use
356 NDEF READ. NDEF WRITE function will not work.
358 #define PHLIBNFC_NDEF_CARD_INVALID 0x00U
359 #define PHLIBNFC_NDEF_CARD_INITIALISED 0x01U
360 #define PHLIBNFC_NDEF_CARD_READ_WRITE 0x02U
361 #define PHLIBNFC_NDEF_CARD_READ_ONLY 0x03U
364 * \ingroup grp_lib_nfc
366 *\brief Ndef Information Structure.
368 typedef struct phLibNfc_ChkNdef_Info
370 uint8_t NdefCardState; /**< Card state information */
371 uint32_t ActualNdefMsgLength; /**< Indicates Actual length of NDEF Message in Tag */
372 uint32_t MaxNdefMsgLength; /**< Indicates Maximum Ndef Message length that Tag can hold*/
373 } phLibNfc_ChkNdef_Info_t;
376 *\ingroup grp_lib_nfc
378 *\brief LLCP link status. Refer to \ref phFriNfc_LlcpMac_eLinkStatus_t
381 typedef phFriNfc_LlcpMac_eLinkStatus_t phLibNfc_Llcp_eLinkStatus_t;
383 typedef phFriNfc_Llcp_sLinkParameters_t phLibNfc_Llcp_sLinkParameters_t;
385 typedef phFriNfc_LlcpTransport_eSocketType_t phLibNfc_Llcp_eSocketType_t;
387 typedef phFriNfc_LlcpTransport_sSocketOptions_t phLibNfc_Llcp_sSocketOptions_t;
390 * \ingroup grp_lib_nfc
392 *\brief Response callback for connect request.
394 * Callback type used to indicate a Connect request Successful or Failure indication to
397 * \param[in] pContext Context passed in the connect request before.
398 * \param[in] hRemoteDev Handle to remote device on which connect was requested.
399 * \param[in] psRemoteDevInfo contains updated remote device details.For few tags
400 * like ISO-14443A details like historical bytes gets updated
401 * only after connecting to target.Once connect is successful
402 * \b psRemoteDevInfo gets updated.
404 * \param[in] status Status of the response callback.
406 * \param NFCSTATUS_SUCCESS Connect operation successful.
407 * \param NFCSTATUS_TARGET_LOST Connect operation failed because target is lost.
408 * \param NFCSTATUS_SHUTDOWN Shutdown in progress.
412 typedef void (*pphLibNfc_ConnectCallback_t) (void* pContext,
413 phLibNfc_Handle hRemoteDev,
414 phLibNfc_sRemoteDevInformation_t* psRemoteDevInfo,
419 * \ingroup grp_lib_nfc
421 *\brief Response callback for disconnect request.
423 * Callback type used to provide a disconnect Success or Failure indication to
426 * \param[in] pContext Context passed in the disconnect request before.
427 * \param[in] hRemoteDev Handle to remote device on which disconnect is requested.
428 * \param[in] status Status of the response callback.
430 * \param NFCSTATUS_SUCCESS Disconnect operation successful.
431 * \param NFCSTATUS_SHUTDOWN Shutdown in progress.
434 typedef void (*pphLibNfc_DisconnectCallback_t)(void* pContext,
435 phLibNfc_Handle hRemoteDev,
439 * \ingroup grp_lib_nfc
441 *\brief Response callback for IOCTL request.
443 * Callback type to inform success or failure of the Ioctl request
444 * made by LibNfc client. It may optionally contain response data
445 * depending on the Ioctl command type issued.
448 * \param[in] pContext Context passed in the connect request before.
449 * \param[in] status Status of the response callback.
451 * \param NFCSTATUS_SUCCESS Ioctl operation successful.
452 * \param NFCSTATUS_TARGET_LOST Ioctl operation failed because target is lost.
453 * \param NFCSTATUS_SHUTDOWN Ioctl operation failed because Shutdown in progress.
455 *\param[in,out] pOutParam contains Ioctl command specific response buffer and size
456 * of the buffer.This buffer address will be same as
457 * pOutParam sent in \ref phLibNfc_Mgt_IoCtl.
462 typedef void (*pphLibNfc_IoctlCallback_t) (void* pContext,
463 phNfc_sData_t* pOutParam,
470 * \ingroup grp_lib_nfc
472 *\brief Response callback for Transceive request.
474 * This callback type is used to provide received data and it's size to the
475 * LibNfc client in \ref phNfc_sData_t format ,when LibNfc client has performed
476 * a Transceive operation on a tag or when the device acts as an Initiator during a
479 * \param[in] pContext LibNfc client context passed in the corresponding request before.
480 * \param[in] hRemoteDev Handle to remote device on transceive is performed.
481 * \param[in] pResBuffer Response buffer of type \ref phNfc_sData_t.
482 * \param[in] status Status of the response callback.
484 * \param NFCSTATUS_SUCCESS Transceive operation successful.
485 * \param NFCSTATUS_TARGET_LOST Transceive operation failed because target is lost.
486 * \param NFCSTATUS_SHUTDOWN Transceive operation failed because Shutdown in progress.
487 * \param NFCSTATUS_ABORTED Aborted due to disconnect request in between.
490 typedef void (*pphLibNfc_TransceiveCallback_t)( void* pContext,
491 phLibNfc_Handle hRemoteDev,
492 phNfc_sData_t* pResBuffer,
497 * \ingroup grp_lib_nfc
499 * \brief Generic Response Callback definition.
501 * Generic callback definition used as callback type in few APIs below.
503 * \note : Status and error codes for this type of callback are documented in respective APIs
504 * wherever it is used.
506 * \param[in] pContext LibNfc client context passed in the corresponding request
508 * \param[in] status Status of the response callback.
510 typedef void(*pphLibNfc_RspCb_t) (void* pContext,NFCSTATUS Status);
512 * \ingroup grp_lib_nfc
514 * \brief Check NDEF Callback definition.
516 * This call back is used by check ndef api.
518 * \note : Status and error codes for this type of callback are documented in API
520 * \param[in] pContext LibNfc client context passed in the corresponding request
522 * \param[in] Ndef_Info Ndef message length and the container size.
523 * \param[in] status Status of the response callback.
525 typedef void(*pphLibNfc_ChkNdefRspCb_t)(void* pContext,
526 phLibNfc_ChkNdef_Info_t Ndef_Info,
531 * \ingroup grp_lib_nfc
532 * \brief Notification handler callback definition.
534 *This callback type is used to provide information on discovered targets to LibNfcClient.
535 *Discovered targets will be notified in \ref phLibNfc_RemoteDevList_t format.
536 *In case multiple targets discovered ,remote device list contains these targets one after another.
538 *\note List will be exported as memory block,based on \b uNofRemoteDev
539 * parameter application has to access remote devices accordingly.
541 *\b Ex: Multiple targets discovered can be referred as phLibNfc_RemoteDevList_t[0]
542 *and phLibNfc_RemoteDevList_t[1].
544 *Subsequent operations on discovered target shall be performed using target specific handle
547 * \param[in] pContext Client context passed in the corresponding
548 * request before.The context is handled by client
551 * \param[in] psRemoteDevList Remote Device list contains discovered target details.
552 * Refer to \ref phLibNfc_RemoteDevList_t .
553 * List size depends on no of remote devices discovered.
555 * \param[in] uNofRemoteDev Indicates no of remote devices discovered .
556 * In case more than one target discovered,\b psRemoteDevList contains
557 * multiple target details.
559 * \param[in] Status Status of the response callback.
561 * \param NFCSTATUS_SUCCESS Discovered single target successfully.
562 * \param NFCSTATUS_MULTIPLE_TARGETS multiple targets found.
563 * \param NFCSTATUS_MULTI_PROTOCOLS Target found supports multiple protocols.
564 * \param NFCSTATUS_SHUTDOWN Registration failed because shutdown in progress.
565 * \param NFCSTATUS_DESELECTED initiator issued disconnect or intiator
566 * physically removed from the RF field.
568 *\note: multiple tag detection is possible only within same technology but not across
569 * different technologies.
571 typedef void (*phLibNfc_NtfRegister_RspCb_t)(
573 phLibNfc_RemoteDevList_t* psRemoteDevList,
574 uint8_t uNofRemoteDev,
579 * \ingroup grp_lib_nfc
580 * \brief Response Callback for secure element mode settings.
582 * This callback type is used to provide information on requested secure element is
583 * activated or not to LibNfcClient.
585 * \param[in] pContext LibNfc client context passed in the activation request.
587 * \param[in] hSecureElement Handle to secure element.
589 * \param[in] Status Indicates API status.
590 * \param NFCSTATUS_SUCCESS Secure element activated successfully.
591 * \param NFCSTATUS_SHUTDOWN Activation failed because shutdown in progress.
592 * \param NFCSTATUS_FAILED Activation failed.
595 typedef void(*pphLibNfc_SE_SetModeRspCb_t)(
597 phLibNfc_Handle hSecureElement,
601 * \ingroup grp_lib_nfc
602 * \brief Notification callback for \ref phLibNfc_SE_NtfRegister().
604 * A function of this type is called when external reader tries to access SE.
606 *\param[in] pContext LibNfc client context passed in the SE notification register request.
607 * The context is Handled by client only.
608 * \param[in] EventType Event type of secure element transaction
609 * \param[in] hSecureElement handle to Secures Element.
611 *\param[in] pAppID Application identifier to be accessed on SE .
612 * Sent when available from SE otherwise empty.
614 *\param[in] Status Indicates API status.
615 * \param NFCSTATUS_SUCCESS Notification handler registered sucessfully.
616 * \param NFCSTATUS_SHUTDOWN Shutdown in progress.
617 * \param NFCSTATUS_FAILED set mode operation failed.
621 typedef void (*pphLibNfc_SE_NotificationCb_t) (void* pContext,
622 phLibNfc_eSE_EvtType_t EventType,
623 phLibNfc_Handle hSecureElement,
624 phLibNfc_uSeEvtInfo_t* pSeEvtInfo,
630 *\ingroup grp_lib_nfc
631 *\brief Receive callback definition.
633 * This callback type is used to provide received data and it's size to the
634 * LibNfc client in \ref phNfc_sData_t format ,when LibNfc client has performed
635 * when the device acts as a Target during P2P communication
637 * \param[in] pContext LibNfc client context passed in the corresponding
639 * \param[in] pRecvBufferInfo Response buffer of type \ref phNfc_sData_t.
640 * \param[in] status Status of the response callback.
642 * \param NFCSTATUS_SUCCESS Receive operation successful.
643 * \param NFCSTATUS_SHUTDOWN Receive operation failed because
644 * Shutdown in progress.
645 * \param NFCSTATUS_ABORTED Aborted due to initiator issued disconnect request.
646 * This status code reported,to indicate P2P session
647 * closed and send and receive requests not allowed any more
648 * unless new session is started.
650 typedef void (*pphLibNfc_Receive_RspCb_t)(void* pContext,
651 phNfc_sData_t* pRecvBufferInfo,
655 *\ingroup grp_lib_nfc
657 * \brief NDEF Response callback definition
659 * A function of this type is notified when registered NDEF type detected.
661 * \b Note :Once this type callback is notified,discovery wheel is stopped.
662 *In order to restart discovery process again it is important to disconnect
663 *from current tag.LibNfc client shall disconnect explicitly using
664 *\ref phLibNfc_RemoteDev_Disconnect() interface.
666 *\param[in] pContext Pointer to context previously provided by the user
667 *\param[in] psNdefInfo All Ndef specific details of the remote device discovered.
668 *\param[in] hRemoteDevice handle to remote device on which NDEF detection is done.
670 *\param[in] Status Indicates callback status.
672 * \param NFCSTATUS_SUCCESS Indicates registered tnf type detected. .
673 * \param NFCSTATUS_SHUTDOWN Indicates shutdown in progress.
674 * \param NFCSTATUS_FAILED status failed.
675 * \param NFCSTATUS_ABORTED Aborted due to disconnect operation in between.
679 typedef void (*pphLibNfc_Ndef_Search_RspCb_t) ( void* pContext,
680 phLibNfc_Ndef_Info_t* psNdefInfo,
681 phLibNfc_Handle hRemoteDevice,
687 *\ingroup grp_lib_nfc
689 * \brief LLCP check response callback definition
691 typedef void (*pphLibNfc_ChkLlcpRspCb_t) ( void* pContext,
697 *\ingroup grp_lib_nfc
699 * \brief LLCP check response callback definition
701 typedef void (*pphLibNfc_LlcpLinkStatusCb_t) ( void* pContext,
702 phLibNfc_Llcp_eLinkStatus_t eLinkStatus
707 *\ingroup grp_lib_nfc
709 * \brief LLCP socket error notification callback definition
711 typedef void (*pphLibNfc_LlcpSocketErrCb_t) ( void* pContext,
716 *\ingroup grp_lib_nfc
718 * \brief Incoming connection on a listening LLCP socket callback definition
720 typedef void (*pphLibNfc_LlcpSocketListenCb_t) ( void* pContext,
721 phLibNfc_Handle hIncomingSocket
725 *\ingroup grp_lib_nfc
727 * \brief LLCP socket connect callback definition
729 typedef void (*pphLibNfc_LlcpSocketConnectCb_t) ( void* pContext,
735 *\ingroup grp_lib_nfc
737 * \brief LLCP socket disconnect callback definition
739 typedef void (*pphLibNfc_LlcpSocketDisconnectCb_t) ( void* pContext,
744 *\ingroup grp_lib_nfc
746 * \brief LLCP socket Accept callback definition
748 typedef void (*pphLibNfc_LlcpSocketAcceptCb_t) ( void* pContext,
753 *\ingroup grp_lib_nfc
755 * \brief LLCP socket Reject callback definition
757 typedef void (*pphLibNfc_LlcpSocketRejectCb_t) ( void* pContext,
762 *\ingroup grp_lib_nfc
764 * \brief LLCP socket reception callback definition
766 typedef void (*pphLibNfc_LlcpSocketRecvCb_t) ( void* pContext,
771 *\ingroup grp_lib_nfc
773 * \brief LLCP socket reception with SSAP callback definition
775 typedef void (*pphLibNfc_LlcpSocketRecvFromCb_t) ( void* pContext,
781 *\ingroup grp_lib_nfc
783 * \brief LLCP socket emission callback definition
785 typedef void (*pphLibNfc_LlcpSocketSendCb_t) ( void* pContext,
790 /* FUNCTION PROTOTYPES */
792 * \ingroup grp_lib_nfc
794 * \brief Driver configuration function
795 * This synchronous function configures the given driver Interface and
796 * sends the HANDLE to the caller.
798 * \param[in] psConfig Driver configuration details as provided
799 * by the upper layer.
800 * \param[in,out] ppDriverHandle pointer to which valid Handle to driver
801 * interface is assigned.
803 * \retval NFCSTATUS_SUCCESS Configuration happened successfully.
804 * \retval NFCSTATUS_INVALID_PARAMETER At least one parameter of the function
806 * \retval NFCSTATUS_FAILED Configuration failed(example.unable to
807 * open HW Interface).
808 * \retval NFCSTATUS_INVALID_DEVICE The device has not been opened or
809 * has been disconnected meanwhile
810 * \retval NFCSTATUS_BOARD_COMMUNICATION_ERROR A board communication error occurred
811 (e.g. configuration went wrong).
813 *LibNfcClient,LibNfc;
814 *--- [label="Before initializing Nfc LIB,Configure Driver layer"];
815 *LibNfcClient=>LibNfc[label="phLibNfc_Mgt_ConfigureDriver()",URL="\ref phLibNfc_Mgt_ConfigureDriver"];
816 *LibNfcClient<<LibNfc[label="NFCSTATUS_SUCCESS"];
819 NFCSTATUS phLibNfc_Mgt_ConfigureDriver (pphLibNfc_sConfig_t psConfig,
820 void ** ppDriverHandle
823 * \ingroup grp_lib_nfc
825 * \brief Release configuration for the given driver Interface.
827 * \copydoc page_reg Release all that has been
828 * initialised in \b phLibNfc_Mgt_ConfigureDriver function (Synchronous function).
830 * \param[in] pDriverHandle Link information of the hardware
832 * \retval NFCSTATUS_SUCCESS Driver Configuration Released successfully.
833 * \retval NFCSTATUS_FAILED Configuration release failed(example: Unable to close Com port).
836 *LibNfcClient,LibNfc;
837 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_ConfigureDriver()",URL="\ref phLibNfc_Mgt_ConfigureDriver"];
838 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
839 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
840 *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
841 *LibNfcClient<-LibNfc [label="pInitCb"];
842 *--- [label="Perform feature operations "];
843 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_DeInitialize()",URL="\ref phLibNfc_Mgt_DeInitialize"];
844 *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
845 *LibNfcClient<-LibNfc [label="pDeInitCb"];
846 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_UnConfigureDriver()",URL="\ref phLibNfc_Mgt_UnConfigureDriver"];
847 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
850 NFCSTATUS phLibNfc_Mgt_UnConfigureDriver (void * pDriverHandle
853 NFCSTATUS phLibNfc_HW_Reset ();
855 NFCSTATUS phLibNfc_Download_Mode ();
857 int phLibNfc_Load_Firmware_Image ();
860 // bits [0..3] => timeout value, (256*16/13.56*10^6) * 2^value
864 // [15] -> not allowed
865 // bit [4] => timeout enable
866 // bit [5..7] => unused
867 NFCSTATUS phLibNfc_SetIsoXchgTimeout(uint8_t timeout);
868 int phLibNfc_GetIsoXchgTimeout();
870 NFCSTATUS phLibNfc_SetHciTimeout(uint32_t timeout_in_ms);
871 int phLibNfc_GetHciTimeout();
874 // [0] -> timeout disabled
875 // [1..255] -> timeout in ms
876 NFCSTATUS phLibNfc_SetFelicaTimeout(uint8_t timeout_in_ms);
877 int phLibNfc_GetFelicaTimeout();
879 // MIFARE RAW timeout (ISO14443-3A / NfcA timeout)
881 // bits [0..3] => timeout value, (256*16/13.56*10^6) * 2^value
885 // [15] -> not allowed
887 NFCSTATUS phLibNfc_SetMifareRawTimeout(uint8_t timeout);
888 int phLibNfc_GetMifareRawTimeout();
891 * \ingroup grp_lib_nfc
893 * \brief Initializes the NFC library .
896 *\brief This function initializes NFC library and its underlying layers.
897 * As part of this interface underlying modules gets initialized.
898 * A session with NFC hardware will be established.
899 * Once initialization is successful ,NFC library ready for use.
900 *\note It is must to initialize prior usage of the stack .
902 * \param[in] pDriverHandle Driver Handle currently application is using.
903 * \param[in] pInitCb The init callback is called by the LibNfc when init is
904 * completed or there is an error in initialization.
906 * \param[in] pContext Client context which will be included in
907 * callback when the request is completed.
909 * \retval NFCSTATUS_ALREADY_INITIALISED Stack is already initialized.
910 * \retval NFCSTATUS_PENDING Init sequence has been successfully
911 * started and result will be conveyed via
912 * callback notification.
913 * \retval NFCSTATUS_INVALID_PARAMETER The parameter could not be properly
915 *\retval NFCSTATUS_INSUFFICIENT_RESOURCES Insufficient resource.(Ex: insufficient memory)
918 *LibNfcClient,LibNfc;
919 *--- [label="Before initializing Nfc LIB,Configure Driver layer"];
920 *LibNfcClient=>LibNfc[label="phLibNfc_Mgt_ConfigureDriver()",URL="\ref phLibNfc_Mgt_ConfigureDriver"];
921 *LibNfcClient<<LibNfc[label="NFCSTATUS_SUCCESS"];
922 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
923 *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
924 *LibNfcClient<-LibNfc [label="pInitCb"];
927 NFCSTATUS phLibNfc_Mgt_Initialize (void * pDriverHandle,
928 pphLibNfc_RspCb_t pInitCb,
932 * \ingroup grp_lib_nfc
934 * \brief De-Initializes NFC library.
937 * This function de-initializes and closes the current session with PN544 NFC hardware.
938 * All configurations and setups done until now are invalidated to restart
939 * communication. Resources currently used by stack gets released during De-initialization.
940 *\ref phLibNfc_Mgt_Initialize needs to be called once stack is
941 * De-initialized before using the stack again.
943 * \param[in] pHwHandle Hardware context currently application is using.
945 * \param[in] pDeInitCb De-initialization callback is called by the LibNfc when init
946 * completed or there is an error in initialization.
947 * \param[in] pContext Client context which will be included in
948 * callback when the request is completed.
950 * \retval NFCSTATUS_SUCCESS Device stack is already De-Initialized.
951 * \retval NFCSTATUS_PENDING De-Initialization sequence has been successfully
952 * started and result is conveyed via callback
955 * \retval NFCSTATUS_INVALID_PARAMETER The parameter could not be properly
957 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
958 * \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
959 * \retval NFCSTATUS_FAILED Request failed.
964 *LibNfcClient,LibNfc;
965 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
966 *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
967 *LibNfcClient<-LibNfc [label="pInitCb"];
968 *--- [label="Perform feature operations "];
969 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_DeInitialize()",URL="\ref phLibNfc_Mgt_DeInitialize"];
970 *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
971 *LibNfcClient<-LibNfc [label="pDeInitCb"];
974 NFCSTATUS phLibNfc_Mgt_DeInitialize(void * pDriverHandle,
975 pphLibNfc_RspCb_t pDeInitCb,
980 * \ingroup grp_lib_nfc
981 * \brief Get list of available Secure Elements.
983 * This function retrieves list of secure elements locally connected.
984 * during LibNfc initialization these SEs enumerated from lower stack and maintained
985 * in LibNfc library.Once libNfc client queries using this interface,
986 * same details exposed to LibNfc client.
987 * LibNfc client shall pass empty list of size \ref PHLIBNFC_MAXNO_OF_SE .
988 * Once SE list is available, libNfc client can perform operation on specific SE
990 * The handle given in the \ref phLibNfc_SE_List_t structure stays valid until
991 * shutdown is called.
993 *\note In case no SE's found, API still returns \ref NFCSTATUS_SUCCESS with \b uSE_count
994 set to zero.Value zero indicates none of the SE's connected to PN544 hardware.
996 * \param[in,out] pSE_List contains list of SEs with SE details in \ref phLibNfc_SE_List_t format.
997 * \param[in,out] uSE_count contains no of SEs in the list.
999 *\note LibNfc client has to interpret no of secure elements in \b pSE_List based on this
1002 *\retval NFCSTATUS_SUCCESS Indicates operation is sucessfull.
1003 *\retval NFCSTATUS_SHUTDOWN Operation failed because shutdown in progress.
1004 *\retval NFCSTATUS_NOT_INITIALISED Operation failed because stack is not yet initialized.
1005 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
1006 * could not be properly interpreted.
1009 *LibNfcClient,LibNfc;
1010 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1011 *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
1012 *LibNfcClient<-LibNfc [label="pInitCb"];
1013 *--- [label="Now SE list can be retrieved"];
1017 NFCSTATUS phLibNfc_SE_GetSecureElementList(phLibNfc_SE_List_t* pSE_List,
1023 * \ingroup grp_lib_nfc
1025 *\brief Sets secure element mode.
1027 * This function configures SE to specific mode based on activation mode type.
1028 * Effect of different modes on SE is as below.
1030 *\b a)If mode is \ref phLibNfc_SE_ActModeVirtual then external reader can communicate
1032 *\note This mode is applicable to both UICC and SmartMX.
1034 \b b)If mode is \ref phLibNfc_SE_ActModeWired then internal reader can communicate with
1035 * this SE.In this mode PN544 can act as reader and communicate with SE as normal Tag.
1036 *In this mode mode external reader ca not communicate with any of the SEs since RF filed is off.
1038 *\note 1.Wired Mode is applicable to only SmartMX not to UICC.
1039 * 2.When SmartMX SE configured in Wired Mode ,LibNfc client shall restart discovery process.
1040 * SmartMX gets detected as MIFARE tag.
1041 * 3.To exit wired mode ,LibNfc client has to disconnect with release type as "NFC_SMARTMX_RELEASE".
1044 *\b c)If mode is \ref phLibNfc_SE_ActModeOff
1045 *This means SE is off mode .It can not be accessed any more in wired or virtual mode.
1046 *internal reader any more.communicate with internal reader and only
1047 *PN544 can communicate in reader mode and external reader can not
1048 *communicate with it.This mode is applicable both SE types ( UICC and SmartMX)
1050 * \param[in] hSE_Handle Secure Element Handle .
1051 * \param[in] eActivation_mode Indicates SE mode to be configured.
1055 * \param[in] pphLibNfc_SE_setModeRspCb_t pointer to response callback.
1057 * \param[in] pContext Client context which will be included in
1058 * callback when the request is completed.
1061 * \retval NFCSTATUS_PENDING Activation transaction started.
1062 * \retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
1063 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
1064 * \retval NFCSTATUS_INVALID_HANDLE Invalid Handle.
1065 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
1066 * could not be properly interpreted.
1067 * \retval NFCSTATUS_REJECTED Invalid request.(Ex: If wired mode settings called using
1068 * UICC SE handle ,this error code seen).
1069 * \retval NFCSTATUS_FAILED Request failed.
1072 *LibNfcClient,LibNfc;
1073 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1074 *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
1075 *LibNfcClient<-LibNfc [label="pInitCb"];
1076 *--- [label="Now query for available SE's"];
1077 *LibNfcClient=>LibNfc [label="phLibNfc_SE_GetSecureElementList()",URL="\ref phLibNfc_SE_GetSecureElementList"];
1078 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1079 *--- [label="Now configure specific SE"];
1080 *LibNfcClient=>LibNfc [label="phLibNfc_SE_SetMode(hSE_Handle,)",URL="\ref phLibNfc_SE_SetMode"];
1081 *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
1082 *LibNfcClient<-LibNfc [label="pSE_SetMode_Rsp_cb"];
1085 NFCSTATUS phLibNfc_SE_SetMode ( phLibNfc_Handle hSE_Handle,
1086 phLibNfc_eSE_ActivationMode eActivation_mode,
1087 pphLibNfc_SE_SetModeRspCb_t pSE_SetMode_Rsp_cb,
1092 * \ingroup grp_lib_nfc
1093 * \brief Registers notification handler to handle secure element specific events.
1095 * This function registers handler to report SE specific transaction events.
1096 * Possible different types of events are as defined in \ref phLibNfc_eSE_EvtType_t.
1098 * \param[in] pSE_NotificationCb pointer to notification callback.
1099 * \param[in] pContext Client context which will be included in
1100 * callback when the request is completed.
1102 *\retval NFCSTATUS_SUCCESS Registration Sucessful.
1103 *\retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
1104 *\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
1105 *\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
1106 * could not be properly interpreted.
1107 *\retval NFCSTATUS_FAILED Request failed.
1111 *LibNfcClient,LibNfc;
1112 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1113 *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
1114 *LibNfcClient<-LibNfc [label="pInitCb"];
1115 *--- [label="Perform feature operations "];
1117 *LibNfcClient=>LibNfc [label="phLibNfc_SE_NtfRegister()",URL="\ref phLibNfc_SE_NtfRegister"];
1118 LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1119 *--- [label="Registration sucessfull"];
1121 *--- [label="In case external reader performs transactions,callback is notified as shown below"];
1122 *LibNfcClient<-LibNfc [label="pSE_NotificationCb"];
1126 NFCSTATUS phLibNfc_SE_NtfRegister (pphLibNfc_SE_NotificationCb_t pSE_NotificationCb,
1130 * \ingroup grp_lib_nfc
1131 *\brief This function unregister the registered listener for SE event.
1132 * This function unregisters the listener which has been registered with \ref
1133 * phLibNfc_SE_NtfRegister.
1135 *\retval NFCSTATUS_SUCCESS Unregistration successful.
1136 *\retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
1137 *\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
1138 *\retval NFCSTATUS_FAILED Request failed.
1140 *LibNfcClient,LibNfc;
1141 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1142 *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
1143 *LibNfcClient<-LibNfc [label="pInitCb"];
1144 *--- [label="Perform feature operations "];
1145 *LibNfcClient=>LibNfc [label="phLibNfc_SE_NtfRegister()",URL="\ref phLibNfc_SE_NtfRegister"];
1146 LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1147 *--- [label="Registration sucessfull"];
1149 *--- [label="In case external reader performs transactions,callback is notified as shown below"];
1151 *LibNfcClient<-LibNfc [label="pSE_NotificationCb"];
1152 *--- [label="Unregister SE notification handler in case required "];
1153 *LibNfcClient=>LibNfc [label="phLibNfc_SE_NtfUnregister()",URL="\ref phLibNfc_SE_NtfUnregister"];
1154 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1158 NFCSTATUS phLibNfc_SE_NtfUnregister(void);
1161 *\ingroup grp_lib_nfc
1162 * \brief IOCTL interface.
1164 * The I/O Control function allows the caller to configure specific
1165 * functionality provided by the lower layer.Each feature is accessible via a
1166 * specific IOCTL Code.
1168 * \param[in] pDriverHandle Interface handle.This parameter is valid only for firmware download feature.
1169 * for other IOCTL features this parameter is not relevent.
1171 * \param[in] IoctlCode Control code for the operation.
1172 * This value identifies the specific
1173 * operation to be performed.For more details on supported
1174 * IOCTL codes refer to \ref grp_lib_ioctl.
1175 *\param[in,out] pInParam Pointer to any input data structure
1176 * containing data which is interpreted
1177 * based on IoCtl code and the length of
1180 *\param[in,out] pOutParam Pointer to output buffer details to hold
1181 * Ioctl specific response buffer and size of
1182 * the buffer.This buffer will be updated and
1183 * sent back as part of of callback details.
1185 *\param[in] pIoCtl_Rsp_cb Response callback registered by the caller.
1187 * \param[in] pContext Client context which will be included in
1188 * callback when the request is completed.
1191 *\retval NFCSTATUS_PENDING Update in pending state. RspCB will be
1193 *\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
1194 * could not be properly interpreted.
1196 \retval NFCSTATUS_BUFFER_TOO_SMALL The buffer supplied by the caller is to
1197 *\retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
1198 *\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
1199 *\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
1200 * could not be properly interpreted.
1203 *LibNfcClient,LibNfc;
1204 *--- [label="Firmware download Scenario"];
1206 *--- [label="Intialise Driver"];
1207 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_IoCtl(pDriverHandle,)",URL="\ref phLibNfc_Mgt_IoCtl"];
1208 *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
1209 *LibNfcClient<-LibNfc [label="pIoCtl_Rsp_cb()",URL="\ref pphLibNfc_IoctlCallback_t"];
1210 **--- [label="requested IoCtl processed sucessfully "];
1214 NFCSTATUS phLibNfc_Mgt_IoCtl (void* pDriverHandle,
1216 phNfc_sData_t* pInParam,
1217 phNfc_sData_t* pOutParam,
1218 pphLibNfc_IoctlCallback_t pIoCtl_Rsp_cb,
1223 * \ingroup grp_lib_nfc
1224 * \brief This interface registers notification handler for target discovery.
1226 * This function allows libNfc client to register for notifications based technology
1227 * type it is interested to discover. In case application is interested in multiples technology
1228 * discovery,it can enable respective bits in \b pRegistryInfo . when Registered type target
1229 * is discovered in RF field ,LibNfc notifies registered notification callback.
1231 * \note In case this API is called multiple times ,most recent request registry details will be used
1234 *\param[in] pRegistryInfo structure contains bitwise registry information.
1235 * Specific technology type discovery can be registered if
1236 * corresponding bit is enabled.In case bit is disabled
1237 * it indicates specific technology type unregistered.
1239 *\param[in] pNotificationHandler Notification callback.This callback will
1240 * be notified once registered target is discovered.
1241 * \param[in] pContext Client context which will be included in
1242 * callback when the request is completed.
1244 * \retval NFCSTATUS_SUCCESS Indicates registration successful.
1245 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could
1246 * not be properly interpreted.
1247 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
1248 * \retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
1252 *LibNfcClient,LibNfc;
1253 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1254 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
1255 *--- [label="Register for technology type.Ex: MIFARE UL"];
1256 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
1257 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1262 NFCSTATUS phLibNfc_RemoteDev_NtfRegister(
1263 phLibNfc_Registry_Info_t* pRegistryInfo,
1264 phLibNfc_NtfRegister_RspCb_t pNotificationHandler,
1270 * \ingroup grp_lib_nfc
1271 * \brief Configure Discovery Modes.
1273 *This function is used to configure ,start and stop the discovery wheel.
1274 *Configuration includes
1275 *<br><br>a)Enabling/disabling of Reader phases for A,B and F technologies.
1276 *<br>b)Configuring NFC-IP1 Initiator Speed and duration of the Emulation phase .
1278 *Discovery wheel configuration based on discovery mode selected is as below.
1279 *<br><br>1.If discovery Mode is set as \ref NFC_DISCOVERY_CONFIG then previous configurations
1280 * over written by new configurations passed in \ref phLibNfc_sADD_Cfg_t and Discovery wheel
1281 *restarts with new configurations.
1282 *<br><br>2.If discovery Mode is set as \ref NFC_DISCOVERY_START or \ref NFC_DISCOVERY_STOP then
1283 * discovery parameters passed in \ref phLibNfc_sADD_Cfg_t will not be considered and previous
1284 *configurations still holds good.
1285 *<br><br>3.If discovery Mode is set as \ref NFC_DISCOVERY_RESUME discovery mode starts the discovery
1286 *wheel from where it is stopped previously.
1288 *\b Note: Config types \b NFC_DISCOVERY_START, \b NFC_DISCOVERY_STOP and \b NFC_DISCOVERY_RESUME
1289 * are not supported currently. It is for future use.
1291 * \param[in] DiscoveryMode Discovery Mode allows to choose between:
1292 * discovery configuration and start, stop
1293 * discovery and start discovery (with last
1294 * set configuration).For mode details refer to
1295 \ref phNfc_eDiscoveryConfigMode_t.
1296 * \param[in] sADDSetup Includes Enable/Disable discovery for
1297 * each protocol A,B and F.
1298 * Details refer to \ref phNfc_sADD_Cfg_t.
1299 * \param[in] pConfigDiscovery_RspCb is called once the discovery wheel
1300 * configuration is complete.
1301 * \param[in] pContext Client context which will be included in
1302 * callback when the request is completed.
1305 *\retval NFCSTATUS_PENDING Discovery request is in progress and result
1306 * will be notified via callback later.
1307 *\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
1308 * could not be properly interpreted.
1309 *\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not initialized.
1310 *\retval NFCSTATUS_INSUFFICIENT_RESOURCES Insufficient resource.(Ex: insufficient memory)
1311 *\retval NFCSTATUS_BUSY already discovery in progress
1312 * or it is already discovered Target and
1314 *\retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
1315 *\retval NFCSTATUS_FAILED Request failed.
1318 * \note : During Reader/Initiator mode it is mandatory
1319 * to call \ref phLibNfc_RemoteDev_Connect before any transaction can be performed
1320 * with the discovered target. Even if the LibNfc client is not
1321 * interested in using any of the discovered targets \ref phLibNfc_RemoteDev_Connect
1322 * and \ref phLibNfc_RemoteDev_Disconnect should be called to restart the Discovery
1324 * \sa \ref phLibNfc_RemoteDev_Connect, phLibNfc_RemoteDev_Disconnect.
1327 *LibNfcClient,LibNfc;
1328 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1329 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
1330 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref
1331 phLibNfc_RemoteDev_NtfRegister"];
1332 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1333 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
1334 *LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1335 *--- [label="Now discovery wheel configured as requested"];
1339 *\note Response callback parameters details for this interface are as listed below.
1341 * \param[in] pContext LibNfc client context passed in the corresponding request before.
1342 * \param[in] status Status of the response callback.
1344 * \param NFCSTATUS_SUCCESS Discovery Configuration successful.
1345 * \param NFCSTATUS_SHUTDOWN Shutdown in progress.
1346 * \param NFCSTATUS_FAILED Request failed.
1349 NFCSTATUS phLibNfc_Mgt_ConfigureDiscovery (phLibNfc_eDiscoveryConfigMode_t DiscoveryMode,
1350 phLibNfc_sADD_Cfg_t sADDSetup,
1351 pphLibNfc_RspCb_t pConfigDiscovery_RspCb,
1357 * \ingroup grp_lib_nfc
1358 * \brief This function is used to to connect to a single Remote Device.
1360 * This function is called to connect to discovered target.
1361 * Once notification handler notified sucessfully discovered targets will be available in
1362 * \ref phLibNfc_RemoteDevList_t .Remote device list contains valid handles for discovered
1363 * targets .Using this interface LibNfc client can connect to one out of 'n' discovered targets.
1364 * A new session is started after connect operation is successful.The session ends with a
1365 * successful disconnect operation.Connect operation on an already connected tag Reactivates
1366 * the Tag.This Feature is not Valid for Jewel/Topaz Tags ,and hence a second connect if issued
1367 * without disconnecting a Jewel/Topaz tag always Fails.
1369 * \note :In case multiple targets discovered LibNfc client can connect to only one target.
1371 * \param[in] hRemoteDevice Handle of the target device obtained during discovery process.
1373 * \param[in] pNotifyConnect_RspCb Client response callback to be to be
1374 * notified to indicate status of the request.
1376 * \param[in] pContext Client context which will be included in
1377 * callback when the request is completed.
1379 *\retval NFCSTATUS_PENDING Request initiated, result will be informed via
1381 *\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
1382 * could not be properly interpreted.
1383 *\retval NFCSTATUS_TARGET_LOST Indicates target is lost.
1384 *\retval NFSCSTATUS_SHUTDOWN shutdown in progress.
1385 *\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
1386 *\retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
1388 *\retval NFCSTATUS_FAILED Request failed.
1392 *LibNfcClient,LibNfc;
1393 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1394 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
1395 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
1396 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1397 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
1398 *LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1399 *--- [label="Now Present Tag to be discovered"];
1400 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
1401 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
1402 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
1407 NFCSTATUS phLibNfc_RemoteDev_Connect(phLibNfc_Handle hRemoteDevice,
1408 pphLibNfc_ConnectCallback_t pNotifyConnect_RspCb,
1412 #ifdef RECONNECT_SUPPORT
1415 * \ingroup grp_lib_nfc
1416 * \brief This function is used to to connect to NEXT Remote Device.
1418 * This function is called only if there are more than one remote device is detected.
1419 * Once notification handler notified sucessfully discovered targets will be available in
1420 * \ref phLibNfc_RemoteDevList_t .Remote device list contains valid handles for discovered
1421 * targets .Using this interface LibNfc client can connect to one out of 'n' discovered targets.
1422 * A new session is started after connect operation is successful.
1423 * Similarly, if the user wants to connect to another handle. Libnfc client can select the handle and
1424 * the previously connected device is replaced by present handle. The session ends with a
1425 * successful disconnect operation.
1426 * Re-Connect operation on an already connected tag Reactivates the Tag. This Feature is not
1427 * Valid for Jewel/Topaz Tags ,and hence a second re-connect if issued
1428 * without disconnecting a Jewel/Topaz tag always Fails.
1430 * \note :In case multiple targets discovered LibNfc client can re-connect to only one target.
1432 * \param[in] hRemoteDevice Handle of the target device obtained during discovery process.
1434 * \param[in] pNotifyReConnect_RspCb Client response callback to be to be
1435 * notified to indicate status of the request.
1437 * \param[in] pContext Client context which will be included in
1438 * callback when the request is completed.
1440 *\retval NFCSTATUS_PENDING Request initiated, result will be informed via
1442 *\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
1443 * could not be properly interpreted.
1444 *\retval NFCSTATUS_TARGET_LOST Indicates target is lost.
1445 *\retval NFSCSTATUS_SHUTDOWN shutdown in progress.
1446 *\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
1447 *\retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
1449 *\retval NFCSTATUS_FAILED Request failed.
1453 *LibNfcClient,LibNfc;
1454 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1455 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
1456 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
1457 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1458 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
1459 *LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1460 *--- [label="Now Present multiple protocol Tag to be discovered"];
1461 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
1462 *--- [label="TWO remote device information is received, So connect with one handle"];
1463 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
1464 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
1465 *--- [label="Connect is successful, so transact using this handle. Now if user wants to switch to another handle then call Reconnect "];
1466 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_ReConnect()",URL="\ref phLibNfc_RemoteDev_ReConnect"];
1467 *LibNfcClient<-LibNfc [label="pNotifyReConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
1472 phLibNfc_RemoteDev_ReConnect (
1473 phLibNfc_Handle hRemoteDevice,
1474 pphLibNfc_ConnectCallback_t pNotifyReConnect_RspCb,
1477 #endif /* #ifdef RECONNECT_SUPPORT */
1480 * \ingroup grp_lib_nfc
1481 * \brief This interface allows to perform Read/write operation on remote device.
1483 * This function allows to send data to and receive data
1484 * from the target selected by libNfc client.It is also used by the
1485 * NFCIP1 Initiator while performing a transaction with the NFCIP1 target.
1486 * The LibNfc client has to provide the handle of the target and the
1487 * command in order to communicate with the selected remote device.
1490 *\param[in] hRemoteDevice handle of the remote device.This handle to be
1491 * same as as handle obtained for specific remote device
1492 * during device discovery.
1493 * \param[in] psTransceiveInfo Information required by transceive is concealed in
1494 * this structure.It contains send,receive buffers
1495 * and command specific details.
1498 * \param[in] pTransceive_RspCb Callback function for returning the received response
1500 * \param[in] pContext Client context which will be included in
1501 * callback when the request is completed.
1503 * \retval NFCSTATUS_PENDING Request initiated, result will be informed through
1505 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could
1506 * not be properly interpreted or invalid.
1507 * \retval NFCSTATUS_COMMAND_NOT_SUPPORTED The command is not supported.
1508 * \retval NFSCSTATUS_SHUTDOWN shutdown in progress.
1509 * \retval NFCSTATUS_TARGET_LOST Indicates target is lost.
1510 * \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
1511 * \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid
1512 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
1513 * \retval NFCSTATUS_REJECTED Indicates invalid request.
1514 * \retval NFCSTATUS_FAILED Request failed.
1517 *LibNfcClient,LibNfc;
1518 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1519 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
1520 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
1521 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1522 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
1523 *LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1524 *--- [label="Now Present Tag to be discovered"];
1525 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
1526 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
1527 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
1528 *--- [label="Now perform transceive operation"];
1529 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Transceive()",URL="\ref phLibNfc_RemoteDev_Transceive "];
1530 *LibNfcClient<-LibNfc [label="pTransceive_RspCb",URL="\ref pphLibNfc_TransceiveCallback_t"];
1535 NFCSTATUS phLibNfc_RemoteDev_Transceive(phLibNfc_Handle hRemoteDevice,
1536 phLibNfc_sTransceiveInfo_t* psTransceiveInfo,
1537 pphLibNfc_TransceiveCallback_t pTransceive_RspCb,
1542 *\ingroup grp_lib_nfc
1543 *\brief Allows to disconnect from already connected target.
1545 * The function allows to disconnect from from already connected target. This
1546 * function closes the session opened during connect operation.The status of discovery
1547 * wheel after disconnection is determined by the \ref phLibNfc_eReleaseType_t parameter.
1548 * it is also used to switch from wired to virtual mode in case the discovered
1549 * device is SmartMX in wired mode.
1551 *\param[in] hRemoteDevice handle of the target device.This handle to be
1552 * same as as handle obtained for specific remote device
1553 * during device discovery.
1554 * \param[in] ReleaseType Release mode to be used while
1555 * disconnecting from target.Refer \ref phLibNfc_eReleaseType_t
1556 * for possible release types.
1557 *\param[in] pDscntCallback Client response callback to be to be notified
1558 to indicate status of the request.
1559 * \param[in] pContext Client context which will be included in
1560 * callback when the request is completed.
1562 *\retval NFCSTATUS_PENDING Request initiated, result will be informed through
1564 *\retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could not be
1565 * properly interpreted.
1566 *\retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
1567 *\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
1568 * \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
1569 *\retval NFSCSTATUS_SHUTDOWN Shutdown in progress.
1570 *\retval NFCSTATUS_REJECTED Indicates previous disconnect in progress.
1571 * \retval NFCSTATUS_BUSY Indicates can not disconnect due to outstanding transaction in progress.
1572 * \retval NFCSTATUS_FAILED Request failed.
1578 *LibNfcClient,LibNfc;
1579 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1580 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
1581 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
1582 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1583 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
1584 *LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1585 *--- [label="Now Present Tag to be discovered"];
1586 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
1587 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
1588 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
1589 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Transceive()",URL="\ref phLibNfc_RemoteDev_Transceive"];
1590 *LibNfcClient<-LibNfc [label="pTransceive_RspCb",URL="\ref pphLibNfc_TransceiveCallback_t"];
1591 *--- [label="Once transceive is completed Now disconnect"];
1592 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Disconnect()",URL="\ref phLibNfc_RemoteDev_Disconnect"];
1593 *LibNfcClient<-LibNfc [label="pDscntCallback",URL="\ref pphLibNfc_RspCb_t"];
1597 NFCSTATUS phLibNfc_RemoteDev_Disconnect( phLibNfc_Handle hRemoteDevice,
1598 phLibNfc_eReleaseType_t ReleaseType,
1599 pphLibNfc_DisconnectCallback_t pDscntCallback,
1606 * \ingroup grp_lib_nfc
1607 *\brief This interface unregisters notification handler for target discovery.
1609 * This function unregisters the listener which has been registered with
1610 * phLibNfc_RemoteDev_NtfUnregister() before. After this call the callback
1611 * function won't be called anymore. If nothing is registered the
1612 * function still succeeds
1613 * \retval NFCSTATUS_SUCCESS callback unregistered.
1614 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
1615 *\retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
1618 *LibNfcClient,LibNfc;
1619 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1620 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
1621 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
1622 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1623 *--- [label="Perform operations"];
1624 *--- [label="In case required unregister now"];
1625 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfUnregister()",URL="\ref phLibNfc_RemoteDev_NtfUnregister"];
1630 NFCSTATUS phLibNfc_RemoteDev_NtfUnregister(void);
1633 * \ingroup grp_lib_nfc
1634 * \brief Check for target presence.
1635 * This function checks ,given target is present in RF filed or not.
1636 * Client can make use of this API to check periodically discovered
1637 * tag is present in RF field or not.
1640 *\param[in] hRemoteDevice handle of the target device.This handle to be
1641 * same as as handle obtained for specific remote device
1642 * during device discovery.
1643 * \param[in] pPresenceChk_RspCb callback function called on completion of the
1644 * presence check or in case an error has occurred.
1645 * \param[in] pContext Client context which will be included in
1646 * callback when the request is completed.
1648 * \retval NFCSTATUS_PENDING presence check started. Status will be notified
1651 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not initialized.
1652 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could
1653 * not be properly interpreted.
1654 * \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
1655 * \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid
1656 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
1657 * \retval NFCSTATUS_FAILED Request failed.
1661 *LibNfcClient,LibNfc;
1662 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1663 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
1664 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
1665 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1666 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
1667 *LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1668 *--- [label="Now Present Tag to be discovered"];
1669 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
1670 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
1671 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1672 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_CheckPresence()",URL="\ref phLibNfc_RemoteDev_CheckPresence"];
1673 *LibNfcClient<-LibNfc [label="pPresenceChk_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1677 *\note Response callback parameters details for this interface are as listed below.
1679 * \param[in] pContext LibNfc client context passed in the corresponding request before.
1680 * \param[in] status Status of the response callback.
1682 * \param NFCSTATUS_SUCCESS Successful,indicates tag is present in RF field.
1683 * \param NFCSTATUS_TARGET_LOST Indicates target is lost.
1684 * \param NFCSTATUS_SHUTDOWN Shutdown in progress.
1685 * \param NFCSTATUS_FAILED Request failed.
1688 NFCSTATUS phLibNfc_RemoteDev_CheckPresence( phLibNfc_Handle hRemoteDevice,
1689 pphLibNfc_RspCb_t pPresenceChk_RspCb,
1694 * \ingroup grp_lib_nfc
1695 *\brief Allows to check connected tag is NDEF compliant or not.
1696 * This function allows to validate connected tag is NDEF compliant or not.
1698 *\param[in] hRemoteDevice handle of the remote device.This handle to be
1699 * same as as handle obtained for specific remote device
1700 * during device discovery.
1701 *\param[in] pCheckNdef_RspCb Response callback defined by the caller.
1702 *\param[in] pContext Client context which will be included in
1703 * callback when the request is completed.
1705 * \retval NFCSTATUS_PENDING The action has been successfully triggered.
1706 * \retval NFCSTATUS_INVALID_PARAMETER At least one parameter of the function
1708 * \retval NFCSTATUS_TARGET_LOST Indicates target is lost
1709 * \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
1710 * \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid
1711 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
1712 * \retval NFCSTATUS_FAILED Request failed.
1716 *LibNfcClient,LibNfc;
1717 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1718 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
1719 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
1720 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1721 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
1722 *LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1723 *--- [label="Now Present NDEF complaint Tag Type"];
1724 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
1725 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
1726 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1727 *LibNfcClient=>LibNfc [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
1728 *LibNfcClient<-LibNfc [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1732 *\note Response callback parameters details for this interface are as listed below.
1734 * \param[in] pContext LibNfc client context passed in the corresponding request before.
1735 * \param[in] status Status of the response callback.
1737 * \param NFCSTATUS_SUCCESS Successful and tag is NDEF compliant .
1738 * \param NFCSTATUS_TARGET_LOST NDEF check operation is failed because of target is ** lost.
1739 * \param NFCSTATUS_SHUTDOWN Shutdown in progress.
1740 * \param NFCSTATUS_ABORTED Aborted due to disconnect operation in between.
1741 * \param NFCSTATUS_FAILED Request failed.
1744 NFCSTATUS phLibNfc_Ndef_CheckNdef(phLibNfc_Handle hRemoteDevice,
1745 pphLibNfc_ChkNdefRspCb_t pCheckNdef_RspCb,
1749 * \ingroup grp_lib_nfc
1750 * \brief Read NDEF message from a Tag.
1751 * This function reads an NDEF message from already connected tag.
1752 * the NDEF message is read starting after the position of the last read operation
1753 * of the same tag during current session.
1754 * If it's FALSE the NDEF message is read from starting of the NDEF message.
1755 * If the call returns with NFCSTATUS_PENDING , a response callback pNdefRead_RspCb is
1756 * called ,when the read operation is complete.
1758 *\note Before issuing NDEF read operation LibNfc client should perform NDEF check operation
1759 * using \ref phLibNfc_Ndef_CheckNdef interface.
1760 * If the call back error code is NFCSTATUS_FAILED then the LIBNFC client has to do the
1761 * phLibNfc_RemoteDev_CheckPresence to find , its communication error or target lost.
1763 *\param[in] hRemoteDevice handle of the remote device.This handle to be
1764 * same as as handle obtained for specific remote device
1765 * during device discovery.
1766 * \param[in] psRd Pointer to the read buffer info.
1767 * \param[in] Offset Reading Offset : phLibNfc_Ndef_EBegin means from the
1768 * beginning, phLibNfc_Ndef_ECurrent means from the
1770 * \param[in] pNdefRead_RspCb Response callback defined by the caller.
1771 * \param[in] pContext Client context which will be included in
1772 * callback when the request is completed.
1774 * \retval NFCSTATUS_SUCCESS NDEF read operation successful.
1775 * \retval NFCSTATUS_PENDING Request accepted and started
1776 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress
1777 * \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid
1778 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
1779 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could not
1780 * be properly interpreted.
1781 * \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
1782 * \retval NFCSTATUS_FAILED Read operation failed since tag does not contain NDEF data.
1783 * \retval NFCSTATUS_NON_NDEF_COMPLIANT Tag is not Ndef Compliant.
1784 * \param NFCSTATUS_REJECTED Rejected due to NDEF read issued on non
1785 * ,or Ndef check has not been performed
1786 * before the readNDEF tag.
1789 *LibNfcClient,LibNfc;
1790 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1791 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
1792 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
1793 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1794 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
1795 *LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1796 *--- [label="Now Present NDEF complaint Tag Type"];
1797 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
1798 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
1799 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1800 *LibNfcClient=>LibNfc [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
1801 *LibNfcClient<-LibNfc [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1802 *LibNfcClient=>LibNfc [label="phLibNfc_Ndef_Read()",URL="\ref phLibNfc_Ndef_Read "];
1803 *LibNfcClient<-LibNfc [label="pNdefRead_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1807 *\note Response callback parameters details for this interface are as listed below.
1809 * \param[in] pContext LibNfc client context passed in the corresponding request before.
1810 * \param[in] status Status of the response callback.
1812 * \param NFCSTATUS_SUCCESS NDEF read operation successful.
1813 * \param NFCSTATUS_SHUTDOWN Shutdown in progress.
1814 * \param NFCSTATUS_ABORTED Aborted due to disconnect operation in between.
1815 * \param NFCSTATUS_FAILED Request failed.
1817 NFCSTATUS phLibNfc_Ndef_Read(phLibNfc_Handle hRemoteDevice,
1818 phNfc_sData_t* psRd,
1819 phLibNfc_Ndef_EOffset_t Offset,
1820 pphLibNfc_RspCb_t pNdefRead_RspCb,
1824 ** \ingroup grp_lib_nfc
1826 * \brief Write NDEF data to NFC tag.
1828 * This function allows the client to write a NDEF data to already connected NFC tag.
1829 * Function writes a complete NDEF message to a tag. If a NDEF message already
1830 * exists in the tag, it will be overwritten. When the transaction is complete,
1831 * a notification callback is notified.
1833 *\note Before issuing NDEF write operation LibNfc client should perform NDEF check operation
1834 * using \ref phLibNfc_Ndef_CheckNdef interface.
1836 *\param[in] hRemoteDevice handle of the remote device.This handle to be
1837 * same as as handle obtained for specific remote device
1838 * during device discovery.
1839 *\param[in] psWr Ndef Buffer to write. If NdefMessageLen is set to 0
1840 * and pNdefMessage = NULL, the NFC library will erase
1842 *\param[in] pNdefWrite_RspCb Response callback defined by the caller.
1843 *\param[in] pContext Client context which will be included in
1844 * callback when the request is completed.
1846 *\note If \ref phNfc_sData_t.NdefMessageLen is 0 bytes, this function will erase all
1847 *current NDEF data present in the tag. Any non-zero length buffer size
1848 *will attempt to write NEDF data onto the tag.
1849 * If the call back error code is NFCSTATUS_FAILED then the LIBNFC client has to do the
1850 * phLibNfc_RemoteDev_CheckPresence to find , its communication error or target lost.
1853 * \retval NFCSTATUS_PENDING Request accepted and started.
1854 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
1855 * \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
1856 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
1857 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could not
1858 * be properly interpreted.
1859 * \retval NFCSTATUS_NON_NDEF_COMPLIANT Tag is not Ndef Compliant.
1860 * \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
1861 * \retval NFCSTATUS_REJECTED Rejected due to NDEF write issued without
1862 * performing a CheckNdef().
1863 * \retval NFCSTATUS_FAILED operation failed.
1866 *LibNfcClient,LibNfc;
1867 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1868 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
1869 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
1870 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1871 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
1872 *LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1873 *--- [label="Now Present NDEF Tag "];
1874 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
1875 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
1876 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1877 *LibNfcClient=>LibNfc [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
1878 *LibNfcClient<-LibNfc [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1879 *LibNfcClient=>LibNfc [label="phLibNfc_Ndef_Write()",URL="\ref phLibNfc_Ndef_Write "];
1880 *LibNfcClient<-LibNfc [label="pNdefWrite_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1884 *\note Response callback parameters details for this interface are as listed below.
1886 * \param[in] pContext LibNfc client context passed in the corresponding request before.
1887 * \param[in] status Status of the response callback.
1889 * \param NFCSTATUS_SUCCESS NDEF write operation is successful.
1890 * \param NFCSTATUS_SHUTDOWN Shutdown in progress.
1891 * \param NFCSTATUS_ABORTED, Aborted due to disconnect operation in between.
1892 * \param NFCSTATUS_NOT_ENOUGH_MEMORY Requested no of bytes to be writen exceeds size of the memory available on the tag.
1893 * \param NFCSTATUS_FAILED Request failed.
1896 NFCSTATUS phLibNfc_Ndef_Write (phLibNfc_Handle hRemoteDevice,
1897 phNfc_sData_t* psWr,
1898 pphLibNfc_RspCb_t pNdefWrite_RspCb,
1905 * \ingroup grp_lib_nfc
1907 * \brief Format target.
1909 * This function allows the LibNfc client to perform NDEF formating operation on discovered target.
1910 This function formats given target
1913 * <br>1. Prior to formating it is recommended to perform NDEF check using \ref phLibNfc_Ndef_CheckNdef interface.
1914 * <br>2. formatting feature supported only for MIFARE Std,MIFARE UL and Desfire tag types.
1915 * If the call back error code is NFCSTATUS_FAILED then the LIBNFC client has to do the
1916 * phLibNfc_RemoteDev_CheckPresence to find , its communication error or target lost.
1918 *\param[in] hRemoteDevice handle of the remote device.This handle to be
1919 * same as as handle obtained for specific remote device
1920 * during device discovery.
1921 *\param[in] pScrtKey info containing the secret key data
1922 * and Secret key buffer length.
1924 *\param[in] pNdefformat_RspCb Response callback defined by the caller.
1925 *\param[in] pContext Client context which will be included in
1926 * callback when the request is completed.
1929 * \retval NFCSTATUS_PENDING Request accepted and started.
1930 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
1931 * \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
1932 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
1933 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could not
1934 * be properly interpreted.
1935 * \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
1936 * \retval NFCSTATUS_FAILED operation failed.
1937 * \retval NFCSTATUS_REJECTED Tag is already formatted one.
1940 *LibNfcClient,LibNfc;
1941 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
1942 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
1943 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
1944 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
1945 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
1946 *LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1947 *--- [label="Now Present non NDEF Tag "];
1948 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
1949 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
1950 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1951 *LibNfcClient=>LibNfc [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
1952 *LibNfcClient<-LibNfc [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1953 *--- [label="Tag found to be non NDEF compliant ,now format it"];
1954 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_FormatNdef()",URL="\ref phLibNfc_RemoteDev_FormatNdef "];
1955 *LibNfcClient<-LibNfc [label="pNdefformat_RspCb",URL="\ref pphLibNfc_RspCb_t"];
1959 *\note Response callback parameters details for this interface are as listed below.
1961 * \param[in] pContext LibNfc client context passed in the corresponding request before.
1962 * \param[in] status Status of the response callback.
1964 * \param NFCSTATUS_SUCCESS NDEF formatting operation is successful.
1965 * \param NFCSTATUS_SHUTDOWN Shutdown in progress.
1966 * \param NFCSTATUS_ABORTED, Aborted due to disconnect operation in between.
1967 * \param NFCSTATUS_FAILED Request failed.
1970 NFCSTATUS phLibNfc_RemoteDev_FormatNdef(phLibNfc_Handle hRemoteDevice,
1971 phNfc_sData_t* pScrtKey,
1972 pphLibNfc_RspCb_t pNdefformat_RspCb,
1976 #ifdef LIBNFC_READONLY_NDEF
1978 * \ingroup grp_lib_nfc
1980 * \brief To convert a already formatted NDEF READ WRITE tag to READ ONLY.
1982 * This function allows the LibNfc client to convert a already formatted NDEF READ WRITE
1983 * tag to READ ONLY on discovered target.
1986 * <br>1. Prior to formating it is recommended to perform NDEF check using \ref phLibNfc_Ndef_CheckNdef interface.
1987 * <br>2. READ ONLY feature supported only for MIFARE UL and Desfire tag types.
1988 * If the call back error code is NFCSTATUS_FAILED then the LIBNFC client has to do the
1989 * phLibNfc_RemoteDev_CheckPresence to find, its communication error or target lost.
1991 *\param[in] hRemoteDevice handle of the remote device.This handle to be
1992 * same as as handle obtained for specific remote device
1993 * during device discovery.
1994 *\param[in] pNdefReadOnly_RspCb Response callback defined by the caller.
1995 *\param[in] pContext Client context which will be included in
1996 * callback when the request is completed.
1999 * \retval NFCSTATUS_PENDING Request accepted and started.
2000 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2001 * \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
2002 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2003 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could not
2004 * be properly interpreted.
2005 * \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
2006 * \retval NFCSTATUS_FAILED operation failed.
2007 * \retval NFCSTATUS_REJECTED Tag is already formatted one.
2010 *LibNfcClient,LibNfc;
2011 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
2012 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
2013 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
2014 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
2015 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
2016 *LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
2017 *--- [label="Now Present NDEF Tag "];
2018 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
2019 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
2020 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
2021 *LibNfcClient=>LibNfc [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
2022 *LibNfcClient<-LibNfc [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
2023 *--- [label="Tag found to be NDEF compliant ,now convert the tag to read only"];
2024 *LibNfcClient=>LibNfc [label="phLibNfc_ConvertToReadOnlyNdef()",URL="\ref phLibNfc_ConvertToReadOnlyNdef "];
2025 *LibNfcClient<-LibNfc [label="pNdefReadOnly_RspCb",URL="\ref pphLibNfc_RspCb_t"];
2029 *\note Response callback parameters details for this interface are as listed below.
2031 * \param[in] pContext LibNfc client context passed in the corresponding request before.
2032 * \param[in] status Status of the response callback.
2034 * \param NFCSTATUS_SUCCESS Converting the tag to READ ONLY NDEF is successful.
2035 * \param NFCSTATUS_SHUTDOWN Shutdown in progress.
2036 * \param NFCSTATUS_ABORTED, Aborted due to disconnect operation in between.
2037 * \param NFCSTATUS_FAILED Request failed.
2040 NFCSTATUS phLibNfc_ConvertToReadOnlyNdef (phLibNfc_Handle hRemoteDevice,
2041 pphLibNfc_RspCb_t pNdefReadOnly_RspCb,
2044 #endif /* #ifdef LIBNFC_READONLY_NDEF */
2047 * \ingroup grp_lib_nfc
2048 * \brief <b>Search for NDEF Record type</b>.
2050 * This function allows LibNfc client to search NDEF content based on TNF value and type \n
2052 *This API allows to find NDEF records based on RTD (Record Type Descriptor) info.
2053 *LibNfc internally parses NDEF content based registration type registered.
2054 *In case there is match LibNfc notifies LibNfc client with NDEF information details.
2055 *LibNfc client can search a new NDEF registration type once the previous call is handled.
2057 *\param[in] hRemoteDevice Handle of the remote device.This handle to be
2058 * same as as handle obtained for specific remote device
2059 * during device discovery.
2060 *\param[in] psSrchTypeList List of NDEF records to be looked in based on TNF value and type.
2061 * For NDEF search type refer to \ref phLibNfc_Ndef_SrchType.
2062 * If this set to NULL then it means that libNfc client interested in
2063 * all possible NDEF records.
2065 *\param[in] uNoSrchRecords Indicates no of NDEF records in requested list as mentioned
2066 * in psSrchTypeList.
2067 *\param[in] pNdefNtfRspCb Response callback defined by the caller.
2068 *\param[in] pContext Client context which will be included in
2069 * callback when callback is notified.
2072 * \retval NFCSTATUS_SUCCESS Indicates NDEF notification registration successful.
2073 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2074 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2075 * \retval NFCSTATUS_INVALID_HANDLE Target handle is invalid.
2076 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters could not
2077 * be properly interpreted.
2078 * \retval NFCSTATUS_TARGET_NOT_CONNECTED The Remote Device is not connected.
2079 * \retval NFCSTATUS_FAILED operation failed.
2080 * \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
2082 * \retval NFCSTATUS_ABORTED Aborted due to disconnect request in between.
2084 *LibNfcClient,LibNfc;
2085 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
2086 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
2087 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
2088 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
2089 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_configureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
2090 *LibNfcClient<-LibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
2091 *--- [label="Now Present NDEF Tag "];
2092 *LibNfcClient<-LibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
2093 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
2094 *LibNfcClient<-LibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_RspCb_t"];
2095 *LibNfcClient=>LibNfc [label="phLibNfc_Ndef_CheckNdef()",URL="\ref phLibNfc_Ndef_CheckNdef "];
2096 *LibNfcClient<-LibNfc [label="pCheckNdef_RspCb",URL="\ref pphLibNfc_RspCb_t"];
2097 *LibNfcClient=>LibNfc [label="phLibNfc_Ndef_SearchNdefContent()",URL="\ref phLibNfc_Ndef_SearchNdefContent"];
2098 *LibNfcClient<-LibNfc [label="pNdefNtfRspCb",URL="\ref pphLibNfc_Ndef_Search_RspCb_t()"];
2101 *\note Response callback parameters details for this interface are as listed below.
2103 * \param[in] pContext LibNfc client context passed in the corresponding request before.
2104 * \param[in] status Status of the response callback.
2107 NFCSTATUS phLibNfc_Ndef_SearchNdefContent(
2108 phLibNfc_Handle hRemoteDevice,
2109 phLibNfc_Ndef_SrchType_t* psSrchTypeList,
2110 uint8_t uNoSrchRecords,
2111 pphLibNfc_Ndef_Search_RspCb_t pNdefNtfRspCb,
2119 * \ingroup grp_lib_nfc
2120 * \brief <b> Interface used to receive data from initiator at target side during P2P communication</b>.
2122 *This function Allows the NFC-IP1 target to retrieve data/commands coming from the
2123 *Initiator.Once this function is called by LibNfc client on target side it waits for
2124 *receiving data from initiator.It is used by libNfc client which acts as target during P2P
2127 *\note : Once this API is called,its mandatory to wait for receive
2128 *\ref pphLibNfc_Receive_RspCb_t callback notification,before calling any other
2129 *API.Only function allowed is \ref phLibNfc_Mgt_DeInitialize.
2131 * \param[in] hRemoteDevice Peer handle obtained during device discovery process.
2133 * \param[in] pReceiveRspCb Callback function called after receiving
2134 * the data or in case an error has
2137 * \param[in] pContext Upper layer context to be returned
2140 * \retval NFCSTATUS_PENDING Receive operation is in progress.
2141 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2142 * could not be properly interpreted.
2143 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2144 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2145 * \retval NFCSTATUS_INVALID_DEVICE The device has been disconnected meanwhile.
2146 * \retval NFCSTATUS_DESELECTED Receive operation is not possible due to
2147 * initiator issued disconnect or intiator
2148 * physically removed from the RF field.
2150 *\retval NFCSTATUS_REJECTED Indicates invalid request.
2151 *\retval NFCSTATUS_FAILED Request failed.
2154 *P2PInitiatorClient,InitiatorLibNfc,P2PTargetLibNfc,P2PTargetClient;
2155 *--- [label="stack is intialised and P2P notification handler registered alredy"];
2156 *P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref phLibNfc_Mgt_SetP2P_ConfigParams"];
2157 *P2PTargetClient<<P2PTargetLibNfc [label="NFCSTATUS_PENDING"];
2158 *P2PTargetClient<-P2PTargetLibNfc [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
2159 *P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref phLibNfc_Mgt_SetP2P_ConfigParams"];
2160 *P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
2161 *P2PInitiatorClient<-InitiatorLibNfc [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
2162 *P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
2163 *P2PTargetClient<<P2PTargetLibNfc [label="NFCSTATUS_PENDING"];
2164 *P2PTargetClient<-P2PTargetLibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
2165 *P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
2166 *P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
2167 *P2PInitiatorClient<-InitiatorLibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
2168 *--- [label="Place Initiator and target closely"];
2169 *P2PInitiatorClient<-InitiatorLibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
2170 *P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
2171 *P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
2172 *P2PInitiatorClient<-InitiatorLibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
2173 *P2PTargetClient<-P2PTargetLibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
2174 *--- [label="On connect target must be immediately ready to receive data from initiator"];
2175 *P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_RemoteDev_Receive()",URL="\ref phLibNfc_RemoteDev_Receive"];
2176 *--- [label="Now target waits to receive data from intiator"];
2177 *--- [label="Send data from initiator now"];
2178 *P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_RemoteDev_Transceive()",URL="\ref phLibNfc_RemoteDev_Transceive "];
2179 *P2PInitiatorClient<-InitiatorLibNfc [label="pTransceive_RspCb",URL="\ref pphLibNfc_TransceiveCallback_t"];
2180 *--- [label="Now data arrived at target side"];
2181 *P2PTargetClient<-P2PTargetLibNfc [label="pReceiveRspCb",URL="\ref pphLibNfc_Receive_RspCb_t"];
2183 *\note Response callback parameters details for this interface are as listed below.
2185 * \param[in] pContext LibNfc client context passed in the corresponding request before.
2186 * \param[in] status Status of the response callback.
2188 * \param NFCSTATUS_SUCCESS Receive operation successful.
2189 * \param NFCSTATUS_SHUTDOWN Receive operation failed because Shutdown in progress.
2190 * \param NFCSTATUS_ABORTED Aborted due to initiator issued disconnect request.
2191 * or intiator removed physically from the RF field.
2192 * This status code reported,to indicate P2P session
2193 * closed and send and receive requests not allowed
2194 * any more unless new session is started.
2195 * \param NFCSTATUS_DESELECTED Receive operation is not possible due to
2196 * initiator issued disconnect or intiator
2197 * physically removed from the RF field.
2201 phLibNfc_RemoteDev_Receive( phLibNfc_Handle hRemoteDevice,
2202 pphLibNfc_Receive_RspCb_t pReceiveRspCb,
2211 * \ingroup grp_lib_nfc
2212 * \brief <b>Interface used to send data from target to initiator during P2P communication</b>.
2214 *This function Allows the NFC-IP1 target to send data to Initiator,in response to packet received
2215 *from initiator during P2P communication.It is must prior to send request target has received
2216 *data from initiator using \ref phLibNfc_RemoteDev_Receive interface.
2219 * \param[in] hRemoteDevice Peer handle obtained during device discovery process.
2221 * \param[in] pTransferData Data and the length of the data to be
2223 * \param[in] pSendRspCb Callback function called on completion
2224 * of the NfcIP sequence or in case an
2225 * error has occurred.
2227 * \param[in] pContext Upper layer context to be returned in
2230 ** \retval NFCSTATUS_PENDING Send operation is in progress.
2231 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2232 * could not be properly interpreted.
2233 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2234 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2235 * \retval NFCSTATUS_INVALID_DEVICE The device has been disconnected meanwhile.
2236 * \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
2237 * \retval NFCSTATUS_DESELECTED Receive operation is not possible due to
2238 * initiator issued disconnect or intiator
2239 * physically removed from the RF field.
2240 *\retval NFCSTATUS_REJECTED Indicates invalid request.
2241 *\retval NFCSTATUS_FAILED Request failed.
2244 *P2PInitiatorClient,InitiatorLibNfc,P2PTargetLibNfc,P2PTargetClient;
2245 *--- [label="stack is intialised and P2P notification handler registered alredy"];
2246 *P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref phLibNfc_Mgt_SetP2P_ConfigParams"];
2247 *P2PTargetClient<<P2PTargetLibNfc [label="NFCSTATUS_PENDING"];
2248 *P2PTargetClient<-P2PTargetLibNfc [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
2249 *P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref phLibNfc_Mgt_SetP2P_ConfigParams"];
2250 *P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
2251 *P2PInitiatorClient<-InitiatorLibNfc [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
2252 *P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
2253 *P2PTargetClient<<P2PTargetLibNfc [label="NFCSTATUS_PENDING"];
2254 *P2PTargetClient<-P2PTargetLibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
2255 *P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
2256 *P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
2257 *P2PInitiatorClient<-InitiatorLibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
2258 *--- [label="Place Initiator and target closely"];
2259 *P2PInitiatorClient<-InitiatorLibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
2260 *P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
2261 *P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
2262 *P2PInitiatorClient<-InitiatorLibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
2263 *P2PTargetClient<-P2PTargetLibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
2264 *--- [label="On connect target must be immediately ready to receive data from initiator"];
2265 *P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_RemoteDev_Receive()",URL="\ref phLibNfc_RemoteDev_Receive"];
2266 *--- [label="Now target waits to receive data from intiator"];
2267 *--- [label="Send data from initiator now"];
2268 *P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_RemoteDev_Transceive()",URL="\ref phLibNfc_RemoteDev_Transceive "];
2269 *--- [label="Now data arrived at target side"];
2270 *P2PTargetClient<-P2PTargetLibNfc [label="pReceiveRspCb",URL="\ref pphLibNfc_Receive_RspCb_t"];
2271 *--- [label="Now send data from target"];
2272 *P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_RemoteDev_Send()",URL="\ref phLibNfc_RemoteDev_Send"];
2273 *P2PInitiatorClient<-InitiatorLibNfc [label="pTransceive_RspCb",URL="\ref pphLibNfc_TransceiveCallback_t"];
2274 *P2PTargetClient<-P2PTargetLibNfc [label="pSendRspCb",URL="\ref pphLibNfc_RspCb_t"];
2277 *\note Response callback parameters details for this interface are as listed below.
2279 * \param[in] pContext LibNfc client context passed in the corresponding request before.
2280 * \param[in] status Status of the response callback.
2282 * \param NFCSTATUS_SUCCESS Send operation successful.
2283 * \param NFCSTATUS_SHUTDOWN Send operation failed because Shutdown in progress.
2284 * \param NFCSTATUS_ABORTED Aborted due to initiator issued disconnect request.
2285 * or intiator removed physically from the RF field.
2286 * This status code reported,to indicate P2P session
2287 * closed and send and receive requests not allowed
2288 * any more unless new session is started.
2289 * \param NFCSTATUS_DESELECTED Receive operation is not possible due to
2290 * initiator issued disconnect or intiator
2291 * physically removed from the RF field.
2297 phLibNfc_RemoteDev_Send(phLibNfc_Handle hRemoteDevice,
2298 phNfc_sData_t* pTransferData,
2299 pphLibNfc_RspCb_t pSendRspCb,
2304 * \ingroup grp_lib_nfc
2305 * \brief <b>Interface to configure P2P and intiator mode configurations</b>.
2306 * The setting will be typically take effect for the next cycle of the relevant
2307 * phase of discovery. For optional configuration internal defaults will be
2308 * used in case the configuration is not set.
2310 *\note Currently general bytes configuration supported.
2312 * \param[in] pConfigInfo Union containing P2P configuration details as
2313 * in \ref phLibNfc_sNfcIPCfg_t.
2315 * \param[in] pConfigRspCb This callback has to be called once LibNfc
2316 * completes the Configuration.
2318 * \param[in] pContext Upper layer context to be returned in
2322 * \retval NFCSTATUS_PENDING Config operation is in progress.
2323 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2324 * could not be properly interpreted.
2325 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2326 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2327 * \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
2330 *P2PInitiatorClient,InitiatorLibNfc,P2PTargetLibNfc,P2PTargetClient;
2331 *--- [label="stack is intialised and P2P notification handler registered alredy"];
2332 *P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref phLibNfc_Mgt_SetP2P_ConfigParams"];
2333 *P2PTargetClient<<P2PTargetLibNfc [label="NFCSTATUS_PENDING"];
2334 *P2PTargetClient<-P2PTargetLibNfc [label="pConfigRspCb()",URL="\ref pphLibNfc_RspCb_t"];
2335 *P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_Mgt_SetP2P_ConfigParams()",URL="\ref phLibNfc_Mgt_SetP2P_ConfigParams"];
2336 *P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
2337 *P2PTargetClient=>P2PTargetLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
2338 *P2PTargetClient<<P2PTargetLibNfc [label="NFCSTATUS_PENDING"];
2339 *P2PTargetClient<-P2PTargetLibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
2340 *P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_Mgt_ConfigureDiscovery()",URL="\ref phLibNfc_Mgt_ConfigureDiscovery"];
2341 *P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
2342 *P2PInitiatorClient<-InitiatorLibNfc [label="pConfigDiscovery_RspCb",URL="\ref pphLibNfc_RspCb_t"];
2343 *--- [label="Place Initiator and target closely"];
2344 *P2PInitiatorClient<-InitiatorLibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
2345 *P2PInitiatorClient=>InitiatorLibNfc [label="phLibNfc_RemoteDev_Connect()",URL="\ref phLibNfc_RemoteDev_Connect"];
2346 *P2PInitiatorClient<<InitiatorLibNfc [label="NFCSTATUS_PENDING"];
2347 *P2PInitiatorClient<-InitiatorLibNfc [label="pNotifyConnect_RspCb",URL="\ref pphLibNfc_ConnectCallback_t"];
2348 *P2PTargetClient<-P2PTargetLibNfc [label="pNotificationHandler",URL="\ref phLibNfc_NtfRegister_RspCb_t"];
2349 *--- [label="Now configured params ( Ex : general bytes can been seen in remote device info"];
2352 *\note Response callback parameters details for this interface are as listed below.
2354 * \param[in] pContext LibNfc client context passed in the corresponding request before.
2355 * \param[in] status Status of the response callback.
2357 * \param NFCSTATUS_SUCCESS configuration operation is successful.
2358 * \param NFCSTATUS_SHUTDOWN Shutdown in progress.
2359 * \param NFCSTATUS_FAILED Request failed.
2362 extern NFCSTATUS phLibNfc_Mgt_SetP2P_ConfigParams( phLibNfc_sNfcIPCfg_t* pConfigInfo,
2363 pphLibNfc_RspCb_t pConfigRspCb,
2368 * \ingroup grp_lib_nfc
2369 * \brief <b>Interface to stack capabilities</b>.
2371 * LibNfc client can query to retrieve stack capabilities.Stack capabilities contains
2372 * <br><br>a).Device capabilities which contains details like protocols supported,
2373 * Hardware,Firmware and model-id version details .For details refer to \ref phNfc_sDeviceCapabilities_t.
2374 * <br><br>b).NDEF mapping related info. This info helps in identifying supported tags for NDEF mapping feature.
2375 * <br><br>c).NDEF formatting related info. This info helps in identifying supported tags for NDEF formatting feature.
2377 * \param[in] phLibNfc_StackCapabilities Contains device capabilities and NDEF mapping and formatting feature
2378 support for different tag types.
2380 * \param[in] pContext Upper layer context to be returned in
2384 * \retval NFCSTATUS_SUCCESS Indicates Get stack Capabilities operation successful.
2385 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2386 * could not be properly interpreted.
2387 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2388 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2389 * \retval NFCSTATUS_FAILED operation failed.
2390 * \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
2394 *LibNfcClient,LibNfc;
2395 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_Initialize()",URL="\ref phLibNfc_Mgt_Initialize"];
2396 *LibNfcClient<-LibNfc [label="pInitCb()",URL="\ref pphLibNfc_RspCb_t()"];
2397 *LibNfcClient=>LibNfc [label="phLibNfc_RemoteDev_NtfRegister()",URL="\ref phLibNfc_RemoteDev_NtfRegister"];
2398 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
2399 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_GetstackCapabilities()",URL="\ref phLibNfc_Mgt_GetstackCapabilities"];
2400 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
2401 *--- [label="Now stack capabilities available "];
2406 extern NFCSTATUS phLibNfc_Mgt_GetstackCapabilities(phLibNfc_StackCapabilities_t* phLibNfc_StackCapabilities,
2412 * \ingroup grp_lib_nfcHW_
2413 * \brief <b>Interface to configure local LLCP peer</b>.
2415 * This function configures the parameters of the local LLCP peer. This function must be called
2416 * before any other LLCP-related function from this API.
2418 * \param[in] pConfigInfo Contains local LLCP link parameters to be applied
2419 * \param[in] pConfigRspCb This callback has to be called once LibNfc
2420 * completes the Configuration.
2421 * \param[in] pContext Upper layer context to be returned in
2425 * \retval NFCSTATUS_SUCCESS Operation successful.
2426 * \retval NFCSTATUS_PENDING Configuration operation is in progress,
2427 pConfigRspCb will be called upon completion.
2428 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2429 * could not be properly interpreted.
2430 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2431 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2432 * \retval NFCSTATUS_FAILED Operation failed.
2433 * \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
2435 extern NFCSTATUS phLibNfc_Mgt_SetLlcp_ConfigParams( phLibNfc_Llcp_sLinkParameters_t* pConfigInfo,
2436 pphLibNfc_RspCb_t pConfigRspCb,
2442 * \ingroup grp_lib_nfc
2443 * \brief <b>Checks if a remote peer is LLCP compliant</b>.
2445 * This functions allows to check if a previously detected tag is compliant with the
2446 * LLCP protocol. This step is needed before calling any other LLCP-related function on
2447 * this remote peer, except local LLCP peer configurationn, which is more general. Once
2448 * this checking is done, the caller will be able to receive link status notifications
2449 * until the peer is disconnected.
2451 * \param[in] hRemoteDevice Peer handle obtained during device discovery process.
2452 * \param[in] pCheckLlcp_RspCb The callback to be called once LibNfc
2453 * completes the LLCP compliancy check.
2454 * \param[in] pLink_Cb The callback to be called each time the
2455 * LLCP link status changes.
2456 * \param[in] pContext Upper layer context to be returned in
2460 * \retval NFCSTATUS_SUCCESS Operation successful.
2461 * \retval NFCSTATUS_PENDING Check operation is in progress, pCheckLlcp_RspCb will
2462 * be called upon completion.
2463 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2464 * could not be properly interpreted.
2465 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2466 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2467 * \retval NFCSTATUS_FAILED Operation failed.
2468 * \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
2470 extern NFCSTATUS phLibNfc_Llcp_CheckLlcp( phLibNfc_Handle hRemoteDevice,
2471 pphLibNfc_ChkLlcpRspCb_t pCheckLlcp_RspCb,
2472 pphLibNfc_LlcpLinkStatusCb_t pLink_Cb,
2478 * \ingroup grp_lib_nfc
2479 * \brief <b>Activates a LLCP link with a remote device </b>.
2481 * This function launches the link activation process on a remote LLCP-compliant peer. The link status
2482 * notification will be sent by the corresponding callback given in the phLibNfc_Llcp_CheckLlcp function.
2483 * If the activation fails, the deactivated status will be notified, even if the link is already in a
2484 * deactivated state.
2486 * \param[in] hRemoteDevice Peer handle obtained during device discovery process.
2488 * \retval NFCSTATUS_SUCCESS Operation successful.
2489 * \retval NFCSTATUS_PENDING Activation operation is in progress,
2490 pLink_Cb will be called upon completion.
2491 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2492 * could not be properly interpreted.
2493 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2494 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2495 * \retval NFCSTATUS_FAILED Operation failed.
2496 * \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
2498 extern NFCSTATUS phLibNfc_Llcp_Activate( phLibNfc_Handle hRemoteDevice );
2502 * \ingroup grp_lib_nfc
2503 * \brief <b>Deactivate a previously activated LLCP link with a remote device</b>.
2505 * This function launches the link deactivation process on a remote LLCP-compliant peer. The link status
2506 * notification will be sent by the corresponding callback given in the phLibNfc_Llcp_CheckLlcp function.
2508 * \param[in] hRemoteDevice Peer handle obtained during device discovery process.
2510 * \retval NFCSTATUS_SUCCESS Operation successful.
2511 * \retval NFCSTATUS_PENDING Deactivation operation is in progress,
2512 pLink_Cb will be called upon completion.
2513 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2514 * could not be properly interpreted.
2515 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2516 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2517 * \retval NFCSTATUS_FAILED Operation failed.
2518 * \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
2520 extern NFCSTATUS phLibNfc_Llcp_Deactivate( phLibNfc_Handle hRemoteDevice );
2524 * \ingroup grp_lib_nfc
2525 * \brief <b>Get information on the local LLCP peer</b>.
2527 * This function returns the LLCP link parameters of the local peer that were used
2528 * during the link activation.
2530 * \param[in] hRemoteDevice Peer handle obtained during device discovery process.
2531 * \param[out] pConfigInfo Pointer on the variable to be filled with the configuration
2532 parameters used during activation.
2534 * \retval NFCSTATUS_SUCCESS Operation successful.
2535 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2536 * could not be properly interpreted.
2537 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2538 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2539 * \retval NFCSTATUS_FAILED Operation failed.
2540 * \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
2542 extern NFCSTATUS phLibNfc_Llcp_GetLocalInfo( phLibNfc_Handle hRemoteDevice,
2543 phLibNfc_Llcp_sLinkParameters_t* pConfigInfo
2548 * \ingroup grp_lib_nfc
2549 * \brief <b>Get information on the remote LLCP peer</b>.
2551 * This function returns the LLCP link parameters of the remote peer that were received
2552 * during the link activation.
2554 * \param[in] hRemoteDevice Peer handle obtained during device discovery process.
2555 * \param[out] pConfigInfo Pointer on the variable to be filled with the configuration
2556 parameters used during activation.
2558 * \retval NFCSTATUS_SUCCESS Operation successful.
2559 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2560 * could not be properly interpreted.
2561 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2562 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2563 * \retval NFCSTATUS_FAILED Operation failed.
2564 * \retval NFCSTATUS_BUSY Previous request in progress can not accept new request.
2566 extern NFCSTATUS phLibNfc_Llcp_GetRemoteInfo( phLibNfc_Handle hRemoteDevice,
2567 phLibNfc_Llcp_sLinkParameters_t* pConfigInfo
2572 * \ingroup grp_lib_nfc
2573 * \brief <b>Create a socket on a LLCP-connected device</b>.
2575 * This function creates a socket for a given LLCP link. Sockets can be of two types :
2576 * connection-oriented and connectionless. If the socket is connection-oriented, the caller
2577 * must provide a working buffer to the socket in order to handle incoming data. This buffer
2578 * must be large enough to fit the receive window (RW * MIU), the remaining space being
2579 * used as a linear buffer to store incoming data as a stream. Data will be readable later
2580 * using the phLibNfc_Llcp_Recv function.
2581 * The options and working buffer are not required if the socket is used as a listening socket,
2582 * since it cannot be directly used for communication.
2584 * \param[in] eType The socket type.
2585 * \param[in] psOptions The options to be used with the socket.
2586 * \param[in] psWorkingBuffer A working buffer to be used by the library.
2587 * \param[out] phSocket A pointer on the variable to be filled with the handle
2588 * on the created socket.
2589 * \param[in] pErr_Cb The callback to be called each time the socket
2591 * \param[in] pContext Upper layer context to be returned in the callback.
2593 * \retval NFCSTATUS_SUCCESS Operation successful.
2594 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2595 * could not be properly interpreted.
2596 * \retval NFCSTATUS_BUFFER_TOO_SMALL The working buffer is too small for the MIU and RW
2597 * declared in the options.
2598 * \retval NFCSTATUS_INSUFFICIENT_RESOURCES No more socket handle available.
2599 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2600 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2601 * \retval NFCSTATUS_FAILED Operation failed.
2603 extern NFCSTATUS phLibNfc_Llcp_Socket( phLibNfc_Llcp_eSocketType_t eType,
2604 phLibNfc_Llcp_sSocketOptions_t* psOptions,
2605 phNfc_sData_t* psWorkingBuffer,
2606 phLibNfc_Handle* phSocket,
2607 pphLibNfc_LlcpSocketErrCb_t pErr_Cb,
2613 * \ingroup grp_lib_nfc
2614 * \brief <b>Close a socket on a LLCP-connected device</b>.
2616 * This function closes a LLCP socket previously created using phLibNfc_Llcp_Socket.
2617 * If the socket was connected, it is first disconnected, and then closed.
2619 * \param[in] hSocket Socket handle obtained during socket creation.
2621 * \retval NFCSTATUS_SUCCESS Operation successful.
2622 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2623 * could not be properly interpreted.
2624 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2625 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2626 * \retval NFCSTATUS_FAILED Operation failed.
2628 extern NFCSTATUS phLibNfc_Llcp_Close( phLibNfc_Handle hSocket );
2632 * \ingroup grp_lib_nfc
2633 * \brief <b>Get the local options of a socket</b>.
2635 * This function returns the local options (maximum packet size and receive window size) used
2636 * for a given connection-oriented socket. This function shall not be used with connectionless
2639 * \param[in] hSocket Socket handle obtained during socket creation.
2640 * \param[in] psLocalOptions A pointer to be filled with the local options of the socket.
2642 * \retval NFCSTATUS_SUCCESS Operation successful.
2643 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2644 * could not be properly interpreted.
2645 * \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
2646 * a valid type to perform the requsted operation.
2647 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2648 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2649 * \retval NFCSTATUS_FAILED Operation failed.
2651 extern NFCSTATUS phLibNfc_Llcp_SocketGetLocalOptions( phLibNfc_Handle hSocket,
2652 phLibNfc_Llcp_sSocketOptions_t* psLocalOptions
2657 * \ingroup grp_lib_nfc
2658 * \brief <b>Get the local options of a socket</b>.
2660 * This function returns the remote options (maximum packet size and receive window size) used
2661 * for a given connection-oriented socket. This function shall not be used with connectionless
2664 * \param[in] hSocket Socket handle obtained during socket creation.
2665 * \param[in] psRemoteOptions A pointer to be filled with the remote options of the socket.
2667 * \retval NFCSTATUS_SUCCESS Operation successful.
2668 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2669 * could not be properly interpreted.
2670 * \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
2671 * a valid type to perform the requsted operation.
2672 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2673 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2674 * \retval NFCSTATUS_FAILED Operation failed.
2676 extern NFCSTATUS phLibNfc_Llcp_SocketGetRemoteOptions( phLibNfc_Handle hRemoteDevice,
2677 phLibNfc_Handle hSocket,
2678 phLibNfc_Llcp_sSocketOptions_t* psRemoteOptions
2683 * \ingroup grp_lib_nfc
2684 * \brief <b>Bind a socket to a local SAP</b>.
2686 * This function binds the socket to a local Service Access Point.
2688 * \param[in] hSocket Peer handle obtained during device discovery process.
2689 * \param[out] pConfigInfo Pointer on the variable to be filled with the configuration
2690 * parameters used during activation.
2692 * \retval NFCSTATUS_SUCCESS Operation successful.
2693 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2694 * could not be properly interpreted.
2695 * \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
2696 * a valid type to perform the requsted operation.
2697 * \retval NFCSTATUS_ALREADY_REGISTERED The selected SAP is already bound to another
2699 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2700 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2701 * \retval NFCSTATUS_FAILED Operation failed.
2703 extern NFCSTATUS phLibNfc_Llcp_Bind( phLibNfc_Handle hSocket,
2709 * \ingroup grp_lib_nfc
2710 * \brief <b>Listen for incoming connection requests on a socket</b>.
2712 * This function switches a socket into a listening state and registers a callback on
2713 * incoming connection requests. In this state, the socket is not able to communicate
2714 * directly. The listening state is only available for connection-oriented sockets
2715 * which are still not connected. The socket keeps listening until it is closed, and
2716 * thus can trigger several times the pListen_Cb callback. The caller can adverise the
2717 * service through SDP by providing a service name.
2720 * \param[in] hSocket Socket handle obtained during socket creation.
2721 * \param[in] psServiceName A buffer containing the name of the service for SDP. No SDP
2722 * advertising if set to NULL.
2723 * \param[in] pListen_Cb The callback to be called each time the
2724 * socket receive a connection request.
2725 * \param[in] pContext Upper layer context to be returned in
2728 * \retval NFCSTATUS_SUCCESS Operation successful.
2729 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2730 * could not be properly interpreted.
2731 * \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state to switch
2732 * to listening state.
2733 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2734 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2735 * \retval NFCSTATUS_FAILED Operation failed.
2737 extern NFCSTATUS phLibNfc_Llcp_Listen( phLibNfc_Handle hSocket,
2738 phNfc_sData_t *psServiceName,
2739 pphLibNfc_LlcpSocketListenCb_t pListen_Cb,
2745 * \ingroup grp_lib_nfc
2746 * \brief <b>Accept an incoming connection request for a socket</b>.
2748 * This functions allows the client to accept an incoming connection request.
2749 * It must be used with the socket provided within the listen callback. The socket
2750 * is implicitly switched to the connected state when the function is called.
2752 * \param[in] hSocket Socket handle obtained in the listening callback.
2753 * \param[in] psOptions The options to be used with the socket.
2754 * \param[in] psWorkingBuffer A working buffer to be used by the library.
2755 * \param[in] pErr_Cb The callback to be called each time the accepted socket
2757 * \param[in] pAccept_RspCb The callback to be called when the Accept operation
2759 * \param[in] pContext Upper layer context to be returned in the callback.
2761 * \retval NFCSTATUS_SUCCESS Operation successful.
2762 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2763 * could not be properly interpreted.
2764 * \retval NFCSTATUS_BUFFER_TOO_SMALL The working buffer is too small for the MIU and RW
2765 * declared in the options.
2766 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2767 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2768 * \retval NFCSTATUS_FAILED Operation failed.
2770 extern NFCSTATUS phLibNfc_Llcp_Accept( phLibNfc_Handle hSocket,
2771 phLibNfc_Llcp_sSocketOptions_t* psOptions,
2772 phNfc_sData_t* psWorkingBuffer,
2773 pphLibNfc_LlcpSocketErrCb_t pErr_Cb,
2774 pphLibNfc_LlcpSocketAcceptCb_t pAccept_RspCb,
2780 * \ingroup grp_lib_nfc
2781 * \brief <b>Reject an incoming connection request for a socket</b>.
2783 * This functions allows the client to reject an incoming connection request.
2784 * It must be used with the socket provided within the listen callback. The socket
2785 * is implicitly closed when the function is called.
2787 * \param[in] hSocket Socket handle obtained in the listening callback.
2788 * \param[in] pReject_RspCb The callback to be called when the Reject operation
2790 * \retval NFCSTATUS_SUCCESS Operation successful.
2791 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2792 * could not be properly interpreted.
2793 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2794 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2795 * \retval NFCSTATUS_FAILED Operation failed.
2797 extern NFCSTATUS phLibNfc_Llcp_Reject( phLibNfc_Handle hRemoteDevice,
2798 phLibNfc_Handle hSocket,
2799 pphLibNfc_LlcpSocketAcceptCb_t pReject_RspCb,
2804 * \ingroup grp_lib_nfc
2805 * \brief <b>Try to establish connection with a socket on a remote SAP</b>.
2807 * This function tries to connect to a given SAP on the remote peer. If the
2808 * socket is not bound to a local SAP, it is implicitly bound to a free SAP.
2810 * \param[in] hSocket Socket handle obtained during socket creation.
2811 * \param[in] nSap The destination SAP to connect to.
2812 * \param[in] pConnect_RspCb The callback to be called when the connection
2813 * operation is completed.
2814 * \param[in] pContext Upper layer context to be returned in
2817 * \retval NFCSTATUS_SUCCESS Operation successful.
2818 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2819 * could not be properly interpreted.
2820 * \retval NFCSTATUS_PENDING Connection operation is in progress,
2821 * pConnect_RspCb will be called upon completion.
2822 * \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
2823 * a valid type to perform the requsted operation.
2824 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2825 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2826 * \retval NFCSTATUS_FAILED Operation failed.
2828 extern NFCSTATUS phLibNfc_Llcp_Connect( phLibNfc_Handle hRemoteDevice,
2829 phLibNfc_Handle hSocket,
2831 pphLibNfc_LlcpSocketConnectCb_t pConnect_RspCb,
2837 * \ingroup grp_lib_nfc
2838 * \brief <b>Try to establish connection with a socket on a remote service, given its URI</b>.
2840 * This function tries to connect to a SAP designated by an URI. If the
2841 * socket is not bound to a local SAP, it is implicitly bound to a free SAP.
2843 * \param[in] hSocket Socket handle obtained during socket creation.
2844 * \param[in] psUri The URI corresponding to the destination SAP to connect to.
2845 * \param[in] pConnect_RspCb The callback to be called when the connection
2846 * operation is completed.
2847 * \param[in] pContext Upper layer context to be returned in
2850 * \retval NFCSTATUS_SUCCESS Operation successful.
2851 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2852 * could not be properly interpreted.
2853 * \retval NFCSTATUS_PENDING Connection operation is in progress,
2854 * pConnect_RspCb will be called upon completion.
2855 * \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
2856 * a valid type to perform the requsted operation.
2857 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2858 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2859 * \retval NFCSTATUS_FAILED Operation failed.
2861 extern NFCSTATUS phLibNfc_Llcp_ConnectByUri( phLibNfc_Handle hRemoteDevice,
2862 phLibNfc_Handle hSocket,
2863 phNfc_sData_t* psUri,
2864 pphLibNfc_LlcpSocketConnectCb_t pConnect_RspCb,
2870 * \ingroup grp_lib_nfc
2871 * \brief <b>Disconnect a currently connected socket</b>.
2873 * This function initiates the disconnection of a previously connected socket.
2875 * \param[in] hSocket Socket handle obtained during socket creation.
2876 * \param[in] pDisconnect_RspCb The callback to be called when the
2877 * operation is completed.
2878 * \param[in] pContext Upper layer context to be returned in
2881 * \retval NFCSTATUS_SUCCESS Operation successful.
2882 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2883 * could not be properly interpreted.
2884 * \retval NFCSTATUS_PENDING Disconnection operation is in progress,
2885 * pDisconnect_RspCb will be called upon completion.
2886 * \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
2887 * a valid type to perform the requsted operation.
2888 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2889 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2890 * \retval NFCSTATUS_FAILED Operation failed.
2892 extern NFCSTATUS phLibNfc_Llcp_Disconnect( phLibNfc_Handle hRemoteDevice,
2893 phLibNfc_Handle hSocket,
2894 pphLibNfc_LlcpSocketDisconnectCb_t pDisconnect_RspCb,
2900 * \ingroup grp_lib_nfc
2901 * \brief <b>Read data on a socket</b>.
2903 * This function is used to read data from a socket. It reads at most the
2904 * size of the reception buffer, but can also return less bytes if less bytes
2905 * are available. If no data is available, the function will be pending until
2906 * more data comes, and the response will be sent by the callback. This function
2907 * can only be called on a connection-oriented socket.
2910 * \param[in] hSocket Socket handle obtained during socket creation.
2911 * \param[in] psBuffer The buffer receiving the data.
2912 * \param[in] pRecv_RspCb The callback to be called when the
2913 * operation is completed.
2914 * \param[in] pContext Upper layer context to be returned in
2917 * \retval NFCSTATUS_SUCCESS Operation successful.
2918 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2919 * could not be properly interpreted.
2920 * \retval NFCSTATUS_PENDING Reception operation is in progress,
2921 * pRecv_RspCb will be called upon completion.
2922 * \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
2923 * a valid type to perform the requsted operation.
2924 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2925 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2926 * \retval NFCSTATUS_FAILED Operation failed.
2928 extern NFCSTATUS phLibNfc_Llcp_Recv( phLibNfc_Handle hRemoteDevice,
2929 phLibNfc_Handle hSocket,
2930 phNfc_sData_t* psBuffer,
2931 pphLibNfc_LlcpSocketRecvCb_t pRecv_RspCb,
2937 * \ingroup grp_lib_nfc
2938 * \brief <b>Read data on a socket and get the source SAP</b>.
2940 * This function is the same as phLibNfc_Llcp_Recv, except that the callback includes
2941 * the source SAP. This functions can only be called on a connectionless socket.
2944 * \param[in] hSocket Socket handle obtained during socket creation.
2945 * \param[in] psBuffer The buffer receiving the data.
2946 * \param[in] pRecv_RspCb The callback to be called when the
2947 * operation is completed.
2948 * \param[in] pContext Upper layer context to be returned in
2951 * \retval NFCSTATUS_SUCCESS Operation successful.
2952 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2953 * could not be properly interpreted.
2954 * \retval NFCSTATUS_PENDING Reception operation is in progress,
2955 * pRecv_RspCb will be called upon completion.
2956 * \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
2957 * a valid type to perform the requsted operation.
2958 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2959 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2960 * \retval NFCSTATUS_FAILED Operation failed.
2962 extern NFCSTATUS phLibNfc_Llcp_RecvFrom( phLibNfc_Handle hRemoteDevice,
2963 phLibNfc_Handle hSocket,
2964 phNfc_sData_t* psBuffer,
2965 pphLibNfc_LlcpSocketRecvFromCb_t pRecv_Cb,
2971 * \ingroup grp_lib_nfc
2972 * \brief <b>Send data on a socket</b>.
2974 * This function is used to write data on a socket. This function
2975 * can only be called on a connection-oriented socket which is already
2976 * in a connected state.
2979 * \param[in] hSocket Socket handle obtained during socket creation.
2980 * \param[in] psBuffer The buffer containing the data to send.
2981 * \param[in] pSend_RspCb The callback to be called when the
2982 * operation is completed.
2983 * \param[in] pContext Upper layer context to be returned in
2986 * \retval NFCSTATUS_SUCCESS Operation successful.
2987 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
2988 * could not be properly interpreted.
2989 * \retval NFCSTATUS_PENDING Reception operation is in progress,
2990 * pSend_RspCb will be called upon completion.
2991 * \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
2992 * a valid type to perform the requsted operation.
2993 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
2994 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
2995 * \retval NFCSTATUS_FAILED Operation failed.
2997 extern NFCSTATUS phLibNfc_Llcp_Send( phLibNfc_Handle hRemoteDevice,
2998 phLibNfc_Handle hSocket,
2999 phNfc_sData_t* psBuffer,
3000 pphLibNfc_LlcpSocketSendCb_t pSend_RspCb,
3006 * \ingroup grp_lib_nfc
3007 * \brief <b>Send data on a socket to a given destination SAP</b>.
3009 * This function is used to write data on a socket to a given destination SAP.
3010 * This function can only be called on a connectionless socket.
3013 * \param[in] hSocket Socket handle obtained during socket creation.
3014 * \param[in] nSap The destination SAP.
3015 * \param[in] psBuffer The buffer containing the data to send.
3016 * \param[in] pSend_RspCb The callback to be called when the
3017 * operation is completed.
3018 * \param[in] pContext Upper layer context to be returned in
3021 * \retval NFCSTATUS_SUCCESS Operation successful.
3022 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
3023 * could not be properly interpreted.
3024 * \retval NFCSTATUS_PENDING Reception operation is in progress,
3025 * pSend_RspCb will be called upon completion.
3026 * \retval NFCSTATUS_INVALID_STATE The socket is not in a valid state, or not of
3027 * a valid type to perform the requsted operation.
3028 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
3029 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
3030 * \retval NFCSTATUS_FAILED Operation failed.
3032 extern NFCSTATUS phLibNfc_Llcp_SendTo( phLibNfc_Handle hRemoteDevice,
3033 phLibNfc_Handle hSocket,
3035 phNfc_sData_t* psBuffer,
3036 pphLibNfc_LlcpSocketSendCb_t pSend_RspCb,
3042 * \ingroup grp_lib_nfc
3044 * \brief Initializes \ DeInitialize the NFC library for testmode.
3047 *\brief This function initializes / DeInitialize NFC library and its underlying layers
3048 * in test mode. As part of this interface underlying layers gets configured.
3049 * Once phLibNfc_TstMode_On is successful ,NFC library ready in testmode using IOCTL.
3050 * After using test IOCTLs ,Test mode should be DeInit using phLibNfc_TstMode_Off.
3051 *\note This API should be used only for test IOCTL codes.
3053 * \param[in] pDriverHandle Driver Handle currently application is using.
3054 * \param[in] pTestModeCb The init callback is called by the LibNfc when
3055 * Configure test mode completed or there is an error
3056 * in initialization.
3058 * \param[in] pContext Client context which will be included in
3059 * callback when the request is completed.
3061 * \retval NFCSTATUS_ALREADY_INITIALISED Stack is already initialized.
3062 * \retval NFCSTATUS_PENDING Init sequence has been successfully
3063 * started and result will be conveyed via
3064 * callback notification.
3065 * \retval NFCSTATUS_INVALID_PARAMETER The parameter could not be properly
3067 *\retval NFCSTATUS_INSUFFICIENT_RESOURCES Insufficient resource.(Ex: insufficient memory)
3070 *LibNfcClient,LibNfc;
3071 *--- [label="Before initializing Nfc LIB,Setup Driver layer"];
3072 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_ConfigureDriver()",URL="\ref phLibNfc_Mgt_ConfigureDriver"];
3073 *LibNfcClient<<LibNfc [label="NFCSTATUS_SUCCESS"];
3074 *LibNfcClient=>LibNfc [label="phLibNfc_Mgt_ConfigureTestMode()",URL="\ref phLibNfc_Mgt_ConfigureTestMode"];
3075 *LibNfcClient<<LibNfc [label="NFCSTATUS_PENDING"];
3076 *LibNfcClient<-LibNfc [label="pTestModeCb"];
3079 NFCSTATUS phLibNfc_Mgt_ConfigureTestMode(void *pDriverHandle,
3080 pphLibNfc_RspCb_t pTestModeCb,
3081 phLibNfc_Cfg_Testmode_t eTstmode,
3086 * \ingroup grp_lib_nfc
3087 * \brief <b>Interface to LibNfc Reset</b>.
3089 * LibNfc client can reset the stack.
3091 * \param[in] pContext Upper layer context to be returned in
3095 * \retval NFCSTATUS_SUCCESS Indicates Get stack Capabilities operation successful.
3096 * \retval NFCSTATUS_INVALID_PARAMETER One or more of the supplied parameters
3097 * could not be properly interpreted.
3098 * \retval NFCSTATUS_NOT_INITIALISED Indicates stack is not yet initialized.
3099 * \retval NFCSTATUS_SHUTDOWN Shutdown in progress.
3102 NFCSTATUS phLibNfc_Mgt_Reset(void *pContext);
3104 #endif /* PHLIBNFC_H */