libnfc  1.7.0-rc7
Functions
nfc-emulation.c File Reference

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

#include <nfc/nfc.h>
#include <nfc/nfc-emulation.h>
#include "iso7816.h"

Go to the source code of this file.

Functions

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.c.

Function Documentation

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.