libnfc  1.8.0
Data Structures | Macros
nfc-internal.h File Reference

Internal defines and macros. More...

#include <stdbool.h>
#include <err.h>
#include <sys/time.h>
#include "nfc/nfc.h"
#include "log.h"

Go to the source code of this file.

Data Structures

struct  nfc_context
 NFC library context Struct which contains internal options, references, pointers, etc. used by library. More...
 
struct  nfc_device
 NFC device information. More...
 

Macros

#define HAL(FUNCTION, ...)
 Execute corresponding driver function if exists. More...
 

Detailed Description

Internal defines and macros.

Definition in file nfc-internal.h.

Macro Definition Documentation

◆ HAL

#define HAL (   FUNCTION,
  ... 
)
Value:
pnd->last_error = 0; \
if (pnd->driver->FUNCTION) { \
return pnd->driver->FUNCTION( __VA_ARGS__ ); \
} else { \
pnd->last_error = NFC_EDEVNOTSUPP; \
return false; \
}
#define NFC_EDEVNOTSUPP
Definition: nfc.h:170

Execute corresponding driver function if exists.

@macro HAL

Definition at line 47 of file nfc-internal.h.