code update
[adaptation/devices/nfc-plugin-nxp.git] / inc / nfc_custom_config.h
1 /*\r
2  * Copyright (C) 2010 NXP Semiconductors\r
3  *\r
4  * Licensed under the Apache License, Version 2.0 (the "License");\r
5  * you may not use this file except in compliance with the License.\r
6  * You may obtain a copy of the License at\r
7  *\r
8  *      http://www.apache.org/licenses/LICENSE-2.0\r
9  *\r
10  * Unless required by applicable law or agreed to in writing, software\r
11  * distributed under the License is distributed on an "AS IS" BASIS,\r
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
13  * See the License for the specific language governing permissions and\r
14  * limitations under the License.\r
15  */\r
16 \r
17 \r
18 /**\r
19 * \file nfc_custom_config.h\r
20 * \brief HAL Custom Configurations\r
21 *\r
22 *\r
23 * \note This is the configuration header file of the HAL 4.0. custom configurable \r
24 *       parameters of the HAL 4.0 are provided in this file\r
25 *\r
26 * Project: NFC-FRI-1.1 / HAL4.0\r
27 *\r
28 * $Date: Fri Jun 11 16:44:31 2010 $\r
29 * $Author: ing04880 $\r
30 * $Revision: 1.11 $\r
31 * $Aliases: NFC_FRI1.1_WK1023_R35_1 $\r
32 *\r
33 */\r
34 \r
35 \r
36 /*@{*/\r
37 #ifndef NFC_CUSTOM_CONFIG_H\r
38 #define NFC_CUSTOM_CONFIG_H\r
39 /*@}*/\r
40 \r
41 \r
42 /** \r
43 *  \name Hal\r
44 *\r
45 * File: \ref nfc_custom_config.h\r
46 *\r
47 */\r
48 \r
49 \r
50 /*\r
51  *****************************************************************\r
52  **********************  CUSTOM MACROS **************************\r
53  *****************************************************************\r
54  */\r
55 \r
56 /**< Max number of remote devices supported*/\r
57 #define MAX_REMOTE_DEVICES        0x10\r
58 \r
59 \r
60 /**< Default Session ID for Initialisation */\r
61 #define DEFAULT_SESSION "NXP-NFC2"\r
62 \r
63 /** Resolution value for the timer, here the \r
64     timer resolution is 100 milliseconds */\r
65 #define TIMER_RESOLUTION                100U\r
66 \r
67 /**< Defines connection time out value for LLC timer, \r
68     500 is in milliseconds */\r
69 #define LINK_CONNECTION_TIMEOUT         500U\r
70 \r
71 /**< Defines guard time out value for LLC timer, \r
72     250 is in milliseconds */\r
73 #define LINK_GUARD_TIMEOUT              250U\r
74 \r
75 /**< Macro to Enable SMX Feature During\r
76  * Initialisation */\r
77 \r
78 \r
79 /* PLEASE NOTE: This Macro should be only enabled if there is a SMART_MX \r
80  * Chip attached to the PN544.\r
81  */\r
82 /* #define NXP_HAL_ENABLE_SMX */\r
83 \r
84 \r
85 \r
86 /* PLEASE NOTE: Kindly change the DEFAULT_SESSION Macro for each of the \r
87  * configuration change done for the below Macros\r
88  */\r
89 \r
90 /**<  External Clock Request Configuration for the NFC Device,\r
91       0x00U -> No Clock Request,\r
92       0x01U -> Clock Request through CLKREQ pin (GPIO pin 2),\r
93       0x02U -> Clock Request through NXP_EVT_CLK_REQUEST Event,\r
94       */\r
95 #define NXP_DEFAULT_CLK_REQUEST         0x00U\r
96 \r
97 /**<  External Input Clock Setting for the NFC Device,\r
98       0x00U -> No Input Clock Required (Use the Xtal),\r
99       0x01U -> 13 MHZ,\r
100       0x02U -> 19.2 MHZ,\r
101       0x03U -> 26 MHZ,\r
102       0x04U -> 38.4 MHZ,\r
103       0x05U -> Custom (Set the Custome Clock Registry),\r
104       */\r
105 #define NXP_DEFAULT_INPUT_CLK           0x00U\r
106 \r
107 \r
108 \r
109 #define NFC_DEV_HWCONF_DEFAULT          0xBCU\r
110 \r
111 /**<  TX LDO Configuration \r
112        0x00 -> 00b     3.0 V,\r
113        0x01 -> 01b     3.0 V,\r
114        0x02 -> 10b     2.7 V,\r
115        0x03 -> 11b     3.3 V,\r
116       \r
117       */\r
118 #define NXP_DEFAULT_TX_LDO              0x00U\r
119 \r
120 \r
121 /**<  External Clock Request Configuration for the NFC Device,\r
122       0x00U -> No Power Request,\r
123       0x01U -> Power Request through CLKREQ pin (GPIO pin 2),\r
124       0x02U -> Power Request through PWR_REQUEST (GPIO Pin 3),\r
125       */\r
126 #define NXP_UICC_PWR_REQUEST            0x00U\r
127 \r
128 /**<  UICC Bit Rate Configuration\r
129        0x02U -> 212Kbits/Sec\r
130        0x04U -> 424Kbits/Sec\r
131        0x08U -> 828Kbits/Sec\r
132  */\r
133 \r
134 #define NXP_UICC_BIT_RATE               0x08U\r
135 \r
136 /**<  Indicates PN544 Power Modes Configuration for the NFC Device,\r
137       0x00U -> PN544 stays in active bat mode \r
138                (except when generating RF field)\r
139       0x01U -> PN544 goes in standby when possible otherwise \r
140                stays in active bat mode\r
141       0x02U -> PN544 goes in idle mode as soon as it can \r
142                (otherwise it is in active bat except when generating RF field)\r
143       0x03U -> PN544 goes in standby when possible otherwise goes in idle mode \r
144                as soon as it can (otherwise it is in active bat except when \r
145                generating RF field)\r
146       */\r
147           \r
148 #define NXP_SYSTEM_PWR_STATUS           0x01U\r
149 \r
150 \r
151 /**<  System Event Notification\r
152        0x01     Overcurrent\r
153        0x02     PMUVCC Switch\r
154        0x04     External RF Field\r
155        0x08     Memory Violation\r
156        0x10     Temperature Overheat\r
157  */\r
158 \r
159 #define NXP_SYSTEM_EVT_INFO             0x10U\r
160 \r
161 /**<  NFCIP Active Mode Configuration\r
162        0x01     106 kbps\r
163        0x02     212 kbps\r
164        0x04     424 kbps\r
165  */\r
166 \r
167 #define NXP_NFCIP_ACTIVE_DEFAULT        0x01U\r
168 \r
169 \r
170 \r
171 /* Reset the Default values of Host Link Timers */\r
172 /* Macro to Enable the Host Side Link Timeout Configuration \r
173  * 0x00 ----> Default Pre-defined Configuration;\r
174  * 0x01 ----> Update only the Host Link Guard Timeout Configuration;\r
175  * 0x03 ----> Update Both the Host Link Guard Timeout \r
176               and ACK Timeout Configuration;\r
177  */\r
178 #define HOST_LINK_TIMEOUT              0x00U\r
179 \r
180 \r
181 #define NXP_NFC_LINK_GRD_CFG_DEFAULT   0x0032U\r
182 \r
183 \r
184 #define NXP_NFC_LINK_ACK_CFG_DEFAULT   0x0005U\r
185 \r
186 \r
187 /* Macro to Enable the Interface Character Timeout Configuration \r
188  * 0x00 ----> Default Pre-defined Configuration;\r
189  * 0x01 ----> Update the IFC Timeout Default Configuration;\r
190  */\r
191 #define NXP_NFC_IFC_TIMEOUT            0x00\r
192 \r
193 \r
194 #define NXP_NFC_IFC_CONFIG_DEFAULT     0x203AU\r
195 \r
196 \r
197 #define NXP_NFCIP_PSL_BRS_DEFAULT       0x00U\r
198 \r
199 \r
200 #endif /* NFC_CUSTOM_CONFIG_H */\r
201 \r