rfid2 2.0.0.0
RFID 2 Click Driver

API for configuring and manipulating RFID 2 Click driver. More...

Topics

 RFID 2 Device Settings
 Settings for registers of RFID 2 Click driver.
 
 RFID 2 MikroBUS Map
 MikroBUS pin mapping of RFID 2 Click driver.
 

Functions

void rfid2_cfg_setup (rfid2_cfg_t *cfg)
 RFID 2 configuration object setup function.
 
err_t rfid2_init (rfid2_t *ctx, rfid2_cfg_t *cfg)
 RFID 2 initialization function.
 
err_t rfid2_generic_write (rfid2_t *ctx, char *data_buf, uint16_t len)
 RFID 2 data writing function.
 
err_t rfid2_generic_read (rfid2_t *ctx, char *data_buf, uint16_t max_len)
 RFID 2 data reading function.
 
uint8_t rfid2_get_interrupt (rfid2_t *ctx)
 RFID 2 read state interrupt(INT) pin function.
 
void rfid2_reset (rfid2_t *ctx)
 RFID 2 reset chip function.
 

Detailed Description

API for configuring and manipulating RFID 2 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

◆ rfid2_cfg_setup()

void rfid2_cfg_setup ( rfid2_cfg_t * cfg)

RFID 2 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ rfid2_generic_read()

err_t rfid2_generic_read ( rfid2_t * ctx,
char * data_buf,
uint16_t max_len )

RFID 2 data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See rfid2_t object definition for detailed explanation.
[out]data_buf: Output read data.
[in]max_len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer.
See #err_t definition for detailed explanation.
Note
None.

◆ rfid2_generic_write()

err_t rfid2_generic_write ( rfid2_t * ctx,
char * data_buf,
uint16_t len )

RFID 2 data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See rfid2_t object definition for detailed explanation.
[in]data_buf: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ rfid2_get_interrupt()

uint8_t rfid2_get_interrupt ( rfid2_t * ctx)

RFID 2 read state interrupt(INT) pin function.

This function read state interrupt(INT) pin.

Parameters
[in]ctx: Click context object. See rfid2_t object definition for detailed explanation.
Returns
State interrupt(INT) pin.
Note
None.

◆ rfid2_init()

err_t rfid2_init ( rfid2_t * ctx,
rfid2_cfg_t * cfg )

RFID 2 initialization function.

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

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

◆ rfid2_reset()

void rfid2_reset ( rfid2_t * ctx)

RFID 2 reset chip function.

This function resets the chip.

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