User manual

NXP Semiconductors
AN11480
Quick Start Up Guide for EXPLORE NFC working with Raspberry Pi
AN11480
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2013. All rights reserved.
Application note
COMPANY PUBLIC
Rev. 1.017 December 2013
279710
24 of 30
7. Type the following command: cmake ../source
8. Compile the source with the command make
9. Run the program with the command ./Snep_client
8.5 Timers
In the NXP Reader Library P2P there is the OSAL module
NxpRdLib_PublicRelease/comps/phOsal encapsulating memory allocation and
time related functions. Time related functions are more precisely described in
[10.]. Basically there are two groups:
Timer handling functions for general usage of the timers.
Waiting Delay the current task stops execution for a given amount of time.
8.5.1 Importance of timers
The SNEP client communicates on the Logical Link Control Protocol (LLCP). In
the LLCP there is Link Timeout defined which ensures periodical exchange of
the Symmetry token to determine and avoid a termination of the logical link.[11.]
Therefore at least one timer is utilized by the SNEP client application. Obviously
the timers can be used by the user for any purpose.
8.5.2 Selection of the timers
Depending on the used hardware platform the correct part of the OSAL module
need to be compiled.
Since this application note deals with the Raspberry Pi board, this option needs
to be configured.
Raspberry Pi board
Uncomment in ph_NxpBuild.h
:
NXPBUILD__PH_OSAL_R_Pi
.
Comment in ph_NxpBuild.h:
NXPBUILD__PH_OSAL_12XX
Implementation: raspbian wheezy OS software timer and signal functions
from time.h and signal.h respectively. See implementation of the software
timers and handling the signals in the source file
comps/phOsal/src/RaspberryPi/phOsal_R_Pi.c. See the headers time.h and
signal.h are included.
This option is mentioned only for comparison, if interested.