nfc7i2c 2.1.0.0
|
API for configuring and manipulating NFC 7 I2C Click driver. More...
Topics | |
NFC 7 I2C Registers List | |
List of registers of NFC 7 I2C Click driver. | |
NFC 7 I2C Registers Settings | |
Settings for registers of NFC 7 I2C Click driver. | |
NFC 7 I2C MikroBUS Map | |
MikroBUS pin mapping of NFC 7 I2C Click driver. | |
Functions | |
void | nfc7i2c_cfg_setup (nfc7i2c_cfg_t *cfg) |
NFC 7 I2C configuration object setup function. | |
err_t | nfc7i2c_init (nfc7i2c_t *ctx, nfc7i2c_cfg_t *cfg) |
NFC 7 I2C initialization function. | |
err_t | nfc7i2c_default_cfg (nfc7i2c_t *ctx) |
NFC 7 I2C default configuration function. | |
void | nfc7i2c_enable_device (nfc7i2c_t *ctx) |
NFC 7 I2C enable device function. | |
void | nfc7i2c_disable_device (nfc7i2c_t *ctx) |
NFC 7 I2C disable device function. | |
void | nfc7i2c_reset_device (nfc7i2c_t *ctx) |
NFC 7 I2C reset device function. | |
uint8_t | nfc7i2c_get_irq_pin (nfc7i2c_t *ctx) |
NFC 7 I2C get IRQ pin function. | |
err_t | nfc7i2c_tx (nfc7i2c_t *ctx, uint8_t *data_in, uint16_t len) |
NFC 7 I2C TX function. | |
err_t | nfc7i2c_rx (nfc7i2c_t *ctx, uint8_t *data_out, uint16_t *len, uint16_t timeout) |
NFC 7 I2C RX function. | |
err_t | nfc7i2c_trx (nfc7i2c_t *ctx, uint8_t *data_in, uint16_t in_len, uint8_t *data_out, uint16_t *out_len) |
NFC 7 I2C TRX function. | |
err_t | nfc7i2c_pkt_ctrl_tx (nfc7i2c_t *ctx, nfc7i2c_pkt_ctrl_t *pkt) |
NFC 7 I2C packet control TX function. | |
err_t | nfc7i2c_pkt_ctrl_rx (nfc7i2c_t *ctx, nfc7i2c_pkt_ctrl_t *pkt, uint16_t timeout) |
NFC 7 I2C packet control RX function. | |
err_t | nfc7i2c_pkt_ctrl_trx (nfc7i2c_t *ctx, nfc7i2c_pkt_ctrl_t *pkt) |
NFC 7 I2C packet control TRX function. | |
err_t | nfc7i2c_pkt_data_tx (nfc7i2c_t *ctx, nfc7i2c_pkt_data_t *pkt) |
NFC 7 I2C packet data TX function. | |
err_t | nfc7i2c_pkt_data_rx (nfc7i2c_t *ctx, nfc7i2c_pkt_data_t *pkt, uint16_t timeout) |
NFC 7 I2C packet data RX function. | |
err_t | nfc7i2c_pkt_data_trx (nfc7i2c_t *ctx, nfc7i2c_pkt_data_t *pkt) |
NFC 7 I2C packet data TRX function. | |
err_t | nfc7i2c_core_reset (nfc7i2c_t *ctx) |
NFC 7 I2C core reset function. | |
err_t | nfc7i2c_core_init (nfc7i2c_t *ctx) |
NFC 7 I2C core init function. | |
err_t | nfc7i2c_core_standby (nfc7i2c_t *ctx, uint8_t mode) |
NFC 7 I2C core standby function. | |
err_t | nfc7i2c_core_total_duration (nfc7i2c_t *ctx) |
NFC 7 I2C core total duration function. | |
err_t | nfc7i2c_core_tag_detector (nfc7i2c_t *ctx) |
NFC 7 I2C core tag detector function. | |
err_t | nfc7i2c_core_clock_sel (nfc7i2c_t *ctx) |
NFC 7 I2C core clock sel function. | |
err_t | nfc7i2c_core_pmu (nfc7i2c_t *ctx) |
NFC 7 I2C core PMU function. | |
err_t | nfc7i2c_core_rf_config (nfc7i2c_t *ctx) |
NFC 7 I2C core RF config function. | |
err_t | nfc7i2c_config_settings (nfc7i2c_t *ctx) |
NFC 7 I2C config settings function. | |
err_t | nfc7i2c_map_rf_interface (nfc7i2c_t *ctx) |
NFC 7 I2C map RF interface function. | |
err_t | nfc7i2c_start_discovery (nfc7i2c_t *ctx) |
NFC 7 I2C start discovery function. | |
err_t | nfc7i2c_stop_discovery (nfc7i2c_t *ctx) |
NFC 7 I2C stop discovery function. | |
err_t | nfc7i2c_wait_discovery (nfc7i2c_t *ctx, nfc7i2c_rf_intf_t *rf_intf) |
NFC 7 I2C wait discovery function. | |
void | nfc7i2c_presence_check (nfc7i2c_t *ctx, nfc7i2c_rf_intf_t *rf_intf) |
NFC 7 I2C presence check function. | |
err_t | nfc7i2c_reader_act_next (nfc7i2c_t *ctx, nfc7i2c_rf_intf_t *rf_intf) |
NFC 7 I2C reader activate next function. | |
err_t | nfc7i2c_reader_re_act (nfc7i2c_t *ctx, nfc7i2c_rf_intf_t *rf_intf) |
NFC 7 I2C reader reactivate next function. | |
err_t | nfc7i2c_reader_tag_cmd (nfc7i2c_t *ctx, nfc7i2c_pkt_data_t *pkt) |
NFC 7 I2C reader tag cmd function. | |
API for configuring and manipulating NFC 7 I2C Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void nfc7i2c_cfg_setup | ( | nfc7i2c_cfg_t * | cfg | ) |
NFC 7 I2C configuration object setup function.
This function initializes Click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See nfc7i2c_cfg_t object definition for detailed explanation. |
err_t nfc7i2c_config_settings | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C config settings function.
This function sets the default core config settings.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_core_clock_sel | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C core clock sel function.
This function sets the core clock selection to NFC7I2C_NCI_CORE_CLOCK_SEL_XTAL.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_core_init | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C core init function.
This function resets and initializes the device core.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_core_pmu | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C core PMU function.
This function sets the core power management unit to NFC7I2C_NCI_CORE_PMU_IRQ_EN_TVDD_3V3.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_core_reset | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C core reset function.
This function resets the device core and reads the FW version.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_core_rf_config | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C core RF config function.
This function sets the core RF config to NFC7I2C_NCI_CORE_RF_CONF.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_core_standby | ( | nfc7i2c_t * | ctx, |
uint8_t | mode ) |
NFC 7 I2C core standby function.
This function sets the core standby mode.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[in] | mode | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_core_tag_detector | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C core tag detector function.
This function sets the core tag detector to NFC7I2C_NCI_CORE_TAG_DETECTOR_DIS.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_core_total_duration | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C core total duration function.
This function sets the core total duration of the single discovery period to NFC7I2C_NCI_CORE_TOTAL_DURATION_510MS.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_default_cfg | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C default configuration function.
This function executes a default configuration of NFC 7 I2C Click board.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void nfc7i2c_disable_device | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C disable device function.
This function disables the device by setting the VEN pin to LOW logic state.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
void nfc7i2c_enable_device | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C enable device function.
This function enables the device by setting the VEN pin to HIGH logic state.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
uint8_t nfc7i2c_get_irq_pin | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C get IRQ pin function.
This function returns the IRQ pin logic state.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
err_t nfc7i2c_init | ( | nfc7i2c_t * | ctx, |
nfc7i2c_cfg_t * | cfg ) |
NFC 7 I2C initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
[out] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See nfc7i2c_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_map_rf_interface | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C map RF interface function.
This function enables all RF protocols and interface in poll mode.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_pkt_ctrl_rx | ( | nfc7i2c_t * | ctx, |
nfc7i2c_pkt_ctrl_t * | pkt, | ||
uint16_t | timeout ) |
NFC 7 I2C packet control RX function.
This function waits a desired period for a NCI control packet response to arrive and reads it.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[out] | pkt | : NCI control packet data structure read. See nfc7i2c_pkt_ctrl_t object definition for detailed explanation. |
[in] | timeout | : Waiting data timeout in milliseconds. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_pkt_ctrl_trx | ( | nfc7i2c_t * | ctx, |
nfc7i2c_pkt_ctrl_t * | pkt ) |
NFC 7 I2C packet control TRX function.
This function sends a NCI control packet using nfc7i2c_pkt_ctrl_tx function and reads the response using nfc7i2c_pkt_ctrl_rx with a 1 second timeout.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[in,out] | pkt | : NCI control packet data structure to write (response packet is populated here). See nfc7i2c_pkt_ctrl_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_pkt_ctrl_tx | ( | nfc7i2c_t * | ctx, |
nfc7i2c_pkt_ctrl_t * | pkt ) |
NFC 7 I2C packet control TX function.
This function sends a desired NCI control packet data.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[in] | pkt | : NCI control packet data structure to be sent. See nfc7i2c_pkt_ctrl_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_pkt_data_rx | ( | nfc7i2c_t * | ctx, |
nfc7i2c_pkt_data_t * | pkt, | ||
uint16_t | timeout ) |
NFC 7 I2C packet data RX function.
This function waits a desired period for a NCI data packet response to arrive and reads it.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[out] | pkt | : NCI data packet data structure read. See nfc7i2c_pkt_data_t object definition for detailed explanation. |
[in] | timeout | : Waiting data timeout in milliseconds. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_pkt_data_trx | ( | nfc7i2c_t * | ctx, |
nfc7i2c_pkt_data_t * | pkt ) |
NFC 7 I2C packet data TRX function.
This function sends a NCI data packet using nfc7i2c_pkt_data_tx function and reads the response using nfc7i2c_pkt_data_rx with a 1 second timeout.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[in,out] | pkt | : NCI data packet data structure to write (response packet is populated here). See nfc7i2c_pkt_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_pkt_data_tx | ( | nfc7i2c_t * | ctx, |
nfc7i2c_pkt_data_t * | pkt ) |
NFC 7 I2C packet data TX function.
This function sends a desired NCI data packet data.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[in] | pkt | : NCI data packet data structure to be sent. See nfc7i2c_pkt_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void nfc7i2c_presence_check | ( | nfc7i2c_t * | ctx, |
nfc7i2c_rf_intf_t * | rf_intf ) |
NFC 7 I2C presence check function.
This function waits until the discovered target device is removed.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[in] | rf_intf | : Filled with discovered NFC remote device properties. |
err_t nfc7i2c_reader_act_next | ( | nfc7i2c_t * | ctx, |
nfc7i2c_rf_intf_t * | rf_intf ) |
NFC 7 I2C reader activate next function.
This function performs activation of the next tag (in case of multiple tag detection or multi-protocol tag).
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[in,out] | rf_intf | : Filled with discovered NFC remote device properties. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_reader_re_act | ( | nfc7i2c_t * | ctx, |
nfc7i2c_rf_intf_t * | rf_intf ) |
NFC 7 I2C reader reactivate next function.
This function performs reactivation of the current tag.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[in] | rf_intf | : Filled with discovered NFC remote device properties. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_reader_tag_cmd | ( | nfc7i2c_t * | ctx, |
nfc7i2c_pkt_data_t * | pkt ) |
NFC 7 I2C reader tag cmd function.
This function performs RAW data packet transceive operation (send then receive) with the remote tag.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[in,out] | pkt | : NCI data packet data structure to write (response packet is populated here). See nfc7i2c_pkt_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void nfc7i2c_reset_device | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C reset device function.
This function resets the device by toggling the VEN pin.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
err_t nfc7i2c_rx | ( | nfc7i2c_t * | ctx, |
uint8_t * | data_out, | ||
uint16_t * | len, | ||
uint16_t | timeout ) |
NFC 7 I2C RX function.
This function waits a desired period for a data received flag and reads the data by using I2C serial interface.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[out] | data_out | : Output read data. |
[out] | len | : Number of bytes read. |
[in] | timeout | : Waiting data timeout in milliseconds. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_start_discovery | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C start discovery function.
This function starts RF discovery for NFC-A, NFC-B, NFC-F, and NFC-V technologies.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_stop_discovery | ( | nfc7i2c_t * | ctx | ) |
NFC 7 I2C stop discovery function.
This function stops the RF discovery process.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_trx | ( | nfc7i2c_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | in_len, | ||
uint8_t * | data_out, | ||
uint16_t * | out_len ) |
NFC 7 I2C TRX function.
This function sends data using nfc7i2c_tx function and reads the response using nfc7i2c_rx with a 1 second timeout.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[in] | data_in | : Data to be written. |
[in] | in_len | : Number of bytes to be written. |
[out] | data_out | : Output read data. |
[out] | out_len | : Number of bytes read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_tx | ( | nfc7i2c_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | len ) |
NFC 7 I2C TX function.
This function writes a desired number of data bytes by using I2C serial interface.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t nfc7i2c_wait_discovery | ( | nfc7i2c_t * | ctx, |
nfc7i2c_rf_intf_t * | rf_intf ) |
NFC 7 I2C wait discovery function.
This function waits until remote NFC device is discovered.
[in] | ctx | : Click context object. See nfc7i2c_t object definition for detailed explanation. |
[out] | rf_intf | : Filled with discovered NFC remote device properties. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.