nfctag5 2.0.0.0
nfctag5.h File Reference

This file contains API for NFC Tag 5 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
#include "drv_analog_in.h"

Go to the source code of this file.

Data Structures

union  nfctag5_block_t
 NFC Tag 5 Click memory block union definition. More...
 
struct  nfctag5_t
 NFC Tag 5 Click context object. More...
 
struct  nfctag5_cfg_t
 NFC Tag 5 Click configuration object. More...
 

Macros

#define NFCTAG5_REG_SECTOR_SECURITY_0   0x0000
 NFC Tag 5 register list.
 
#define NFCTAG5_REG_SECTOR_SECURITY_4   0x0004
 
#define NFCTAG5_REG_SECTOR_SECURITY_8   0x0008
 
#define NFCTAG5_REG_SECTOR_SECURITY_12   0x000C
 
#define NFCTAG5_REG_SECTOR_SECURITY_16   0x0010
 
#define NFCTAG5_REG_SECTOR_SECURITY_20   0x0014
 
#define NFCTAG5_REG_SECTOR_SECURITY_24   0x0018
 
#define NFCTAG5_REG_SECTOR_SECURITY_28   0x001C
 
#define NFCTAG5_REG_SECTOR_SECURITY_32   0x0020
 
#define NFCTAG5_REG_SECTOR_SECURITY_36   0x0024
 
#define NFCTAG5_REG_SECTOR_SECURITY_40   0x0028
 
#define NFCTAG5_REG_SECTOR_SECURITY_44   0x002C
 
#define NFCTAG5_REG_SECTOR_SECURITY_48   0x0030
 
#define NFCTAG5_REG_SECTOR_SECURITY_52   0x0034
 
#define NFCTAG5_REG_SECTOR_SECURITY_56   0x0038
 
#define NFCTAG5_REG_SECTOR_SECURITY_60   0x003C
 
#define NFCTAG5_REG_SECTOR_SECURITY_STATUS_LSB   0x0800
 
#define NFCTAG5_REG_SECTOR_SECURITY_STATUS_MSB   0x0804
 
#define NFCTAG5_REG_I2C_PASSWORD   0x0900
 
#define NFCTAG5_REG_RF_PASSWORD_1   0x0904
 
#define NFCTAG5_REG_RF_PASSWORD_2   0x0908
 
#define NFCTAG5_REG_RF_PASSWORD_3   0x090C
 
#define NFCTAG5_REG_CONFIG   0x0910
 
#define NFCTAG5_REG_UID_LSB   0x0914
 
#define NFCTAG5_REG_UID_MSB   0x0918
 
#define NFCTAG5_REG_IC_REF_MEM_SIZE   0x091C
 
#define NFCTAG5_REG_CONTROL   0x0920
 
#define NFCTAG5_CAPABILITY_CONTAINER_ADDRESS   0x0000
 NFC Tag 5 NDEF message setting.
 
#define NFCTAG5_CAPABILITY_CONTAINER   0xE1, 0x40, 0x80, 0x01
 
#define NFCTAG5_NDEF_MESSAGE_START_ADDRESS   0x0004
 
#define NFCTAG5_TYPE_NDEF_MESSAGE   0x03
 
#define NFCTAG5_NDEF_RECORD_HEADER   0xD1
 
#define NFCTAG5_NDEF_TYPE_LENGTH   0x01
 
#define NFCTAG5_NDEF_URI_TYPE   'U'
 
#define NFCTAG5_NDEF_MESSAGE_END_MARK   0xFE
 
#define NFCTAG5_URI_PREFIX_0   0x00
 NFC Tag 5 NDEF URI prefix list.
 
#define NFCTAG5_URI_PREFIX_1   0x01
 
#define NFCTAG5_URI_PREFIX_2   0x02
 
#define NFCTAG5_URI_PREFIX_3   0x03
 
#define NFCTAG5_URI_PREFIX_4   0x04
 
#define NFCTAG5_URI_PREFIX_5   0x05
 
#define NFCTAG5_URI_PREFIX_6   0x06
 
#define NFCTAG5_URI_PREFIX_7   0x07
 
#define NFCTAG5_URI_PREFIX_8   0x08
 
#define NFCTAG5_URI_PREFIX_9   0x09
 
#define NFCTAG5_URI_PREFIX_10   0x0A
 
#define NFCTAG5_URI_PREFIX_11   0x0B
 
#define NFCTAG5_URI_PREFIX_12   0x0C
 
#define NFCTAG5_URI_PREFIX_13   0x0D
 
#define NFCTAG5_URI_PREFIX_14   0x0E
 
#define NFCTAG5_URI_PREFIX_15   0x0F
 
#define NFCTAG5_URI_PREFIX_16   0x10
 
#define NFCTAG5_URI_PREFIX_17   0x11
 
#define NFCTAG5_URI_PREFIX_18   0x12
 
#define NFCTAG5_URI_PREFIX_19   0x13
 
#define NFCTAG5_URI_PREFIX_20   0x14
 
#define NFCTAG5_URI_PREFIX_21   0x15
 
