|
bool | NfcNxpLibInit (const struct nfc_nxp_t *Nfc) |
| Initialises NFC instance structure, connects it to SPI.
Powers up pn512 if supported. More...
|
|
bool | NfcNxpLibDisable (const struct nfc_nxp_t *Nfc) |
| Disables interrupts from pn512 and releases SPI.
Powers down pn512 if supported by product HW. More...
|
|
void | NfcNxpResetReader (const struct nfc_nxp_t *Nfc) |
| Performs pn512 HW reset. pn512 switches to configuration mode after reset.
NB! It should be verified that pn512 is in configuration mode with NfcNxpGetMode() function after reset before any subsequent operation. More...
|
|
bool | NfcNxpSetup (const struct nfc_nxp_t *Nfc) |
| Sets up pn512 registers according to preconfigured parameters.
NB! pn512 should be in configuration mode. More...
|
|
uint8_t | NfcNxpDiscovery (const struct nfc_nxp_t *Nfc, bool Continue) |
| Starts cards detection phase. During execution NFC lib is in the reader mode.
NFC lib loops through all the available (configured) RF technologies. More...
|
|
void | NfcNxpGetUid (const struct nfc_nxp_t *Nfc, uint8_t TagIndex, uint8_t **Uid, uint8_t *UidLen) |
| Returns UID of one of detected tags. More...
|
|
void | NfcNxpSetNdefFile (const struct nfc_nxp_t *Nfc, uint8_t *NdefFile, uint16_t NdefFileSize) |
| Sets a memory buffer as an NDEF file for subsequent NfcNrfCardEmulation function call. More...
|
|
void | NfcNxpCardEmulation (const struct nfc_nxp_t *Nfc) |
| Starts external RF detection phase During execution NFC lib is in the card emulation mode.
. More...
|
|
void | NfcNxpInterruptCb (const struct nfc_nxp_t *Nfc) |
| Driver's HW interrupt callback to be exposed to EVE config. More...
|
|
This NFC driver supports pn512 NFC chip connected with EVE SPI driver.
typedef void(* nfc_irq_callback_t) (const struct nfc_nxp_t *Nfc) |
The callback is called on interrupt from pn512.
- Parameters
-
Definition at line 127 of file nfc-nxp.h.
bool NfcNxpLibInit |
( |
const struct nfc_nxp_t * |
Nfc | ) |
|
Initialises NFC instance structure, connects it to SPI.
Powers up pn512 if supported.
- Parameters
-
bool NfcNxpLibDisable |
( |
const struct nfc_nxp_t * |
Nfc | ) |
|
Disables interrupts from pn512 and releases SPI.
Powers down pn512 if supported by product HW.
- Parameters
-
void NfcNxpResetReader |
( |
const struct nfc_nxp_t * |
Nfc | ) |
|
Performs pn512 HW reset. pn512 switches to configuration mode after reset.
NB! It should be verified that pn512 is in configuration mode with NfcNxpGetMode() function after reset before any subsequent operation.
- Parameters
-
bool NfcNxpSetup |
( |
const struct nfc_nxp_t * |
Nfc | ) |
|
Sets up pn512 registers according to preconfigured parameters.
NB! pn512 should be in configuration mode.
- Parameters
-
uint8_t NfcNxpDiscovery |
( |
const struct nfc_nxp_t * |
Nfc, |
|
|
bool |
Continue |
|
) |
| |
Starts cards detection phase. During execution NFC lib is in the reader mode.
NFC lib loops through all the available (configured) RF technologies.
- Parameters
-
Nfc | NFC driver descriptor |
Continue | true: start technologies discovery loop and discover cards in the first available technology. false: discover cards in the next available technology. |
- Returns
- uint8_t Number of cards detected for the first available technology (Continue==false), or the next available technology ((Continue==true). Return value of 0 means there is no next technology.
void NfcNxpGetUid |
( |
const struct nfc_nxp_t * |
Nfc, |
|
|
uint8_t |
TagIndex, |
|
|
uint8_t ** |
Uid, |
|
|
uint8_t * |
UidLen |
|
) |
| |
Returns UID of one of detected tags.
- Parameters
-
[in] | Nfc | NFC driver descriptor |
[in] | TagIndex | Index of the card in the array of detected cards to read. |
[out] | Uid | UID of the requested card |
[out] | UidLen | Length of the UID returned |
void NfcNxpSetNdefFile |
( |
const struct nfc_nxp_t * |
Nfc, |
|
|
uint8_t * |
NdefFile, |
|
|
uint16_t |
NdefFileSize |
|
) |
| |
Sets a memory buffer as an NDEF file for subsequent NfcNrfCardEmulation function call.
- Parameters
-
Nfc | NFC driver descriptor |
NdefFile | Pointer to the buffer to set. |
NdefFileSize | Full buffer length (not current data length!) |
void NfcNxpCardEmulation |
( |
const struct nfc_nxp_t * |
Nfc | ) |
|
Starts external RF detection phase During execution NFC lib is in the card emulation mode.
.
- Parameters
-
Nfc | NFC driver descriptor param TypeName NDEF record type name - NULL terminated ASCII string param Data NDEF record data param DataLen NDEF record data length |
void NfcNxpInterruptCb |
( |
const struct nfc_nxp_t * |
Nfc | ) |
|
Driver's HW interrupt callback to be exposed to EVE config.
- Parameters
-
Nfc | Pointer to NFC instance structure |