ntag5link 2.0.0.0
|
API for configuring and manipulating NTAG 5 Link Click driver. More...
Topics | |
NTAG 5 Link Registers List | |
List of registers of NTAG 5 Link Click driver. | |
NTAG 5 Link Registers Settings | |
Settings for registers of NTAG 5 Link Click driver. | |
NTAG 5 Link MikroBUS Map | |
MikroBUS pin mapping of NTAG 5 Link Click driver. | |
Functions | |
void | ntag5link_cfg_setup (ntag5link_cfg_t *cfg) |
NTAG 5 Link configuration object setup function. | |
err_t | ntag5link_init (ntag5link_t *ctx, ntag5link_cfg_t *cfg) |
NTAG 5 Link initialization function. | |
err_t | ntag5link_default_cfg (ntag5link_t *ctx) |
NTAG 5 Link default configuration function. | |
err_t | ntag5link_write_memory_block (ntag5link_t *ctx, uint16_t block_addr, ntag5link_block_t *block) |
NTAG 5 Link write memory block function. | |
err_t | ntag5link_read_memory_block (ntag5link_t *ctx, uint16_t block_addr, ntag5link_block_t *block) |
NTAG 5 Link read memory block function. | |
err_t | ntag5link_write_multiple_memory_block (ntag5link_t *ctx, uint16_t block_addr, ntag5link_block_t *block, uint8_t num_blocks) |
NTAG 5 Link write multiple memory block function. | |
err_t | ntag5link_read_multiple_memory_block (ntag5link_t *ctx, uint16_t block_addr, ntag5link_block_t *block, uint8_t num_blocks) |
NTAG 5 Link read multiple memory block function. | |
err_t | ntag5link_write_session_register (ntag5link_t *ctx, uint16_t block_addr, uint8_t byte_num, uint8_t mask, uint8_t data_in) |
NTAG 5 Link write session register function. | |
err_t | ntag5link_read_session_register (ntag5link_t *ctx, uint16_t block_addr, uint8_t byte_num, uint8_t *data_out) |
NTAG 5 Link read session register function. | |
err_t | ntag5link_write_ndef_uri_record (ntag5link_t *ctx, uint8_t uri_prefix, uint8_t *uri_data, uint8_t data_len) |
NTAG 5 Link write NDEF URI record function. | |
err_t | ntag5link_format_memory (ntag5link_t *ctx) |
NTAG 5 Link format memory function. | |
err_t | ntag5link_write_message_to_memory (ntag5link_t *ctx, uint16_t block_addr, uint8_t *message, uint16_t message_len) |
NTAG 5 Link write message to memory function. | |
err_t | ntag5link_read_message_from_memory (ntag5link_t *ctx, uint16_t block_addr, uint8_t *message, uint16_t message_len) |
NTAG 5 Link read message from memory function. | |
uint8_t | ntag5link_get_event_detection_pin (ntag5link_t *ctx) |
NTAG 5 Link get event detection pin function. | |
void | ntag5link_enable_device (ntag5link_t *ctx) |
NTAG 5 Link enable device function. | |
void | ntag5link_disable_device (ntag5link_t *ctx) |
NTAG 5 Link disable device function. | |
API for configuring and manipulating NTAG 5 Link Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void ntag5link_cfg_setup | ( | ntag5link_cfg_t * | cfg | ) |
NTAG 5 Link configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ntag5link_cfg_t object definition for detailed explanation. |
err_t ntag5link_default_cfg | ( | ntag5link_t * | ctx | ) |
NTAG 5 Link default configuration function.
This function executes a default configuration of NTAG 5 Link click board.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
0
- Success, -1
- Error.void ntag5link_disable_device | ( | ntag5link_t * | ctx | ) |
NTAG 5 Link disable device function.
This function disables the device by setting HPD pin to high logic state.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
void ntag5link_enable_device | ( | ntag5link_t * | ctx | ) |
NTAG 5 Link enable device function.
This function enables the device by setting HPD pin to low logic state.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
err_t ntag5link_format_memory | ( | ntag5link_t * | ctx | ) |
NTAG 5 Link format memory function.
This function formats the whole user memory.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t ntag5link_get_event_detection_pin | ( | ntag5link_t * | ctx | ) |
NTAG 5 Link get event detection pin function.
This function returns the event detection (ED) pin logic state.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
err_t ntag5link_init | ( | ntag5link_t * | ctx, |
ntag5link_cfg_t * | cfg ) |
NTAG 5 Link initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ntag5link_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t ntag5link_read_memory_block | ( | ntag5link_t * | ctx, |
uint16_t | block_addr, | ||
ntag5link_block_t * | block ) |
NTAG 5 Link read memory block function.
This function reads a memory block data from the selected address by using I2C serial interface.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
[in] | block_addr | : User or config memory block address. |
[out] | block | : Address of memory block where to store read data. See ntag5link_block_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ntag5link_read_message_from_memory | ( | ntag5link_t * | ctx, |
uint16_t | block_addr, | ||
uint8_t * | message, | ||
uint16_t | message_len ) |
NTAG 5 Link read message from memory function.
This function reads specified number of data bytes from the user memory starting from block_addr.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
[in] | block_addr | : User memory block address. |
[out] | message | : Array of bytes where to store read data. |
[in] | message_len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ntag5link_read_multiple_memory_block | ( | ntag5link_t * | ctx, |
uint16_t | block_addr, | ||
ntag5link_block_t * | block, | ||
uint8_t | num_blocks ) |
NTAG 5 Link read multiple memory block function.
This function reads multiple memory blocks starting from the selected address by using I2C serial interface.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
[in] | block_addr | : User or config memory block address. |
[out] | block | : Array of memory blocks where to store read data. See ntag5link_block_t object definition for detailed explanation. |
[in] | num_blocks | : Number of blocks to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ntag5link_read_session_register | ( | ntag5link_t * | ctx, |
uint16_t | block_addr, | ||
uint8_t | byte_num, | ||
uint8_t * | data_out ) |
NTAG 5 Link read session register function.
This function reads data from the selected session register.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
[in] | block_addr | : Session register block address. |
[in] | byte_num | : Register byte number in a block [0-3]. |
[out] | data_out | : Output data read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ntag5link_write_memory_block | ( | ntag5link_t * | ctx, |
uint16_t | block_addr, | ||
ntag5link_block_t * | block ) |
NTAG 5 Link write memory block function.
This function writes a memory block data to the selected address by using I2C serial interface.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
[in] | block_addr | : User or config memory block address. |
[in] | block | : Address of memory block to be written. See ntag5link_block_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ntag5link_write_message_to_memory | ( | ntag5link_t * | ctx, |
uint16_t | block_addr, | ||
uint8_t * | message, | ||
uint16_t | message_len ) |
NTAG 5 Link write message to memory function.
This function writes specified number of data bytes to the user memory starting from block_addr.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
[in] | block_addr | : User memory block address. |
[in] | message | : Array of bytes to be written. |
[in] | message_len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ntag5link_write_multiple_memory_block | ( | ntag5link_t * | ctx, |
uint16_t | block_addr, | ||
ntag5link_block_t * | block, | ||
uint8_t | num_blocks ) |
NTAG 5 Link write multiple memory block function.
This function writes multiple memory blocks starting from the selected address by using I2C serial interface.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
[in] | block_addr | : User or config memory block address. |
[in] | block | : Array of memory block to be written. See ntag5link_block_t object definition for detailed explanation. |
[in] | num_blocks | : Number of blocks to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ntag5link_write_ndef_uri_record | ( | ntag5link_t * | ctx, |
uint8_t | uri_prefix, | ||
uint8_t * | uri_data, | ||
uint8_t | data_len ) |
NTAG 5 Link write NDEF URI record function.
This function writes specific NDEF URI record to the memory address specified with NTAG5LINK_NDEF_MESSAGE_START_ADDRESS macro.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
[in] | uri_prefix | : URI prefix code [0x00-0x23]. See #ntag5link_set group for detailed explanation. |
[in] | uri_data | : URI data to be written. |
[in] | data_len | : URI data length. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ntag5link_write_session_register | ( | ntag5link_t * | ctx, |
uint16_t | block_addr, | ||
uint8_t | byte_num, | ||
uint8_t | mask, | ||
uint8_t | data_in ) |
NTAG 5 Link write session register function.
This function writes specified data to the selected session register.
[in] | ctx | : Click context object. See ntag5link_t object definition for detailed explanation. |
[in] | block_addr | : Session register block address. |
[in] | byte_num | : Register byte number in a block [0-3]. |
[in] | mask | : Mask of bits to be overwritten. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.