nfc6 2.1.0.0
NFC 6 Click Driver

API for configuring and manipulating NFC 6 Click driver. More...

Topics

 NFC 6 Registers List
 List of registers of NFC 6 Click driver.
 
 NFC 6 Registers Settings
 Settings for registers of NFC 6 Click driver.
 
 NFC 6 MikroBUS Map
 MikroBUS pin mapping of NFC 6 Click driver.
 

Functions

void nfc6_cfg_setup (nfc6_cfg_t *cfg)
 NFC 6 configuration object setup function.
 
err_t nfc6_init (nfc6_t *ctx, nfc6_cfg_t *cfg)
 NFC 6 initialization function.
 
err_t nfc6_default_cfg (nfc6_t *ctx)
 NFC 6 default configuration function.
 
err_t nfc6_send_command (nfc6_t *ctx, uint8_t cmd, uint8_t *data_in, uint8_t len)
 NFC 6 send command function.
 
err_t nfc6_read_data (nfc6_t *ctx, uint8_t *data_out, uint16_t buffer_size, uint16_t *rx_len)
 NFC 6 read data function.
 
err_t nfc6_poll_ready (nfc6_t *ctx)
 NFC 6 poll ready function.
 
err_t nfc6_poll_ready_irq (nfc6_t *ctx)
 NFC 6 poll ready irq function.
 
err_t nfc6_reset_device (nfc6_t *ctx)
 NFC 6 reset device function.
 
err_t nfc6_check_command_echo (nfc6_t *ctx)
 NFC 6 check command echo function.
 
void nfc6_pulse_irq_in (nfc6_t *ctx)
 NFC 6 pulse irq in function.
 
void nfc6_set_irq_in_pin (nfc6_t *ctx, uint8_t state)
 NFC 6 set irq in pin function.
 
uint8_t nfc6_get_irq_out_pin (nfc6_t *ctx)
 NFC 6 get irq out pin function.
 
err_t nfc6_calibrate_device (nfc6_t *ctx)
 NFC 6 calibrate device function.
 
err_t nfc6_select_protocol (nfc6_t *ctx, uint8_t protocol)
 NFC 6 select protocol function.
 
err_t nfc6_read_mifare_tag_uid (nfc6_t *ctx, uint8_t *tag_uid, uint8_t *tag_uid_len)
 NFC 6 read MIFARE tag UID function.
 

Detailed Description

API for configuring and manipulating NFC 6 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ nfc6_calibrate_device()

err_t nfc6_calibrate_device ( nfc6_t * ctx)

NFC 6 calibrate device function.

This function performs the tag detection calibration.

Parameters
[in]ctx: Click context object. See nfc6_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ nfc6_cfg_setup()

void nfc6_cfg_setup ( nfc6_cfg_t * cfg)

NFC 6 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See nfc6_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ nfc6_check_command_echo()

err_t nfc6_check_command_echo ( nfc6_t * ctx)

NFC 6 check command echo function.

This function checks the communication by sending and checking the command echo response.

Parameters
[in]ctx: Click context object. See nfc6_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ nfc6_default_cfg()

err_t nfc6_default_cfg ( nfc6_t * ctx)

NFC 6 default configuration function.

This function executes a default configuration of NFC 6 click board.

Parameters
[in]ctx: Click context object. See nfc6_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ nfc6_get_irq_out_pin()

uint8_t nfc6_get_irq_out_pin ( nfc6_t * ctx)

NFC 6 get irq out pin function.

This function returns the IRQ_OUT pin logic state.

Parameters
[in]ctx: Click context object. See nfc6_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ nfc6_init()

err_t nfc6_init ( nfc6_t * ctx,
nfc6_cfg_t * cfg )

NFC 6 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See nfc6_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See nfc6_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ nfc6_poll_ready()

err_t nfc6_poll_ready ( nfc6_t * ctx)

NFC 6 poll ready function.

This function waits for the device data ready indication via command interface.

Parameters
[in]ctx: Click context object. See nfc6_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ nfc6_poll_ready_irq()

err_t nfc6_poll_ready_irq ( nfc6_t * ctx)

NFC 6 poll ready irq function.

This function waits for the device data ready indication via IRQ pin.

Parameters
[in]ctx: Click context object. See nfc6_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ nfc6_pulse_irq_in()

void nfc6_pulse_irq_in ( nfc6_t * ctx)

NFC 6 pulse irq in function.

This function sends a pulse on the IRQ_IN pin.

Parameters
[in]ctx: Click context object. See nfc6_t object definition for detailed explanation.
Returns
None.
Note
None.

◆ nfc6_read_data()

err_t nfc6_read_data ( nfc6_t * ctx,
uint8_t * data_out,
uint16_t buffer_size,
uint16_t * rx_len )

NFC 6 read data function.

This function reads a response data bytes by using SPI serial interface.

Parameters
[in]ctx: Click context object. See nfc6_t object definition for detailed explanation.
[out]data_out: Output read data.
[in]buffer_size: Data output buffer size.
[out]rx_len: Number of bytes that were available for read.
Returns
  • 0 - Success,
  • -1 - Error,
  • >0 - Response code error. See #err_t definition for detailed explanation.
Note
None.

◆ nfc6_read_mifare_tag_uid()

err_t nfc6_read_mifare_tag_uid ( nfc6_t * ctx,
uint8_t * tag_uid,
uint8_t * tag_uid_len )

NFC 6 read MIFARE tag UID function.

This function reads the UID of a MIFARE ISO14443-A type tags with 4-byte or 7-byte UIDs.

Parameters
[in]ctx: Click context object. See nfc6_t object definition for detailed explanation.
[out]tag_uid: MIFARE tag UID array (up to 7 bytes).
[out]tag_uid_len: MIFARE tag UID lenght.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ nfc6_reset_device()

err_t nfc6_reset_device ( nfc6_t * ctx)

NFC 6 reset device function.

This function performs a device software reset.

Parameters
[in]ctx: Click context object. See nfc6_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ nfc6_select_protocol()

err_t nfc6_select_protocol ( nfc6_t * ctx,
uint8_t protocol )

NFC 6 select protocol function.

This function selects the RF communication protocol and prepares the ST25R95 for communication with a contactless tag.

Parameters
[in]ctx: Click context object. See nfc6_t object definition for detailed explanation.
[in]protocol:
  • 0 - RF field OFF,
  • 1 - ISO/IEC 15693,
  • 2 - ISO/IEC 14443-A,
  • 3 - ISO/IEC 14443-B,
  • 4 - FeliCa.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ nfc6_send_command()

err_t nfc6_send_command ( nfc6_t * ctx,
uint8_t cmd,
uint8_t * data_in,
uint8_t len )

NFC 6 send command function.

This function sends a desired command by using SPI serial interface.

Parameters
[in]ctx: Click context object. See nfc6_t object definition for detailed explanation.
[in]cmd: Command byte to send.
[in]data_in: Command parameter buffer.
[in]len: Number of bytes in parameter buffer.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ nfc6_set_irq_in_pin()

void nfc6_set_irq_in_pin ( nfc6_t * ctx,
uint8_t state )

NFC 6 set irq in pin function.

This function sets the IRQ_IN pin logic state.

Parameters
[in]ctx: Click context object. See nfc6_t object definition for detailed explanation.
[in]state: Pin logic state.
Returns
None.
Note
None.