libnfc 1.8.0
nfc-emulation.h File Reference

Provide a small API to ease emulation in libnfc. More...

#include <sys/types.h>
#include <nfc/nfc.h>

Go to the source code of this file.

Data Structures

struct  nfc_emulator
 NFC emulator structure. More...
struct  nfc_emulation_state_machine
 NFC emulation state machine structure. More...

Functions

NFC_EXPORT int nfc_emulate_target (nfc_device *pnd, struct nfc_emulator *emulator, const int timeout)
 Emulate a target.

Detailed Description

Provide a small API to ease emulation in libnfc.

Definition in file nfc-emulation.h.

Function Documentation

◆ nfc_emulate_target()

NFC_EXPORT int nfc_emulate_target ( nfc_device * pnd,
struct nfc_emulator * emulator,
const int timeout )

Emulate a target.

Returns
Returns 0 on success, otherwise returns libnfc's error code (negative value).
Parameters
pndnfc_device struct pointer that represents currently used device
emulator\nfc_emulator struct point that handles input/output functions

If timeout equals to 0, the function blocks indefinitely (until an error is raised or function is completed) If timeout equals to -1, the default timeout will be used

Definition at line 48 of file nfc-emulation.c.