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

NFC ZigBee 3.0

NFC ZigBee 3.0 Modules and Libraries
NFC Commissioning using ZigBee Installation Codes
ntag.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * MODULE: NFC
4  *
5  * COMPONENT: ntag.h
6  *
7  * AUTHOR: Martin Looker
8  *
9  * DESCRIPTION: NTAG driver for reading and writing data (interface)
10  *
11  * $HeadURL: https://www.collabnet.nxp.com/svn/lprf_sware/Projects/Components/NFC/Tags/+v1000/Include/ntag.h $
12  *
13  * $Revision: 83835 $
14  *
15  * $LastChangedBy: nxp29761 $
16  *
17  * $LastChangedDate: 2016-10-04 15:29:56 +0100 (Tue, 04 Oct 2016) $
18  *
19  * $Id: ntag.h 83835 2016-10-04 14:29:56Z 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  ***************************************************************************/
130 #ifndef NTAG_H_
131 #define NTAG_H_
132 
133 /****************************************************************************/
134 /*** Include Files ***/
135 /****************************************************************************/
136 #include <jendefs.h>
137 
138 /****************************************************************************/
139 /*** Macro Definitions ***/
140 /****************************************************************************/
141 
142 /****************************************************************************/
143 /*** Type Definitions ***/
144 /****************************************************************************/
146 typedef enum
147 {
158 } teNtagEvent;
159 
161 typedef void (*tprNtagCbEvent)( /* Called when an event takes place */
162  teNtagEvent eNtagEvent, /* Event raised */
163  uint32 u32Address,
164  uint32 u32Length,
165  uint8 *pu8Data); /* Event data (NULL if no data) */
166 
167 /****************************************************************************/
168 /*** Exported Functions (called by application) ***/
169 /****************************************************************************/
170 /****************************************************************************
171  *
172  * NAME: NTAG_vInitialise
173  */
177 PUBLIC void NTAG_vInitialise(
178  uint8 u8Address,
179  bool_t bLocation,
180  uint32 u32FrequencyHz,
181  uint8 u8InputFd
182  );
183 
184 /****************************************************************************
185  *
186  * NAME: NTAG_vRegCbEvent
187  */
191 PUBLIC void NTAG_vRegCbEvent(
192  tprNtagCbEvent prRegCbEvent
193  );
194 
195 /****************************************************************************
196  *
197  * NAME: NTAG_vTick
198  */
204 PUBLIC void NTAG_vTick(
205  uint32 u32TickMs
206  );
207 
208 /****************************************************************************
209  *
210  * NAME: NTAG_bRead
211  */
222 PUBLIC bool_t NTAG_bRead(
223  uint32 u32ReadAddress,
224  uint32 u32ReadLength,
225  uint8 *pu8ReadData
226  );
227 
228 /****************************************************************************
229  *
230  * NAME: NTAG_bReadVersion
231  */
245 PUBLIC bool_t NTAG_bReadVersion(
246  uint32 u32ReadLength,
247  uint8 *pu8ReadData
248  );
249 
250 /****************************************************************************
251  *
252  * NAME: NTAG_bWrite
253  */
264 PUBLIC bool_t NTAG_bWrite(
265  uint32 u32WriteAddress,
266  uint32 u32WriteLength,
267  uint8 *pu8WriteData
268  );
269 
270 /****************************************************************************
271  *
272  * NAME: NTAG_bReadReg
273  */
287 PUBLIC bool_t NTAG_bReadReg(
288  uint32 u32ReadAddress, /*<! Byte address of read */
289  uint32 u32ReadLength, /*<! Number of bytes to read (minimum 1) */
290  uint8 *pu8ReadData /*<! Buffer to read data into */
291  );
292 
293 /****************************************************************************
294  *
295  * NAME: NTAG_bWriteReg
296  */
312 PUBLIC bool_t NTAG_bWriteReg(
313  uint32 u32WriteAddress,
314  uint32 u32WriteLength,
315  uint8 *pu8WriteData
316  );
317 
318 /****************************************************************************
319  *
320  * NAME: NTAG_u32Ntag
321  */
334 PUBLIC uint32 NTAG_u32Ntag(void);
335 
336 /****************************************************************************
337  *
338  * NAME: NTAG_u32Config
339  */
348 PUBLIC uint32 NTAG_u32Config(void);
349 
350 /****************************************************************************
351  *
352  * NAME: NTAG_u32Session
353  */
362 PUBLIC uint32 NTAG_u32Session(void);
363 
364 /****************************************************************************
365  *
366  * NAME: NTAG_u32Sram
367  */
376 PUBLIC uint32 NTAG_u32Sram(void);
377 
378 /****************************************************************************
379  *
380  * NAME: NTAG_pu8Header
381  */
390 PUBLIC uint8 *NTAG_pu8Header(void);
391 
392 /****************************************************************************
393  *
394  * NAME: NTAG_pu8Version
395  */
403 PUBLIC uint8 *NTAG_pu8Version(void);
404 
405 /****************************************************************************/
406 /*** Exported Variables ***/
407 /****************************************************************************/
408 
409 #endif /* NTAG_H_ */
410 /****************************************************************************/
411 /*** END OF FILE ***/
412 /****************************************************************************/
PUBLIC uint8 * NTAG_pu8Header(void)
Returns the 16 header bytes of the NTAG&#39;s memory.
Definition: ntag.h:149
PUBLIC void NTAG_vTick(uint32 u32TickMs)
Timer function to drive NTAG processing.
PUBLIC uint32 NTAG_u32Session(void)
Returns the byte address of the NTAG&#39;s session registers.
void(* tprNtagCbEvent)(teNtagEvent eNtagEvent, uint32 u32Address, uint32 u32Length, uint8 *pu8Data)
Definition: ntag.h:161
PUBLIC bool_t NTAG_bWriteReg(uint32 u32WriteAddress, uint32 u32WriteLength, uint8 *pu8WriteData)
Requests write of NTAG register data.
Definition: ntag.h:155
Definition: ntag.h:157
Definition: ntag.h:154
PUBLIC bool_t NTAG_bReadVersion(uint32 u32ReadLength, uint8 *pu8ReadData)
Requests read of NTAG version data.
PUBLIC uint32 NTAG_u32Sram(void)
Returns the byte address of the NTAG&#39;s SRAM.
Definition: ntag.h:150
PUBLIC bool_t NTAG_bRead(uint32 u32ReadAddress, uint32 u32ReadLength, uint8 *pu8ReadData)
Requests read of NTAG data.
Definition: ntag.h:152
Definition: ntag.h:153
Definition: ntag.h:148
PUBLIC void NTAG_vRegCbEvent(tprNtagCbEvent prRegCbEvent)
Registers callback for NTAG events.
PUBLIC uint32 NTAG_u32Ntag(void)
Returns the NTAG model.
teNtagEvent
Definition: ntag.h:146
PUBLIC uint8 * NTAG_pu8Version(void)
Returns the 8 version information bytes for the NTAG.
PUBLIC bool_t NTAG_bReadReg(uint32 u32ReadAddress, uint32 u32ReadLength, uint8 *pu8ReadData)
Requests read of NTAG register data.
Definition: ntag.h:151
PUBLIC uint32 NTAG_u32Config(void)
Returns the byte address of the NTAG&#39;s configuration registers.
Definition: ntag.h:156
PUBLIC bool_t NTAG_bWrite(uint32 u32WriteAddress, uint32 u32WriteLength, uint8 *pu8WriteData)
Requests write of NTAG data.
PUBLIC void NTAG_vInitialise(uint8 u8Address, bool_t bLocation, uint32 u32FrequencyHz, uint8 u8InputFd)
Initialises NTAG data and hardware.
Generated by   doxygen 1.8.13