2 * Copyright (C) 2010 NXP Semiconductors
3 * Copyright (C) 2012 Samsung Elevtronics Co., Ltd
\r
5 * Licensed under the Apache License, Version 2.0 (the "License");
\r
6 * you may not use this file except in compliance with the License.
\r
7 * You may obtain a copy of the License at
\r
9 * http://www.apache.org/licenses/LICENSE-2.0
\r
11 * Unless required by applicable law or agreed to in writing, software
\r
12 * distributed under the License is distributed on an "AS IS" BASIS,
\r
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
14 * See the License for the specific language governing permissions and
\r
15 * limitations under the License.
\r
22 * \brief Common DAL for the upper layer.
\r
24 * Project: NFC-FRI-1.1
\r
26 * $Date: Tue Nov 10 13:56:45 2009 $
\r
27 * $Author: ing07299 $
\r
29 * $Aliases: NFC_FRI1.1_WK943_R32_1,NFC_FRI1.1_WK949_PREP1,NFC_FRI1.1_WK943_R32_10,NFC_FRI1.1_WK943_R32_13,NFC_FRI1.1_WK943_R32_14,NFC_FRI1.1_WK1007_R33_1,NFC_FRI1.1_WK1007_R33_4,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1023_R35_1 $
\r
39 * File: \ref phDal4Nfc.h
\r
43 #define PH_DAL4NFC_FILEREVISION "$Revision: 1.38 $" /**< \ingroup grp_file_attributes */
\r
44 #define PH_DAL4NFC_FILEALIASES "$Aliases: NFC_FRI1.1_WK943_R32_1,NFC_FRI1.1_WK949_PREP1,NFC_FRI1.1_WK943_R32_10,NFC_FRI1.1_WK943_R32_13,NFC_FRI1.1_WK943_R32_14,NFC_FRI1.1_WK1007_R33_1,NFC_FRI1.1_WK1007_R33_4,NFC_FRI1.1_WK1017_PREP1,NFC_FRI1.1_WK1017_R34_1,NFC_FRI1.1_WK1017_R34_2,NFC_FRI1.1_WK1023_R35_1 $"
\r
45 /**< \ingroup grp_file_attributes */
\r
47 /*************************** Includes *******************************/
\r
48 /** \defgroup grp_nfc_dal DAL Component
\r
54 /* Constant : samsung modify for TIZEN */
\r
55 //#include <hardware/nfc.h>
\r
56 /**< Basic type definitions */
\r
57 #include <phNfcTypes.h>
\r
58 /**< Generic Interface Layer Function Definitions */
\r
59 #include <phNfcInterface.h>
\r
60 /*********************** End of includes ****************************/
\r
62 /***************************** Macros *******************************/
\r
63 /**< Used for messaging by DAL as well as Upper Layers */
\r
64 #define PH_DAL4NFC_MESSAGE_BASE PH_LIBNFC_DEFERREDCALL_MSG
\r
66 /************************ End of macros *****************************/
\r
69 /********************* Structures and enums *************************/
\r
72 * \ingroup grp_nfc_dal
\r
74 * DAL context : This contains the information of the upper layer callback
\r
75 * and hardware reference.
\r
77 typedef struct phDal4Nfc_SContext
\r
79 phNfcIF_sCallBack_t cb_if; /**<Callback info registered by upper layer*/
\r
80 volatile uint8_t hw_valid; /**<Flag - shows Hardware present or not */
\r
81 void *pHwRef; /**<Hardware Reference*/
\r
82 }phDal4Nfc_SContext_t,*pphDal4Nfc_SContext_t;
\r
85 * \ingroup grp_nfc_dal
\r
87 * DAL enum for Messages : This contains the enums used for
\r
88 * posting messages to the application.
\r
90 typedef enum phDal4Nfc_Messages_en
\r
92 /**<Read message type used to post Read DAL Message to dispatch routine.Dispatch routine
\r
93 calls read callback registered by upper layer */
\r
94 PHDAL4NFC_READ_MESSAGE = 0,
\r
95 /**<Readwait message type used to post Read wait DAL Message to dispatch routine.Dispatch routine
\r
96 calls read wait callback registered by upper layer */
\r
97 PHDAL4NFC_READWAIT_MESSAGE,
\r
98 /**<Write message type used to post write DAL Message to dispatch routine.Dispatch routine
\r
99 calls write wait callback registered by upper layer */
\r
100 PHDAL4NFC_WRITE_MESSAGE,
\r
101 /**<Notify message type used to post Notify DAL Message to dispatch routine.Dispatch routine
\r
102 calls notify callback registered by upper layer */
\r
103 PHDAL4NFC_NOTIFY_MESSAGE
\r
104 }phDal4Nfc_Messages_en_t;
\r
107 * \ingroup grp_nfc_dal
\r
109 * \brief DAL Message structure definition.This structure contains
\r
111 * This structure contains details like message type,read ,read wait and write callbacks
\r
112 * reference details as registered by upper layer.
\r
114 typedef struct phDal4Nfc_Message
\r
116 /**<Refenrece to context.Context can be DAL context */
\r
118 /**<Reference to hardware reference strucutre */
\r
120 /**<DAL message of type \ref phDal4Nfc_Messages_en_t*/
\r
121 phDal4Nfc_Messages_en_t eMsgType;
\r
122 /**<Transaction specific information of type \ref phNfc_sTransactionInfo_t*/
\r
123 phNfc_sTransactionInfo_t transactInfo;
\r
124 /**<Reference to read callback,registered by upper layer.This is of type \ref pphNfcIF_Transact_Completion_CB_t*/
\r
125 pphNfcIF_Transact_Completion_CB_t readCbPtr;
\r
126 /**<Reference to write callback ,registered by upper layer.This is of type \ref pphNfcIF_Transact_Completion_CB_t*/
\r
127 pphNfcIF_Transact_Completion_CB_t writeCbPtr;
\r
128 } phDal4Nfc_Message_t,*pphDal4Nfc_Message_t;
\r
130 typedef phLibNfc_sConfig_t phDal4Nfc_sConfig_t;
\r
131 typedef phLibNfc_sConfig_t *pphDal4Nfc_sConfig_t;
\r
133 /****************** End of structures and enums *********************/
\r
135 /******************** Function declarations *************************/
\r
138 * \ingroup grp_nfc_dal
\r
140 *\brief Allows to register upper layer with DAL layer.
\r
141 * This API allows upper layer to register with DAL layer.As part of registration
\r
142 *<br>1.Exports DAL interfaces and DAL layer context to upper layer.
\r
143 *Exported DAL interfaces are :
\r
144 *<br><br>.phDal4Nfc_Shutdown
\r
145 *<br><br>.phDal4Nfc_Write
\r
146 *<br><br>.phDal4Nfc_Read
\r
147 *<br><br>.phDal4Nfc_ReadWait
\r
148 *<br><br>.phDal4Nfc_ReadWaitCancel
\r
149 *<br><br>phDal4Nfc_Unregister
\r
150 *<br><br>.Registeres upper layer callbacks and upper layer context with DAL layer.
\r
151 *For details refer to \ref phNfcIF_sReference_t.
\r
152 *Registration details are valid unless upper layer calls \ref phDal4Nfc_Unregister()
\r
153 or \ref phDal4Nfc_Shutdown called.
\r
155 * \param[in,out] psRefer holds DAL exported interface references once registration
\r
156 * sucessful.This also contains transmit and receive buffer
\r
159 * \param[in] if_cb Contains upper layer callback reference details, which are used
\r
160 * by DAL layer during callback notification.
\r
161 * These callbacks gets registered with DAL layer.
\r
164 * \param[out] psIFConf Currently this parameter not used.This parameter to be other than NULL.
\r
167 * \retval NFCSTATUS_SUCCESS Operation is successful.
\r
168 * \retval NFCSTATUS_INVALID_PARAMETER At least one parameter of the function is invalid.
\r
171 *ClientApp,UpperLayer,phDal4Nfc;
\r
172 *ClientApp=>phDal4Nfc [label="phDal4Nfc_Config()",URL="\ref phDal4Nfc_Config"];
\r
173 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
174 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Register()",URL="\ref phDal4Nfc_Register"];
\r
175 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
181 phDal4Nfc_Register(
\r
182 phNfcIF_sReference_t *psRefer,
\r
183 phNfcIF_sCallBack_t if_cb,
\r
189 * \ingroup grp_nfc_dal
\r
191 * \brief Allows upper layer to unregister with DAL layer.
\r
192 * This interface allows to unregister upper layer callback interfaces with DAL layer.
\r
193 * \note: Once this this API is called DAL layer stops notifying upper layer callbacks in case
\r
194 * any events reported within DAL.
\r
196 * \param[in] pContext DAL context is provided by the upper layer.
\r
197 * The DAL context earlier was given to the
\r
198 * upper layer through the \ref
\r
199 * \e phDal4Nfc_Register() function.
\r
200 * \param[in] pHwRef for future use .Currently this parameter is not used.
\r
201 * This needs to be other than NULL.
\r
203 * \retval NFCSTATUS_SUCCESS Unregistration successful.
\r
204 * \retval NFCSTATUS_INVALID_PARAMETER At least one parameter of the function is invalid.
\r
207 *ClientApp,UpperLayer,phDal4Nfc;
\r
208 *ClientApp=>phDal4Nfc [label="phDal4Nfc_Config()",URL="\ref phDal4Nfc_Config"];
\r
209 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
210 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Register()",URL="\ref phDal4Nfc_Register"];
\r
211 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
212 *--- [label="Upper layer can issue Unregistration later"];
\r
213 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Unregister()",URL="\ref phDal4Nfc_Unregister"];
\r
214 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
221 phDal4Nfc_Unregister(
\r
229 * \ingroup grp_nfc_dal
\r
231 *\brief This interface allows to initialize DAL layer.
\r
232 * This API implements initialization of DAL layer. This includes :
\r
234 * <br><br>. Initialize parameters for HW Interface.
\r
235 *<br><br>. Initializing read and writer threads.
\r
236 *<br><br>. Initializing read and write task specific events and event specific configurations.
\r
237 *<br><br>. Initializing DAL layer specific details.
\r
239 * \param[in] pContext DAL context provided by the upper layer.
\r
240 * The DAL context will be exported to the
\r
241 * upper layer via upper layer registration interface.
\r
242 * \param[in] pHwRef information of the hardware
\r
244 * \retval NFCSTATUS_SUCCESS DAL initialization successful.
\r
245 * \retval NFCSTATUS_INVALID_DEVICE The device is not enumerated or the
\r
246 * Hardware Reference points to a device
\r
247 * which does not exist. Alternatively,
\r
248 * also already open devices produce this
\r
250 * \retval NFCSTATUS_INVALID_PARAMETER At least one parameter of the function
\r
254 *ClientApp,UpperLayer,phDal4Nfc;
\r
255 *ClientApp=>phDal4Nfc [label="phDal4Nfc_Config()",URL="\ref phDal4Nfc_Config"];
\r
256 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
257 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Register()",URL="\ref phDal4Nfc_Register"];
\r
258 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
259 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Init()",URL="\ref phDal4Nfc_Init"];
\r
260 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
261 *--- [label="DAL intialised ,read for read /write operations"];
\r
274 * \ingroup grp_nfc_dal
\r
276 * \brief This API implements Deintialisation of DAL layer.
\r
278 *This API implements Deintialisation of DAL layer. It includes :
\r
279 *<br><br>.Releases all the resources.( context,memory resources,read/write buffers).
\r
280 *<br><br>.closes COMxx port which is used during DAL session.
\r
281 *<br><br>.Terminates Reader and writer tasks.
\r
283 * \param[in] pContext DAL context is provided by the upper layer.
\r
284 * The DAL context earlier was given to the
\r
285 * upper layer through the
\r
286 * \ref \e phDal4Nfc_Register() function
\r
287 * \param[in] pHwRef hardware reference context.
\r
289 * \retval NFCSTATUS_SUCCESS DAL shutdown successful
\r
290 * \retval NFCSTATUS_FAILED DAL shutdown failed(example.unable to
\r
291 * suspend thread, close HW Interface etc.)
\r
292 * \retval NFCSTATUS_INVALID_PARAMETER At least one parameter of the function
\r
296 *ClientApp,UpperLayer,phDal4Nfc;
\r
297 *ClientApp=>phDal4Nfc [label="phDal4Nfc_Config()",URL="\ref phDal4Nfc_Config"];
\r
298 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
299 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Register()",URL="\ref phDal4Nfc_Register"];
\r
300 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
301 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Init()",URL="\ref phDal4Nfc_Init"];
\r
302 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
303 *--- [label="Perform read write operation"];
\r
304 *--- [label="DAL can be shutdown during upper layer deinit sequence"];
\r
305 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Shutdown()",URL="\ref phDal4Nfc_Shutdown"];
\r
306 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
312 phDal4Nfc_Shutdown(
\r
318 * \ingroup grp_nfc_dal
\r
320 * \brief Allows to write data block to HW Interface.
\r
322 * This asynchronous function writes the given block of data to the driver.
\r
323 * This interface enables writer thread in case their is no write requests pending and returns
\r
324 * sucessfully.Once writer thread completes write operation, it notifies upper layer using callback
\r
326 * \note writer thread notifies upper layer callback notified using windows messaging mechanism
\r
327 * under deferred call context.
\r
330 * \param[in] pContext DAL context is provided by the upper layer.
\r
332 * context earlier was given to the upper layer
\r
333 * through the \ref \e phDal4Nfc_Register() function
\r
334 * \param[in] pHwRef information of the hardware.
\r
335 * \param[in] pBuffer The information given by the upper layer to
\r
336 * send it to the lower layer
\r
337 * \param[in] length The length of pLlc_Buf, that needs to be sent
\r
338 * to the lower layer is given by the upper layer
\r
340 * \retval NFCSTATUS_PENDING If the command is yet to be process.
\r
341 * \retval NFCSTATUS_BUSY BUSY with previous write operation
\r
342 * \retval NFCSTATUS_INVALID_DEVICE The device has not been opened or has
\r
343 * been disconnected meanwhile
\r
344 * \retval NFCSTATUS_INVALID_PARAMETER At least one parameter of the function
\r
348 *ClientApp,UpperLayer,phDal4Nfc;
\r
349 *--- [label="Configure,intialise DAL layer and Register with DAL "];
\r
350 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Write()",URL="\ref phDal4Nfc_Write()"];
\r
351 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_PENDING"];
\r
352 *--- [label="DAL posts write message to main thread under deferred call context"];
\r
353 *phDal4Nfc=>phDal4Nfc [label="phDal4Nfc_DeferredCall()",URL="\ref phDal4Nfc_DeferredCall()"];
\r
354 *ClientApp=>phDal4Nfc [label="phDal4Nfc_DeferredCb()",URL="\ref phDal4Nfc_DeferredCb()"];
\r
355 *phDal4Nfc=>UpperLayer [label="send_complete",URL="\ref phDal4Nfc_DeferredCb()"];
\r
356 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
370 * \ingroup grp_nfc_dal
\r
372 * \brief Allows to Read data block from HW Interface.
\r
374 * This asynchronous function reads the data from the driver in which length
\r
375 * and the required buffer are sent by upper layer. This interface enables
\r
376 * reader thread in case there is no read requests pending and returns sucessfully.
\r
377 * Once read operation is complete, it notifies to upper layer through callback
\r
378 * registered in the \b \e phDal4Nfc_Register() function.
\r
381 * \param[in] pContext DAL context is provided by the upper layer.
\r
382 * The DAL context earlier was given to the
\r
383 * upper layer through the
\r
384 * \b \e phDal4Nfc_Register() function
\r
385 * \param[in] pHwRef Information of the hardware
\r
386 * \param[in] pBuffer The information given by the upper layer to
\r
387 * receive data from the lower layer
\r
388 * \param[in] length The length of pBuffer given by the upper layer
\r
390 * \retval NFCSTATUS_PENDING If the command is yet to be processed.
\r
391 * \retval NFCSTATUS_INVALID_PARAMETER At least one parameter of the function
\r
393 * \retval NFCSTATUS_INVALID_DEVICE The device has not been opened or has
\r
394 * been disconnected meanwhile
\r
397 *ClientApp,UpperLayer,phDal4Nfc;
\r
398 *--- [label="Configure,intialise DAL layer and Register with DAL "];
\r
399 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Write()",URL="\ref phDal4Nfc_Write()"];
\r
400 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_PENDING"];
\r
401 *--- [label="DAL posts write message to main thread under deferred call context"];
\r
402 *phDal4Nfc=>phDal4Nfc [label="phDal4Nfc_DeferredCall()",URL="\ref phDal4Nfc_DeferredCall()"];
\r
403 *ClientApp=>phDal4Nfc [label="phDal4Nfc_DeferredCb()",URL="\ref phDal4Nfc_DeferredCb()"];
\r
404 *phDal4Nfc=>UpperLayer [label="send_complete",URL="\ref phDal4Nfc_DeferredCb()"];
\r
405 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
406 *--- [label="upper layer can issue read request"];
\r
407 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Read()",URL="\ref phDal4Nfc_Read()"];
\r
408 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_PENDING"];
\r
409 *--- [label="DAL posts read message to main thread under deferred call context"];
\r
410 *phDal4Nfc=>phDal4Nfc [label="phDal4Nfc_DeferredCall()",URL="\ref phDal4Nfc_DeferredCall()"];
\r
411 *ClientApp=>phDal4Nfc [label="phDal4Nfc_DeferredCb()",URL="\ref phDal4Nfc_DeferredCb()"];
\r
412 *phDal4Nfc=>UpperLayer [label="receive_complete",URL="\ref phDal4Nfc_DeferredCb()"];
\r
413 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
428 * \ingroup grp_nfc_dal
\r
430 * \brief Allows to wait before reading data block from HW Interface.
\r
432 * This asynchronous function waits before reading the data from the
\r
433 * driver in which length and the required buffer are sent by upper layer.
\r
434 * This interface enables reader thread to wait for predefined time period
\r
435 * (predefined time period is configurable by the DAL implementer) to complete
\r
436 * read request.Once read operation is complete, it notifies to upper layer
\r
437 * through callback registered in the \b \e phDal4Nfc_Register()
\r
438 * function. Read request is expected to get complete within this time.
\r
440 * \param[in] pContext DAL context is provided by the upper layer.
\r
441 * The DAL context earlier was given to the
\r
442 * upper layer through the
\r
443 * \b \e phDal4Nfc_Register() function
\r
444 * \param[in] pHwRef Information of the hardware
\r
445 * \param[in] pBuffer The information given by the upper layer to
\r
446 * receive data from the lower layer
\r
447 * \param[in] length The length of pBuffer given by the upper layer
\r
449 * \retval NFCSTATUS_SUCCESS DAL receive successful
\r
450 * \retval NFCSTATUS_BUSY BUSY with previous receive operation
\r
451 * \retval NFCSTATUS_INVALID_PARAMETER At least one parameter of the
\r
452 * function is invalid.
\r
453 * \retval NFCSTATUS_INVALID_DEVICE The device has not been opened or has
\r
454 * been disconnected meanwhile
\r
458 *ClientApp,UpperLayer,phDal4Nfc;
\r
459 *--- [label="Configure,intialise DAL layer and Register with DAL "];
\r
460 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Write()",URL="\ref phDal4Nfc_Write()"];
\r
461 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_PENDING"];
\r
462 *--- [label="DAL posts write message to main thread under deferred call context"];
\r
463 *phDal4Nfc=>phDal4Nfc [label="phDal4Nfc_DeferredCall()",URL="\ref phDal4Nfc_DeferredCall()"];
\r
464 *ClientApp=>phDal4Nfc [label="phDal4Nfc_DeferredCb()",URL="\ref phDal4Nfc_DeferredCb()"];
\r
465 *phDal4Nfc=>UpperLayer [label="send_complete",URL="\ref phDal4Nfc_DeferredCb()"];
\r
466 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
467 *--- [label="upper layer can issue read wait request "];
\r
468 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_ReadWait()",URL="\ref phDal4Nfc_ReadWait()"];
\r
469 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_PENDING"];
\r
470 *--- [label="DAL posts read wait message to main thread under deferred call context"];
\r
471 *phDal4Nfc=>phDal4Nfc [label="phDal4Nfc_DeferredCall()",URL="\ref phDal4Nfc_DeferredCall()"];
\r
472 *ClientApp=>phDal4Nfc [label="phDal4Nfc_DeferredCb()",URL="\ref phDal4Nfc_DeferredCb()"];
\r
473 *phDal4Nfc=>UpperLayer [label="receive_complete",URL="\ref phDal4Nfc_DeferredCb()"];
\r
474 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
482 phDal4Nfc_ReadWait(
\r
491 * \ingroup grp_nfc_dal
\r
493 *\brief Aborts read wait opertaion.
\r
495 * This asynchronous function issues cancellation of the outstanding
\r
496 * \b \e phDal4Nfc_ReadWait request.If upper layer wants to cancel the
\r
497 * ongoing read wait operation this function is used. e.g. to abort the
\r
500 * \param[in] pContext DAL context is provided by the upper layer.
\r
501 * The DAL context earlier was given to the
\r
502 * upper layer through the
\r
503 * \b \e phDal4Nfc_Register() function
\r
504 * \param[in] pHwRef Information of the hardware
\r
506 * \retval NFCSTATUS_SUCCESS DAL receive successful
\r
507 * \retval NFCSTATUS_INVALID_PARAMETER At least one parameter of the
\r
508 * function is invalid.
\r
509 * \retval NFCSTATUS_INVALID_DEVICE The device has not been opened
\r
510 * or has been disconnected meanwhile
\r
511 * \retval NFCSTATUS_BOARD_COMMUNICATION_ERROR A board communication error occurred
\r
512 (e.g. configuration went wrong).
\r
516 *ClientApp,UpperLayer,phDal4Nfc;
\r
517 *--- [label="Configure,intialise DAL layer and Register with DAL "];
\r
518 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Write()",URL="\ref phDal4Nfc_Write()"];
\r
519 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_PENDING"];
\r
520 *--- [label="DAL posts write message to main thread under deferred call context"];
\r
521 *phDal4Nfc=>phDal4Nfc [label="phDal4Nfc_DeferredCall()",URL="\ref phDal4Nfc_DeferredCall()"];
\r
522 *ClientApp=>phDal4Nfc [label="phDal4Nfc_DeferredCb()",URL="\ref Call phDal4Nfc_DeferredCb()"];
\r
523 *phDal4Nfc=>UpperLayer [label="send_complete",URL="\ref phDal4Nfc_DeferredCb()"];
\r
524 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
525 *--- [label="upper layer can issue read wait request "];
\r
526 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_ReadWait()",URL="\ref phDal4Nfc_ReadWait()"];
\r
527 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_PENDING"];
\r
528 *--- [label="Issue Read wait cancel request here"];
\r
529 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_ReadWaitCancel()",URL="\ref phDal4Nfc_ReadWaitCancel()"];
\r
530 **UpperLayer<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
535 phDal4Nfc_ReadWaitCancel(
\r
541 * \ingroup grp_nfc_dal
\r
543 * \brief DAL config function
\r
544 * This synchronous function configures the given HW Interface and
\r
545 * sends the HANDLE to the caller.
\r
547 * \param[in] config DAL configuration details as provided
\r
548 * by the upper layer.
\r
549 * \param[in,out] phwref pointer to which valid Handle to DAL
\r
550 * interface is assigned.
\r
552 * \retval NFCSTATUS_SUCCESS Configuration happened successfully.
\r
553 * \retval NFCSTATUS_INVALID_PARAMETER At least one parameter of the function
\r
555 * \retval NFCSTATUS_FAILED Configuration failed(example.unable to
\r
556 * open HW Interface).
\r
557 * \retval NFCSTATUS_INVALID_DEVICE The device has not been opened or
\r
558 * has been disconnected meanwhile
\r
559 * \retval NFCSTATUS_BOARD_COMMUNICATION_ERROR A board communication error occurred
\r
560 (e.g. configuration went wrong).
\r
562 *ClientApp,UpperLayer,phDal4Nfc;
\r
563 *ClientApp=>phDal4Nfc [label="phDal4Nfc_Config()",URL="\ref phDal4Nfc_Config"];
\r
564 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
570 pphDal4Nfc_sConfig_t config,
\r
575 * \ingroup grp_nfc_dal
\r
577 * \brief Release configuration for the given HW Interface.
\r
579 * \copydoc page_reg Release all the variables of the DAL component, that has been
\r
580 * initialised in \b phDal4Nfc_Config function (Synchronous function).
\r
582 * \param[in] pHwRef Link information of the hardware
\r
584 * \retval NFCSTATUS_SUCCESS DAL Configuration Released successfully.
\r
585 * \retval NFCSTATUS_FAILED Configuration release failed(example: Unable to close Com port).
\r
588 *ClientApp,UpperLayer,phDal4Nfc;
\r
589 *ClientApp=>phDal4Nfc [label="phDal4Nfc_Config()",URL="\ref phDal4Nfc_Config"];
\r
590 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
591 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Register()",URL="\ref phDal4Nfc_Register"];
\r
592 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
593 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Init()",URL="\ref phDal4Nfc_Init"];
\r
594 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
595 *--- [label="Perform read write operation"];
\r
596 *--- [label="DAL resources can be released during upper layer deinit sequence"];
\r
597 *UpperLayer=>phDal4Nfc [label="phDal4Nfc_Shutdown()",URL="\ref phDal4Nfc_Shutdown"];
\r
598 *UpperLayer<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
599 *ClientApp=>phDal4Nfc [label="phDal4Nfc_ConfigRelease()",URL="\ref phDal4Nfc_ConfigRelease"];
\r
600 *ClientApp<<phDal4Nfc [label="NFCSTATUS_SUCCESS"];
\r
605 phDal4Nfc_ConfigRelease(
\r
610 phDal4Nfc_Reset(long level);
\r
614 phDal4Nfc_Download();
\r
616 /******************** Function declarations *************************/
\r
618 #endif /* PHDALNFC_H */
\r
620 /****************************************** END OF FILE ***************************************************/
\r