nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
st25r3911b_nfca.h File Reference
#include <zephyr/kernel.h>
#include <zephyr/types.h>

Go to the source code of this file.

Data Structures

struct  st25r3911b_nfca_buf
 NFC-A transceiver buffer. More...
 
struct  st25r3911b_nfca_sens_resp
 NFC-A SENS response. More...
 
struct  st25r3911b_nfca_tag_info
 NFC-A Tag information. More...
 
struct  st25r3911b_nfca_crc
 NFCA_A CRC structure. More...
 
struct  st25r3911b_nfca_cb
 NFC-A callback. More...
 

Macros

#define ST25R3911B_NFCA_EVENT_CNT   2
 
#define ST25R3911B_NFCA_CRC_LEN   2
 
#define ST25R3911B_NFCA_NFCID1_MAX_LEN   10
 
#define ST25R3911B_NFCA_ERR_CRC   1
 
#define ST25R3911B_NFCA_ERR_PARITY   2
 
#define ST25R3911B_NFCA_ERR_FRAMING   3
 
#define ST25R3911B_NFCA_ERR_SOFT_FRAMING   4
 
#define ST25R3911B_NFCA_ERR_HARD_FRAMING   5
 
#define ST25R3911B_NFCA_ERR_LAST_BYTE_INCOMPLETE   6
 
#define ST25R3911B_NFCA_ERR_TRANSMISSION   7
 

Enumerations

enum  st25r3911b_nfca_tag_type {
  ST25R3911B_NFCA_TAG_TYPE_T2T , ST25R3911B_NFCA_TAG_TYPE_T4T , ST25R3911B_NFCA_TAG_TYPE_NFCDEP , ST25R3911B_NFCA_TAG_TYPE_T4T_NFCDEP ,
  ST25R3911B_NFCA_TAG_TYPE_T1T
}
 NFC-A Tag types. More...
 
enum  st25r3911b_nfca_detect_cmd { ST25R3911B_NFCA_DETECT_CMD_ALL_REQ , ST25R3911B_NFCA_DETECT_CMD_SENS_REQ }
 NFC-A Tag detect command. More...
 

Functions

int st25r3911b_nfca_init (struct k_poll_event *events, uint8_t cnt, const struct st25r3911b_nfca_cb *cb)
 Initialize NFC Reader NFC-A technology.
 
int st25r3911b_nfca_field_on (void)
 Switch on the NFC Reader field.
 
int st25r3911b_nfca_field_off (void)
 Switch off the NFC Reader field.
 
int st25r3911b_nfca_tag_detect (enum st25r3911b_nfca_detect_cmd cmd)
 Detect tag by sending a detection command.
 
int st25r3911b_nfca_anticollision_start (void)
 NFC-A collision resolution procedure.
 
int st25r3911b_nfca_transfer (const struct st25r3911b_nfca_buf *tx, const struct st25r3911b_nfca_buf *rx, uint32_t fdt, bool auto_crc)
 Exchange the specified amount of data.
 
static int st25r3911b_nfca_transfer_with_crc (const struct st25r3911b_nfca_buf *tx, const struct st25r3911b_nfca_buf *rx, uint32_t fdt)
 Exchange the specified amount of data with an automatically generated CRC.
 
static int st25r3911b_nfca_transfer_without_crc (const struct st25r3911b_nfca_buf *tx, const struct st25r3911b_nfca_buf *rx, uint32_t fdt)
 Exchange the specified amount of data with a manually generated CRC.
 
int st25r3911b_nfca_tag_sleep (void)
 Send NFC-A tag sleep command.
 
int st25r3911b_nfca_crc_calculate (const uint8_t *data, size_t len, struct st25r3911b_nfca_crc *crc_val)
 Calculate CRC 16 for NFC-A payload.
 
int st25r3911b_nfca_process (void)
 Process NFC-A library.