#define NFCTAG5_URI_PREFIX_22   0x16
 
#define NFCTAG5_URI_PREFIX_23   0x17
 
#define NFCTAG5_URI_PREFIX_24   0x18
 
#define NFCTAG5_URI_PREFIX_25   0x19
 
#define NFCTAG5_URI_PREFIX_26   0x1A
 
#define NFCTAG5_URI_PREFIX_27   0x1B
 
#define NFCTAG5_URI_PREFIX_28   0x1C
 
#define NFCTAG5_URI_PREFIX_29   0x1D
 
#define NFCTAG5_URI_PREFIX_30   0x1E
 
#define NFCTAG5_URI_PREFIX_31   0x1F
 
#define NFCTAG5_URI_PREFIX_32   0x20
 
#define NFCTAG5_URI_PREFIX_33   0x21
 
#define NFCTAG5_URI_PREFIX_34   0x22
 
#define NFCTAG5_URI_PREFIX_35   0x23
 
#define NFCTAG5_USER_MEMORY_ADDRESS_MIN   0x0000
 NFC Tag 5 User memory settings.
 
#define NFCTAG5_USER_MEMORY_ADDRESS_MAX   0x1FFF
 
#define NFCTAG5_MEMORY_BLOCK_SIZE   4
 
#define NFCTAG5_MEMORY_BLOCK_MASK   0x1FFC
 
#define NFCTAG5_ADDRESS_MODE_CONFIG   0
 NFC Tag 5 address mode selection.
 
#define NFCTAG5_ADDRESS_MODE_USER_MEMORY   1
 
#define NFCTAG5_VH_VREF_3V3   3.3
 NFC Tag 5 VH vref selection.
 
#define NFCTAG5_VH_VREF_5V   5.0
 
#define NFCTAG5_VH_VREF   NFCTAG5_VH_VREF_3V3
 
#define NFCTAG5_DEVICE_ADDRESS_CONFIG   0x57
 NFC Tag 5 device address setting.
 
#define NFCTAG5_DEVICE_ADDRESS_USER_MEMORY   0x53
 
#define NFCTAG5_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  nfctag5_return_value_t { NFCTAG5_OK = 0 , NFCTAG5_ERROR = -1 }
 NFC Tag 5 Click return value data. More...
 

Functions

void nfctag5_cfg_setup (nfctag5_cfg_t *cfg)
 NFC Tag 5 configuration object setup function.
 
err_t nfctag5_init (nfctag5_t *ctx, nfctag5_cfg_t *cfg)
 NFC Tag 5 initialization function.
 
err_t nfctag5_default_cfg (nfctag5_t *ctx)
 NFC Tag 5 default configuration function.
 
err_t nfctag5_set_address_mode (nfctag5_t *ctx, uint8_t mode)
 NFC Tag 5 set address mode function.
 
err_t nfctag5_write_memory_block (nfctag5_t *ctx, uint16_t block_addr, nfctag5_block_t *block)
 NFC Tag 5 write memory block function.
 
err_t nfctag5_read_memory_block (nfctag5_t *ctx, uint16_t block_addr, nfctag5_block_t *block)
 NFC Tag 5 read memory block function.
 
err_t nfctag5_write_multiple_memory_block (nfctag5_t *ctx, uint16_t block_addr, nfctag5_block_t *block, uint8_t num_blocks)
 NFC Tag 5 write multiple memory block function.
 
err_t nfctag5_read_multiple_memory_block (nfctag5_t *ctx, uint16_t block_addr, nfctag5_block_t *block, uint8_t num_blocks)
 NFC Tag 5 read multiple memory block function.
 
err_t nfctag5_write_ndef_uri_record (nfctag5_t *ctx, uint8_t uri_prefix, uint8_t *uri_data, uint8_t data_len)
 NFC Tag 5 write NDEF URI record function.
 
err_t nfctag5_format_memory (nfctag5_t *ctx)
 NFC Tag 5 format memory function.
 
err_t nfctag5_write_message_to_memory (nfctag5_t *ctx, uint16_t block_addr, uint8_t *message, uint16_t message_len)
 NFC Tag 5 write message to memory function.
 
err_t nfctag5_read_message_from_memory (nfctag5_t *ctx, uint16_t block_addr, uint8_t *message, uint16_t message_len)
 NFC Tag 5 read message from memory function.
 
err_t nfctag5_read_vh_pin_value (nfctag5_t *ctx, uint16_t *data_out)
 NFC Tag 5 read AN pin value function.
 
err_t nfctag5_read_vh_pin_voltage (nfctag5_t *ctx, float *data_out)
 NFC Tag 5 read VH pin voltage level function.
 
uint8_t nfctag5_get_busy_pin (nfctag5_t *ctx)
 NFC Tag 5 get busy pin function.
 

Detailed Description

This file contains API for NFC Tag 5 Click Driver.

Enumeration Type Documentation

◆ nfctag5_return_value_t

NFC Tag 5 Click return value data.

Predefined enum values for driver return values.

Enumerator
NFCTAG5_OK 
NFCTAG5_ERROR