Android Hardware Abstraction Layer
Data Fields
nfc_tag_device Struct Reference

#include <nfc_tag.h>

Data Fields

struct hw_device_t common
 
int(* init )(const struct nfc_tag_device *dev)
 
int(* setContent )(const struct nfc_tag_device *dev, const uint8_t *data, size_t len)
 
int(* getMemorySize )(const struct nfc_tag_device *dev)
 

Detailed Description

Definition at line 38 of file nfc_tag.h.

Field Documentation

struct hw_device_t common

Definition at line 39 of file nfc_tag.h.

int(* getMemorySize)(const struct nfc_tag_device *dev)

Returns the memory size of the data area.

Definition at line 68 of file nfc_tag.h.

int(* init)(const struct nfc_tag_device *dev)

Initialize the NFC tag.

The driver must:

  • Set the static lock bytes to read only
  • Configure the Capability Container to disable write acess eg: 0xE1 0x10 <size> 0x0F

This function is called once before any calls to setContent().

Return 0 on success or -errno on error.

Definition at line 53 of file nfc_tag.h.

int(* setContent)(const struct nfc_tag_device *dev, const uint8_t *data, size_t len)

Set the NFC tag content.

The driver must write <data> in the data area of the tag starting at byte 0 of block 4 and zero the rest of the data area.

Returns 0 on success or -errno on error.

Definition at line 63 of file nfc_tag.h.


The documentation for this struct was generated from the following file: