nfc 2.1.0.0
|
API for configuring and manipulating NFC Click driver. More...
Topics | |
NFC Registers Settings | |
Settings for registers of NFC Click driver. | |
NFC MikroBUS Map | |
MikroBUS pin mapping of NFC Click driver. | |
Functions | |
void | nfc_cfg_setup (nfc_cfg_t *cfg) |
NFC configuration object setup function. | |
err_t | nfc_init (nfc_t *ctx, nfc_cfg_t *cfg) |
NFC initialization function. | |
void | nfc_default_cfg (nfc_t *ctx, control_packet_t *ctrl_pck) |
NFC default configuration function. | |
err_t | nfc_generic_write (nfc_t *ctx, uint8_t *p_tx_data, uint8_t n_bytes) |
NFC I2C writing function. | |
err_t | nfc_generic_read (nfc_t *ctx, uint8_t *p_rx_h_data, uint8_t *p_rx_p_data) |
NFC I2C reading function. | |
void | nfc_hw_reset (nfc_t *ctx) |
HW reset function. | |
uint8_t | nfc_get_data (nfc_t *ctx, uint8_t *p_rx_data) |
Get data function. | |
void | nfc_read_ctrl_packet_data (nfc_t *ctx, control_packet_t *ctrl_pck) |
Read control packet data function. | |
void | nfc_write_ctrl_packet_data (nfc_t *ctx, control_packet_t ctrl_pck) |
Write control packet data function. | |
uint8_t | nfc_check_irq (nfc_t *ctx) |
Check IRQ ststus function. | |
void | nfc_cmd_core_reset (nfc_t *ctx) |
Core reset command function. | |
void | nfc_cmd_core_init (nfc_t *ctx) |
Core init command function. | |
void | nfc_cmd_disable_standby_mode (nfc_t *ctx) |
Disable standby mode command function. | |
void | nfc_cmd_antenna_test (nfc_t *ctx, uint8_t sel_ant) |
Antenna test function. | |
void | nfc_cmd_test_procedure (nfc_t *ctx) |
NFC test procedure command function. | |
void | nfc_core_reset (nfc_t *ctx) |
Core reset command function. | |
void | nfc_init_core (nfc_t *ctx) |
Core initialization command function. | |
void | nfc_core_set_default_config (nfc_t *ctx) |
Set default configuration function. | |
void | nfc_core_set_protocol_config (nfc_t *ctx) |
Set protocol configuration function. | |
void | nfc_cmd_start_discovery (nfc_t *ctx) |
Start discovery command function. | |
void | nfc_activate_rmt_mifare_card (nfc_t *ctx) |
Activate remote mifare card command function. | |
void | nfc_cmd_authenticate_sector (nfc_t *ctx, uint8_t sel_sect_addr) |
Authenticate sector command function. | |
void | nfc_cmd_card_disconnected (nfc_t *ctx) |
Card disconnected command function. | |
API for configuring and manipulating NFC Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void nfc_activate_rmt_mifare_card | ( | nfc_t * | ctx | ) |
Activate remote mifare card command function.
The function set activate remote mifare card command of the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
void nfc_cfg_setup | ( | nfc_cfg_t * | cfg | ) |
NFC configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See nfc_cfg_t object definition for detailed explanation. |
uint8_t nfc_check_irq | ( | nfc_t * | ctx | ) |
Check IRQ ststus function.
The function check interrupt state and return state of the INT pin of the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
0
- No active, 1
- Active. void nfc_cmd_antenna_test | ( | nfc_t * | ctx, |
uint8_t | sel_ant ) |
Antenna test function.
The function set antenna test to the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
[in] | sel_ant | : Presence of the antenna components. |
void nfc_cmd_authenticate_sector | ( | nfc_t * | ctx, |
uint8_t | sel_sect_addr ) |
Authenticate sector command function.
The function set authenticate sector command of the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
[in] | sel_sect_addr | : Sector authenticate address. |
void nfc_cmd_card_disconnected | ( | nfc_t * | ctx | ) |
Card disconnected command function.
The function set card disconnected command of the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
void nfc_cmd_core_init | ( | nfc_t * | ctx | ) |
Core init command function.
The function set core init command to the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
void nfc_cmd_core_reset | ( | nfc_t * | ctx | ) |
Core reset command function.
The function set core reset command to the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
void nfc_cmd_disable_standby_mode | ( | nfc_t * | ctx | ) |
Disable standby mode command function.
The function set disable standby mode command to the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
void nfc_cmd_start_discovery | ( | nfc_t * | ctx | ) |
Start discovery command function.
The function set start discovery command of the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
void nfc_cmd_test_procedure | ( | nfc_t * | ctx | ) |
NFC test procedure command function.
The function set test procedure command to the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
void nfc_core_reset | ( | nfc_t * | ctx | ) |
Core reset command function.
The function set core reset command to the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
void nfc_core_set_default_config | ( | nfc_t * | ctx | ) |
Set default configuration function.
The function set default configuration of the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
void nfc_core_set_protocol_config | ( | nfc_t * | ctx | ) |
Set protocol configuration function.
The function set protocol configuration of the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
void nfc_default_cfg | ( | nfc_t * | ctx, |
control_packet_t * | ctrl_pck ) |
NFC default configuration function.
This function executes a default configuration of NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
[out] | ctrl_pck | : Pointer to the memory location of structure. |
err_t nfc_generic_read | ( | nfc_t * | ctx, |
uint8_t * | p_rx_h_data, | ||
uint8_t * | p_rx_p_data ) |
NFC I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
[out] | p_rx_h_data | : Pointer to the memory location where header data be stored. |
[out] | p_rx_p_data | : Pointer to the memory location where payload data be stored. |
0
- Success, -1
- Error.err_t nfc_generic_write | ( | nfc_t * | ctx, |
uint8_t * | p_tx_data, | ||
uint8_t | n_bytes ) |
NFC I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
[in] | p_tx_data | : Data to be written. |
[in] | n_bytes | : Number of bytes to be written. |
0
- Success, -1
- Error.uint8_t nfc_get_data | ( | nfc_t * | ctx, |
uint8_t * | p_rx_data ) |
Get data function.
The function read a sequential data starting of the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
[out] | p_rx_data | : Pointer to the memory location where data be stored. |
void nfc_hw_reset | ( | nfc_t * | ctx | ) |
HW reset function.
The function hw reset
[out] | ctx | : Click context object. See nfc_t object definition for detailed explanation. the PN7120 High performance NFC controller on the NFC click board. |
NFC initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See nfc_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void nfc_init_core | ( | nfc_t * | ctx | ) |
Core initialization command function.
The function set core initialization command to the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
void nfc_read_ctrl_packet_data | ( | nfc_t * | ctx, |
control_packet_t * | ctrl_pck ) |
Read control packet data function.
The function read control packet data of the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
[in] | ctrl_pck | : Pointer to the memory location of structure. |
void nfc_write_ctrl_packet_data | ( | nfc_t * | ctx, |
control_packet_t | ctrl_pck ) |
Write control packet data function.
The function write control packet data to the PN7120 High performance NFC controller on the NFC click board.
[in] | ctx | : Click context object. See nfc_t object definition for detailed explanation. |
[in] | ctrl_pck | : Structure where data be stored. |