37#ifndef DRIVER_NTAG21X_H
38#define DRIVER_NTAG21X_H
152 uint8_t *out_buf, uint8_t *out_len);
193#define DRIVER_NTAG21X_LINK_INIT(HANDLE, STRUCTURE) memset(HANDLE, 0, sizeof(STRUCTURE))
201#define DRIVER_NTAG21X_LINK_CONTACTLESS_INIT(HANDLE, FUC) (HANDLE)->contactless_init = FUC
209#define DRIVER_NTAG21X_LINK_CONTACTLESS_DEINIT(HANDLE, FUC) (HANDLE)->contactless_deinit = FUC
217#define DRIVER_NTAG21X_LINK_CONTACTLESS_TRANSCEIVER(HANDLE, FUC) (HANDLE)->contactless_transceiver = FUC
225#define DRIVER_NTAG21X_LINK_DELAY_MS(HANDLE, FUC) (HANDLE)->delay_ms = FUC
233#define DRIVER_NTAG21X_LINK_DEBUG_PRINT(HANDLE, FUC) (HANDLE)->debug_print = FUC
ntag21x_type_t
ntag21x type enumeration definition
ntag21x_capability_container_t
ntag21x capability container enumeration definition
uint8_t ntag21x_anticollision_cl1(ntag21x_handle_t *handle, uint8_t id[4])
ntag21x anti collision cl1
uint8_t ntag21x_set_dynamic_lock(ntag21x_handle_t *handle, uint8_t lock[3])
ntag21x set the dynamic lock
struct ntag21x_handle_s ntag21x_handle_t
ntag21x handle structure definition
uint8_t ntag21x_halt(ntag21x_handle_t *handle)
ntag21x halt
uint8_t ntag21x_set_pack(ntag21x_handle_t *handle, uint8_t pack[2])
ntag21x set the pack
ntag21x_access_t
ntag21x access enumeration definition
uint8_t ntag21x_wake_up(ntag21x_handle_t *handle, ntag21x_type_t *type)
ntag21x wake up
uint8_t ntag21x_read_signature(ntag21x_handle_t *handle, uint8_t signature[32])
ntag21x read the signature
uint8_t ntag21x_get_static_lock(ntag21x_handle_t *handle, uint8_t lock[2])
ntag21x get the static lock
uint8_t ntag21x_read_counter(ntag21x_handle_t *handle, uint32_t *cnt)
ntag21x read the counter
uint8_t ntag21x_authenticate(ntag21x_handle_t *handle, uint8_t pwd[4], uint8_t pack[2])
ntag21x authenticate
uint8_t ntag21x_fast_read_page(ntag21x_handle_t *handle, uint8_t start_page, uint8_t stop_page, uint8_t *data, uint16_t *len)
ntag21x fast read page
uint8_t ntag21x_get_dynamic_lock(ntag21x_handle_t *handle, uint8_t lock[3])
ntag21x get the dynamic lock
uint8_t ntag21x_get_mirror(ntag21x_handle_t *handle, ntag21x_mirror_t *mirror)
ntag21x get the mirror
uint8_t ntag21x_get_protect_start_page(ntag21x_handle_t *handle, uint8_t *page)
ntag21x get the start page of protection
uint8_t ntag21x_select_cl2(ntag21x_handle_t *handle, uint8_t id[4])
ntag21x select cl2
uint8_t ntag21x_compatibility_write_page(ntag21x_handle_t *handle, uint8_t page, uint8_t data[4])
ntag21x compatibility write page
uint8_t ntag21x_request(ntag21x_handle_t *handle, ntag21x_type_t *type)
ntag21x request
uint8_t ntag21x_get_version(ntag21x_handle_t *handle, ntag21x_version_t *version)
ntag21x get the version
uint8_t ntag21x_get_serial_number(ntag21x_handle_t *handle, uint8_t number[7])
ntag21x get the serial number
uint8_t ntag21x_set_mirror_byte(ntag21x_handle_t *handle, ntag21x_mirror_byte_t byte)
ntag21x set the mirror byte
uint8_t ntag21x_read_four_pages(ntag21x_handle_t *handle, uint8_t start_page, uint8_t data[16])
ntag21x read four pages
uint8_t ntag21x_deinit(ntag21x_handle_t *handle)
close the chip
uint8_t ntag21x_set_static_lock(ntag21x_handle_t *handle, uint8_t lock[2])
ntag21x set the static lock
ntag21x_modulation_mode_t
ntag21x modulation mode enumeration definition
uint8_t ntag21x_get_mirror_byte(ntag21x_handle_t *handle, ntag21x_mirror_byte_t *byte)
ntag21x get the mirror byte
uint8_t ntag21x_set_protect_start_page(ntag21x_handle_t *handle, uint8_t page)
ntag21x set the start page of protection
uint8_t ntag21x_info(ntag21x_info_t *info)
get chip information
uint8_t ntag21x_write_page(ntag21x_handle_t *handle, uint8_t page, uint8_t data[4])
ntag21x write page
uint8_t ntag21x_get_authenticate_limitation(ntag21x_handle_t *handle, uint8_t *limit)
ntag21x get the authenticate limitation
uint8_t ntag21x_get_mirror_page(ntag21x_handle_t *handle, uint8_t *page)
ntag21x get the mirror page
struct ntag21x_info_s ntag21x_info_t
ntag21x information structure definition
uint8_t ntag21x_init(ntag21x_handle_t *handle)
initialize the chip
uint8_t ntag21x_set_mirror(ntag21x_handle_t *handle, ntag21x_mirror_t mirror)
ntag21x set the mirror
ntag21x_mirror_byte_t
ntag21x mirror byte enumeration definition
uint8_t ntag21x_read_page(ntag21x_handle_t *handle, uint8_t page, uint8_t data[4])
ntag21x read page
uint8_t ntag21x_set_access(ntag21x_handle_t *handle, ntag21x_access_t access, ntag21x_bool_t enable)
ntag21x enable or disable access
uint8_t ntag21x_anticollision_cl2(ntag21x_handle_t *handle, uint8_t id[4])
ntag21x anti collision cl2
uint8_t ntag21x_get_capability_container(ntag21x_handle_t *handle, ntag21x_capability_container_t *container)
ntag21x get the capability container
uint8_t ntag21x_get_access(ntag21x_handle_t *handle, ntag21x_access_t access, ntag21x_bool_t *enable)
ntag21x get the access status
uint8_t ntag21x_set_password(ntag21x_handle_t *handle, uint8_t pwd[4])
ntag21x set the password
uint8_t ntag21x_set_authenticate_limitation(ntag21x_handle_t *handle, uint8_t limit)
ntag21x set the authenticate limitation
uint8_t ntag21x_select_cl1(ntag21x_handle_t *handle, uint8_t id[4])
ntag21x select cl1
ntag21x_bool_t
ntag21x bool enumeration definition
uint8_t ntag21x_get_modulation_mode(ntag21x_handle_t *handle, ntag21x_modulation_mode_t *mode)
ntag21x get the modulation mode
struct ntag21x_version_s ntag21x_version_t
ntag21x version structure definition
ntag21x_mirror_t
ntag21x mirror enumeration definition
uint8_t ntag21x_set_mirror_page(ntag21x_handle_t *handle, uint8_t page)
ntag21x set the mirror page
uint8_t ntag21x_set_modulation_mode(ntag21x_handle_t *handle, ntag21x_modulation_mode_t mode)
ntag21x set the modulation mode
@ NTAG21X_CAPABILITY_CONTAINER_144_BYTE_NTAG213
@ NTAG21X_CAPABILITY_CONTAINER_496_BYTE_NTAG215
@ NTAG21X_CAPABILITY_CONTAINER_872_BYTE_NTAG216
@ NTAG21X_ACCESS_NFC_COUNTER_PASSWORD_PROTECTION
@ NTAG21X_ACCESS_READ_PROTECTION
@ NTAG21X_ACCESS_USER_CONF_PROTECTION
@ NTAG21X_ACCESS_NFC_COUNTER
@ NTAG21X_MODULATION_MODE_STRONG
@ NTAG21X_MODULATION_MODE_NORMAL
@ NTAG21X_MIRROR_NFC_COUNTER_ASCII
@ NTAG21X_MIRROR_UID_ASCII
@ NTAG21X_MIRROR_NO_ASCII
@ NTAG21X_MIRROR_UID_NFC_COUNTER_ASCII
uint8_t ntag21x_transceiver(ntag21x_handle_t *handle, uint8_t *in_buf, uint8_t in_len, uint8_t *out_buf, uint8_t *out_len)
transceiver data
ntag21x handle structure definition
void(* delay_ms)(uint32_t ms)
void(* debug_print)(const char *const fmt,...)
uint8_t(* contactless_deinit)(void)
uint8_t(* contactless_transceiver)(uint8_t *in_buf, uint8_t in_len, uint8_t *out_buf, uint8_t *out_len)
uint8_t(* contactless_init)(void)
ntag21x information structure definition
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v
ntag21x version structure definition
uint8_t minor_product_version
uint8_t major_product_version