NFC ZigBee 3.0 Modules and Libraries: nci.h Source File

NFC ZigBee 3.0

NFC ZigBee 3.0 Modules and Libraries
NFC Commissioning using ZigBee Installation Codes
nci.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * MODULE: NFC
4  *
5  * COMPONENT: nci.h
6  *
7  * AUTHOR: Martin Looker
8  *
9  * DESCRIPTION: NCI driver for reading and writing data (interface)
10  *
11  * $HeadURL: https://www.collabnet.nxp.com/svn/lprf_sware/Projects/Components/NFC/Tags/+v1000/Include/nci.h $
12  *
13  * $Revision: 86042 $
14  *
15  * $LastChangedBy: nxp29761 $
16  *
17  * $LastChangedDate: 2017-01-06 11:08:16 +0000 (Fri, 06 Jan 2017) $
18  *
19  * $Id: nci.h 86042 2017-01-06 11:08:16Z nxp29761 $
20  *
21  ****************************************************************************
22  *
23  * This software is owned by NXP B.V. and/or its supplier and is protected
24  * under applicable copyright laws. All rights are reserved. We grant You,
25  * and any third parties, a license to use this software solely and
26  * exclusively on NXP products [NXP Microcontrollers such as JN5168, JN5179].
27  * You, and any third parties must reproduce the copyright and warranty notice
28  * and any other legend of ownership on each copy or partial copy of the
29  * software.
30  *
31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
32  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
35  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
36  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
37  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
38  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
39  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
40  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41  * POSSIBILITY OF SUCH DAMAGE.
42  *
43  * Copyright NXP B.V. 2016. All rights reserved
44  *
45  ***************************************************************************/
145 #ifndef NCI_H_
146 #define NCI_H_
147 
148 /****************************************************************************/
149 /*** Include Files ***/
150 /****************************************************************************/
151 #include <jendefs.h>
152 
153 /****************************************************************************/
154 /*** Macro Definitions ***/
155 /****************************************************************************/
156 
157 /****************************************************************************/
158 /*** Type Definitions ***/
159 /****************************************************************************/
161 typedef enum
162 {
169 } teNciEvent;
170 
172 typedef void (*tprNciCbEvent)( /* Called when an event takes place */
173  teNciEvent eNciEvent, /* Event raised */
174  uint32 u32Address,
175  uint32 u32Length,
176  uint8 *pu8Data); /* Event data (NULL if no data) */
177 
178 /****************************************************************************/
179 /*** Exported Functions (called by application) ***/
180 /****************************************************************************/
181 /****************************************************************************
182  *
183  * NAME: NCI_vInitialise
184  */
188 PUBLIC void NCI_vInitialise(
189  uint8 u8Address,
190  bool_t bLocation,
191  uint32 u32FrequencyHz,
192  uint8 u8InputVen,
193  uint8 u8InputIrq
194  );
195 
196 /****************************************************************************
197  *
198  * NAME: NCI_vRegCbEvent
199  */
203 PUBLIC void NCI_vRegCbEvent(
204  tprNciCbEvent prRegCbEvent
205  );
206 
207 /****************************************************************************
208  *
209  * NAME: NCI_vTick
210  */
216 PUBLIC void NCI_vTick(
217  uint32 u32TickMs
218  );
219 
220 /****************************************************************************
221  *
222  * NAME: NCI_bRead
223  */
234 PUBLIC bool_t NCI_bRead(
235  uint32 u32ReadAddress,
236  uint32 u32ReadLength,
237  uint8 *pu8ReadData
238  );
239 
240 /****************************************************************************
241  *
242  * NAME: NCI_bReadVersion
243  */
257 PUBLIC bool_t NCI_bReadVersion(
258  uint32 u32ReadLength,
259  uint8 *pu8ReadData
260  );
261 
262 /****************************************************************************
263  *
264  * NAME: NCI_bWrite
265  */
276 PUBLIC bool_t NCI_bWrite(
277  uint32 u32WriteAddress,
278  uint32 u32WriteLength,
279  uint8 *pu8WriteData
280  );
281 
282 /****************************************************************************
283  *
284  * NAME: NCI_bEnd
285  */
295 PUBLIC bool_t NCI_bEnd(void);
296 
297 /****************************************************************************
298  *
299  * NAME: NCI_u32Nci
300  */
313 PUBLIC uint32 NCI_u32Nci(void);
314 
315 /****************************************************************************
316  *
317  * NAME: NCI_u32Config
318  */
327 PUBLIC uint32 NCI_u32Config(void);
328 
329 /****************************************************************************
330  *
331  * NAME: NCI_u32Session
332  */
341 PUBLIC uint32 NCI_u32Session(void);
342 
343 /****************************************************************************
344  *
345  * NAME: NCI_u32Sram
346  */
355 PUBLIC uint32 NCI_u32Sram(void);
356 
357 /****************************************************************************
358  *
359  * NAME: NCI_pu8Header
360  */
369 PUBLIC uint8 *NCI_pu8Header(void);
370 
371 /****************************************************************************
372  *
373  * NAME: NCI_pu8Version
374  */
382 PUBLIC uint8 *NCI_pu8Version(void);
383 
384 /****************************************************************************/
385 /*** Exported Variables ***/
386 /****************************************************************************/
387 
388 #endif /* NCI_H_ */
389 /****************************************************************************/
390 /*** END OF FILE ***/
391 /****************************************************************************/
PUBLIC uint32 NCI_u32Nci(void)
Returns the model of the NTAG in the reader&#39;s field.
PUBLIC uint8 * NCI_pu8Version(void)
Returns the 8 version information bytes for the NTAG in the reader&#39;s field.
PUBLIC void NCI_vRegCbEvent(tprNciCbEvent prRegCbEvent)
Registers callback for NCI events.
PUBLIC bool_t NCI_bRead(uint32 u32ReadAddress, uint32 u32ReadLength, uint8 *pu8ReadData)
Requests read of data from NTAG in reader&#39;s field.
Definition: nci.h:167
teNciEvent
Definition: nci.h:161
PUBLIC bool_t NCI_bEnd(void)
Ends NCI processing.
PUBLIC void NCI_vTick(uint32 u32TickMs)
Timer function to drive NCI processing.
PUBLIC bool_t NCI_bWrite(uint32 u32WriteAddress, uint32 u32WriteLength, uint8 *pu8WriteData)
Requests write of data to NTAG in reader&#39;s field.
PUBLIC uint32 NCI_u32Session(void)
Returns the byte address of the session registers of the NTAG in the reader&#39;s field.
PUBLIC bool_t NCI_bReadVersion(uint32 u32ReadLength, uint8 *pu8ReadData)
Requests read of version data from NTAG in reader&#39;s field.
Definition: nci.h:164
void(* tprNciCbEvent)(teNciEvent eNciEvent, uint32 u32Address, uint32 u32Length, uint8 *pu8Data)
Definition: nci.h:172
PUBLIC uint8 * NCI_pu8Header(void)
Returns the 16 header bytes of the memory of the NTAG in the reader&#39;s field.
Definition: nci.h:165
Definition: nci.h:168
Definition: nci.h:163
PUBLIC uint32 NCI_u32Config(void)
Returns the byte address of the configuration registers of the NTAG in the reader&#39;s field...
PUBLIC void NCI_vInitialise(uint8 u8Address, bool_t bLocation, uint32 u32FrequencyHz, uint8 u8InputVen, uint8 u8InputIrq)
Initialises NCI data and hardware.
PUBLIC uint32 NCI_u32Sram(void)
Returns the byte address of the SRAM data of the NTAG in the reader&#39;s field.
Definition: nci.h:166
Generated by   doxygen 1.8.13