rfid 2.0.0.0
|
API for configuring and manipulating RFID Click driver. More...
Topics | |
RFID Registers List | |
List of registers of RFID Click driver. | |
RFID Registers Settings | |
Settings for registers of RFID Click driver. | |
RFID MikroBUS Map | |
MikroBUS pin mapping of RFID Click driver. | |
Functions | |
void | rfid_cfg_setup (rfid_cfg_t *cfg) |
RFID configuration object setup function. | |
err_t | rfid_init (rfid_t *ctx, rfid_cfg_t *cfg) |
RFID initialization function. | |
err_t | rfid_default_cfg (rfid_t *ctx) |
RFID default configuration function. | |
err_t | rfid_send_command (rfid_t *ctx, uint8_t cmd, uint8_t *data_in, uint8_t len) |
RFID command writing function. | |
err_t | rfid_read_data (rfid_t *ctx, uint8_t *data_out) |
RFID data reading function. | |
uint8_t | rfid_data_ready (rfid_t *ctx) |
RFID data ready function. | |
err_t | rfid_reset (rfid_t *ctx) |
RFID reset function. | |
err_t | rfid_check_echo (rfid_t *ctx) |
RFID check echo response. | |
err_t | rfid_calibration (rfid_t *ctx) |
RFID calibration function. | |
err_t | rfid_get_device_id (rfid_t *ctx, uint8_t *device_id) |
RFID get device id function. | |
err_t | rfid_select_communication_interface (rfid_t *ctx, uint8_t com_interface) |
Select communication interface. | |
err_t | rfid_select_rfid_protocol (rfid_t *ctx, uint8_t rfid_protocol) |
Select RF communication protocol. | |
err_t | rfid_set_index_mod_and_gain (rfid_t *ctx) |
Configure IndexMod and Gain. | |
err_t | rfid_auto_detect_filter (rfid_t *ctx) |
Configure auto detect filter. | |
err_t | rfid_get_tag_uid (rfid_t *ctx, uint8_t rfid_protocol, uint8_t *tag_uid) |
RFID get RFID tag uid function. | |
API for configuring and manipulating RFID Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
err_t rfid_auto_detect_filter | ( | rfid_t * | ctx | ) |
Configure auto detect filter.
This function sets Auto Detect filter register.
[in] | ctx | : Click context object. See rfid_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t rfid_calibration | ( | rfid_t * | ctx | ) |
RFID calibration function.
This function calibrates the module.
[in] | ctx | : Click context object. See rfid_t object definition for detailed explanation. |
0
- Success, -1
- Error.void rfid_cfg_setup | ( | rfid_cfg_t * | cfg | ) |
RFID configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See rfid_cfg_t object definition for detailed explanation. |
err_t rfid_check_echo | ( | rfid_t * | ctx | ) |
RFID check echo response.
This function checks the echo response.
[in] | ctx | : Click context object. See rfid_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint8_t rfid_data_ready | ( | rfid_t * | ctx | ) |
RFID data ready function.
This function checks if there's any data ready ( SPI mode only ).
[in] | ctx | : Click context object. See rfid_t object definition for detailed explanation. |
0x08
- data is ready, 0
- data is not ready.err_t rfid_default_cfg | ( | rfid_t * | ctx | ) |
RFID default configuration function.
This function executes a default configuration of RFID click board.
[in] | ctx | : Click context object. See rfid_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t rfid_get_device_id | ( | rfid_t * | ctx, |
uint8_t * | device_id ) |
RFID get device id function.
This function gets the device id.
[in] | ctx | : Click context object. |
[out] | device_id | : Device id. See rfid_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t rfid_get_tag_uid | ( | rfid_t * | ctx, |
uint8_t | rfid_protocol, | ||
uint8_t * | tag_uid ) |
RFID get RFID tag uid function.
This function gets the RFID tag uid.
[in] | ctx | : Click context object. |
[in] | rfid_protocol | : RFID protocol ( 0x02 - RFID_ISO_14443A, 0x04 - RFID_ISO_18092NFC ). |
[out] | tag_uid | : Tag uid. See rfid_t object definition for detailed explanation. |
>0
- Tag length in bytes, 0
- No tag detected, -1
- Error.err_t rfid_init | ( | rfid_t * | ctx, |
rfid_cfg_t * | cfg ) |
RFID initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See rfid_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See rfid_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t rfid_read_data | ( | rfid_t * | ctx, |
uint8_t * | data_out ) |
RFID data reading function.
This function reads all available data bytes.
[in] | ctx | : Click context object. See rfid_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error.err_t rfid_reset | ( | rfid_t * | ctx | ) |
RFID reset function.
This function resets the device ( SPI mode only ).
[in] | ctx | : Click context object. See rfid_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t rfid_select_communication_interface | ( | rfid_t * | ctx, |
uint8_t | com_interface ) |
Select communication interface.
This function selects the communication interface.
[in] | ctx | : Click context object. See rfid_t object definition for detailed explanation. |
[in] | com_interface | : Communication interface ( 0x01 - SPI, 0x00 - UART ). |
0
- Success, -1
- Error.err_t rfid_select_rfid_protocol | ( | rfid_t * | ctx, |
uint8_t | rfid_protocol ) |
Select RF communication protocol.
This function selects the RF communication protocol.
[in] | ctx | : Click context object. |
[in] | rfid_protocol | : RFID protocol ( 0x02 - RFID_ISO_14443A, 0x04 - RFID_ISO_18092NFC ). See rfid_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t rfid_send_command | ( | rfid_t * | ctx, |
uint8_t | cmd, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
RFID command writing function.
This function writes a desired number of data bytes starting from the selected command.
[in] | ctx | : Click context object. See rfid_t object definition for detailed explanation. |
[in] | cmd | : Command byte. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error.err_t rfid_set_index_mod_and_gain | ( | rfid_t * | ctx | ) |
Configure IndexMod and Gain.
This function sets IndexMod and Gain in Analog Value register.
[in] | ctx | : Click context object. See rfid_t object definition for detailed explanation. |
0
- Success, -1
- Error.