1 /*
2  * Copyright (C) 2010 NXP Semiconductors
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 
17 /*!
18 * \file  phLlcNfc_Interface.h
19 * \brief Interface for both LLC and transport layer
20 *
21 * Project: NFC-FRI-1.1
22 *
23 * $Date: Thu Sep 11 12:19:29 2008 $
24 * $Author: ing02260 $
25 * $Revision: 1.9 $
26 * $Aliases: NFC_FRI1.1_WK838_PREP1,NFC_FRI1.1_WK838_R9_PREP2,NFC_FRI1.1_WK838_R9_1,NFC_FRI1.1_WK840_R10_PREP1,NFC_FRI1.1_WK840_R10_1,NFC_FRI1.1_WK842_R11_PREP1,NFC_FRI1.1_WK842_R11_PREP2,NFC_FRI1.1_WK842_R11_1,NFC_FRI1.1_WK844_PREP1,NFC_FRI1.1_WK844_R12_1,NFC_FRI1.1_WK846_PREP1,NFC_FRI1.1_WK846_R13_1,NFC_FRI1.1_WK848_PREP1,NFC_FRI1.1_WK848_R14_1,NFC_FRI1.1_WK849_PACK1_PREP1,NFC_FRI1.1_WK850_PACK1,NFC_FRI1.1_WK851_PREP1,NFC_FRI1.1_WK850_R15_1,NFC_FRI1.1_WK902_PREP1,NFC_FRI1.1_WK902_R16_1,NFC_FRI1.1_WK904_PREP1,NFC_FRI1.1_WK904_R17_1,NFC_FRI1.1_WK906_R18_1,NFC_FRI1.1_WK908_PREP1,NFC_FRI1.1_WK908_R19_1,NFC_FRI1.1_WK910_PREP1,NFC_FRI1.1_WK910_R20_1,NFC_FRI1.1_WK912_PREP1,NFC_FRI1.1_WK912_R21_1,NFC_FRI1.1_WK914_PREP1,NFC_FRI1.1_WK914_R22_1,NFC_FRI1.1_WK914_R22_2,NFC_FRI1.1_WK916_R23_1,NFC_FRI1.1_WK918_R24_1,NFC_FRI1.1_WK920_PREP1,NFC_FRI1.1_WK920_R25_1,NFC_FRI1.1_WK922_PREP1,NFC_FRI1.1_WK922_R26_1,NFC_FRI1.1_WK924_PREP1,NFC_FRI1.1_WK924_R27_1,NFC_FRI1.1_WK926_R28_1,NFC_FRI1.1_WK926_R28_2,NFC_FRI1.1_WK926_R28_3,NFC_FRI1.1_WK928_R29_1,NFC_FRI1.1_WK930_R30_1,NFC_FRI1.1_WK934_PREP_1,NFC_FRI1.1_WK934_R31_1,NFC_FRI1.1_WK941_PREP1,NFC_FRI1.1_WK941_PREP2,NFC_FRI1.1_WK941_1,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 $
27 *
28 */
29 
30 #ifndef PHLLCNFC_INTERFACE_H
31 #define PHLLCNFC_INTERFACE_H
32 
33 /**
34 *  \name LLC TL NFC interface
35 *
36 * File: \ref phLlcTlNfc_Interface.h
37 *
38 */
39 /*@{*/
40 #define PH_LLCNFC_INTERFACE_FILEREVISION "$Revision: 1.9 $" /**< \ingroup grp_hal_nfc_llc */
41 #define PH_LLCNFC_INTERFACE_FILEALIASES "$Aliases: NFC_FRI1.1_WK838_PREP1,NFC_FRI1.1_WK838_R9_PREP2,NFC_FRI1.1_WK838_R9_1,NFC_FRI1.1_WK840_R10_PREP1,NFC_FRI1.1_WK840_R10_1,NFC_FRI1.1_WK842_R11_PREP1,NFC_FRI1.1_WK842_R11_PREP2,NFC_FRI1.1_WK842_R11_1,NFC_FRI1.1_WK844_PREP1,NFC_FRI1.1_WK844_R12_1,NFC_FRI1.1_WK846_PREP1,NFC_FRI1.1_WK846_R13_1,NFC_FRI1.1_WK848_PREP1,NFC_FRI1.1_WK848_R14_1,NFC_FRI1.1_WK849_PACK1_PREP1,NFC_FRI1.1_WK850_PACK1,NFC_FRI1.1_WK851_PREP1,NFC_FRI1.1_WK850_R15_1,NFC_FRI1.1_WK902_PREP1,NFC_FRI1.1_WK902_R16_1,NFC_FRI1.1_WK904_PREP1,NFC_FRI1.1_WK904_R17_1,NFC_FRI1.1_WK906_R18_1,NFC_FRI1.1_WK908_PREP1,NFC_FRI1.1_WK908_R19_1,NFC_FRI1.1_WK910_PREP1,NFC_FRI1.1_WK910_R20_1,NFC_FRI1.1_WK912_PREP1,NFC_FRI1.1_WK912_R21_1,NFC_FRI1.1_WK914_PREP1,NFC_FRI1.1_WK914_R22_1,NFC_FRI1.1_WK914_R22_2,NFC_FRI1.1_WK916_R23_1,NFC_FRI1.1_WK918_R24_1,NFC_FRI1.1_WK920_PREP1,NFC_FRI1.1_WK920_R25_1,NFC_FRI1.1_WK922_PREP1,NFC_FRI1.1_WK922_R26_1,NFC_FRI1.1_WK924_PREP1,NFC_FRI1.1_WK924_R27_1,NFC_FRI1.1_WK926_R28_1,NFC_FRI1.1_WK926_R28_2,NFC_FRI1.1_WK926_R28_3,NFC_FRI1.1_WK928_R29_1,NFC_FRI1.1_WK930_R30_1,NFC_FRI1.1_WK934_PREP_1,NFC_FRI1.1_WK934_R31_1,NFC_FRI1.1_WK941_PREP1,NFC_FRI1.1_WK941_PREP2,NFC_FRI1.1_WK941_1,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 $"    /**< \ingroup grp_hal_nfc_llc */
42 /*@}*/
43 /*************************** Includes *******************************/
44 
45 /*********************** End of includes ****************************/
46 
47 /***************************** Macros *******************************/
48 #define PH_LLCNFC_READWAIT_OFF          0
49 #define PH_LLCNFC_READWAIT_ON           1
50 
51 /************************ End of macros *****************************/
52 
53 /********************** Callback functions **************************/
54 
55 /******************* End of Callback functions **********************/
56 
57 /********************* Structures and enums *************************/
58 
59 /****************** End of structures and enums *********************/
60 
61 /******************** Function declarations *************************/
62 
63 NFCSTATUS
64 phLlcNfc_Interface_Register(
65     phLlcNfc_Context_t          *psLlcCtxt,
66     phNfcLayer_sCfg_t           *psIFConfig
67 );
68 
69 NFCSTATUS
70 phLlcNfc_Interface_Init(
71     phLlcNfc_Context_t      *psLlcCtxt
72 );
73 
74 NFCSTATUS
75 phLlcNfc_Interface_Read(
76     phLlcNfc_Context_t      *psLlcCtxt,
77     uint8_t                 readWaitOn,
78     uint8_t                 *pLlcBuffer,
79     uint32_t                llcBufferLength
80 );
81 
82 NFCSTATUS
83 phLlcNfc_Interface_Write(
84     phLlcNfc_Context_t      *psLlcCtxt,
85     uint8_t             *pLlcBuffer,
86     uint32_t            llcBufferLength
87 );
88 
89 /**
90 * \ingroup grp_hal_nfc_llc
91 *
92 * \brief \b Release function
93 *
94 * \copydoc page_reg Release all the variables of the LLC component, that has been
95 *      initialised in \b phLlcNfc_Init function (Synchronous function).
96 *
97 * \param[in] pContext          LLC context is provided by the upper layer. The LLC
98 *                              context earlier was given to the upper layer through the
99 *                              \ref phLlcNfc_Register function
100 * \param[in] pLinkInfo         Link information of the hardware
101 *
102 * \retval NFCSTATUS_PENDING            If the command is yet to be processed.
103 * \retval NFCSTATUS_INVALID_PARAMETER  At least one parameter of the function is invalid.
104 * \retval Other errors                 Errors related to the lower layers
105 *
106 */
107 extern
108 NFCSTATUS
109 phLlcNfc_Release(
110                  void    *pContext,
111                  void    *pLinkInfo
112                  );
113 /****************** End of Function declarations ********************/
114 #endif /* PHLLCTLNFC_INTERFACE_H */
115