libnfc  1.7.0-rc7
Data Structures | Functions
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. More...
 

Detailed Description

Provide a small API to ease emulation in libnfc.

Definition in file nfc-emulation.h.

Function Documentation

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
emulatorstruct 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 47 of file nfc-emulation.c.