LibDriver NTAG21X
Loading...
Searching...
No Matches
ntag21x basic driver function

ntag21x basic driver modules More...

Collaboration diagram for ntag21x basic driver function:

Data Structures

struct  ntag21x_version_s
 ntag21x version structure definition More...
struct  ntag21x_handle_s
 ntag21x handle structure definition More...
struct  ntag21x_info_s
 ntag21x information structure definition More...

Typedefs

typedef struct ntag21x_version_s ntag21x_version_t
 ntag21x version structure definition
typedef struct ntag21x_handle_s ntag21x_handle_t
 ntag21x handle structure definition
typedef struct ntag21x_info_s ntag21x_info_t
 ntag21x information structure definition

Enumerations

enum  ntag21x_bool_t { NTAG21X_BOOL_FALSE = 0x00 , NTAG21X_BOOL_TRUE = 0x01 }
 ntag21x bool enumeration definition More...
enum  ntag21x_type_t { NTAG21X_TYPE_INVALID = 0x00 , NTAG21X_TYPE_213_5_6 = 0x01 }
 ntag21x type enumeration definition More...
enum  ntag21x_capability_container_t { NTAG21X_CAPABILITY_CONTAINER_144_BYTE_NTAG213 = 0x00 , NTAG21X_CAPABILITY_CONTAINER_496_BYTE_NTAG215 = 0x01 , NTAG21X_CAPABILITY_CONTAINER_872_BYTE_NTAG216 = 0x02 }
 ntag21x capability container enumeration definition More...
enum  ntag21x_mirror_t { NTAG21X_MIRROR_NO_ASCII = 0x00 , NTAG21X_MIRROR_UID_ASCII = 0x01 , NTAG21X_MIRROR_NFC_COUNTER_ASCII = 0x02 , NTAG21X_MIRROR_UID_NFC_COUNTER_ASCII = 0x03 }
 ntag21x mirror enumeration definition More...
enum  ntag21x_mirror_byte_t { NTAG21X_MIRROR_BYTE_0 = 0x00 , NTAG21X_MIRROR_BYTE_1 = 0x01 , NTAG21X_MIRROR_BYTE_2 = 0x02 , NTAG21X_MIRROR_BYTE_3 = 0x03 }
 ntag21x mirror byte enumeration definition More...
enum  ntag21x_modulation_mode_t { NTAG21X_MODULATION_MODE_NORMAL = 0x00 , NTAG21X_MODULATION_MODE_STRONG = 0x01 }
 ntag21x modulation mode enumeration definition More...
enum  ntag21x_access_t { NTAG21X_ACCESS_READ_PROTECTION = 7 , NTAG21X_ACCESS_USER_CONF_PROTECTION = 6 , NTAG21X_ACCESS_NFC_COUNTER = 4 , NTAG21X_ACCESS_NFC_COUNTER_PASSWORD_PROTECTION = 3 }
 ntag21x access enumeration definition More...

Functions

uint8_t ntag21x_info (ntag21x_info_t *info)
 get chip information
uint8_t ntag21x_init (ntag21x_handle_t *handle)
 initialize the chip
uint8_t ntag21x_deinit (ntag21x_handle_t *handle)
 close the chip
uint8_t ntag21x_request (ntag21x_handle_t *handle, ntag21x_type_t *type)
 ntag21x request
uint8_t ntag21x_wake_up (ntag21x_handle_t *handle, ntag21x_type_t *type)
 ntag21x wake up
uint8_t ntag21x_halt (ntag21x_handle_t *handle)
 ntag21x halt
uint8_t ntag21x_anticollision_cl1 (ntag21x_handle_t *handle, uint8_t id[4])
 ntag21x anti collision cl1
uint8_t ntag21x_anticollision_cl2 (ntag21x_handle_t *handle, uint8_t id[4])
 ntag21x anti collision cl2
uint8_t ntag21x_select_cl1 (ntag21x_handle_t *handle, uint8_t id[4])
 ntag21x select cl1
uint8_t ntag21x_select_cl2 (ntag21x_handle_t *handle, uint8_t id[4])
 ntag21x select cl2
uint8_t ntag21x_get_version (ntag21x_handle_t *handle, ntag21x_version_t *version)
 ntag21x get the version
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_read_page (ntag21x_handle_t *handle, uint8_t page, uint8_t data[4])
 ntag21x read page
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_compatibility_write_page (ntag21x_handle_t *handle, uint8_t page, uint8_t data[4])
 ntag21x compatibility write page
uint8_t ntag21x_write_page (ntag21x_handle_t *handle, uint8_t page, uint8_t data[4])
 ntag21x write page
uint8_t ntag21x_read_counter (ntag21x_handle_t *handle, uint32_t *cnt)
 ntag21x read the counter
uint8_t ntag21x_read_signature (ntag21x_handle_t *handle, uint8_t signature[32])
 ntag21x read the signature
uint8_t ntag21x_get_serial_number (ntag21x_handle_t *handle, uint8_t number[7])
 ntag21x get the serial number
uint8_t ntag21x_get_capability_container (ntag21x_handle_t *handle, ntag21x_capability_container_t *container)
 ntag21x get the capability container
uint8_t ntag21x_set_password (ntag21x_handle_t *handle, uint8_t pwd[4])
 ntag21x set the password
uint8_t ntag21x_set_pack (ntag21x_handle_t *handle, uint8_t pack[2])
 ntag21x set the pack
uint8_t ntag21x_authenticate (ntag21x_handle_t *handle, uint8_t pwd[4], uint8_t pack[2])
 ntag21x authenticate
uint8_t ntag21x_set_dynamic_lock (ntag21x_handle_t *handle, uint8_t lock[3])
 ntag21x set the dynamic lock
uint8_t ntag21x_get_dynamic_lock (ntag21x_handle_t *handle, uint8_t lock[3])
 ntag21x get the dynamic lock
uint8_t ntag21x_set_static_lock (ntag21x_handle_t *handle, uint8_t lock[2])
 ntag21x set the static lock
uint8_t ntag21x_get_static_lock (ntag21x_handle_t *handle, uint8_t lock[2])
 ntag21x get the static lock
uint8_t ntag21x_set_mirror (ntag21x_handle_t *handle, ntag21x_mirror_t mirror)
 ntag21x set the mirror
uint8_t ntag21x_get_mirror (ntag21x_handle_t *handle, ntag21x_mirror_t *mirror)
 ntag21x get the mirror
uint8_t ntag21x_set_mirror_byte (ntag21x_handle_t *handle, ntag21x_mirror_byte_t byte)
 ntag21x set the mirror byte
uint8_t ntag21x_get_mirror_byte (ntag21x_handle_t *handle, ntag21x_mirror_byte_t *byte)
 ntag21x get the mirror byte
uint8_t ntag21x_set_modulation_mode (ntag21x_handle_t *handle, ntag21x_modulation_mode_t mode)
 ntag21x set the modulation mode
uint8_t ntag21x_get_modulation_mode (ntag21x_handle_t *handle, ntag21x_modulation_mode_t *mode)
 ntag21x get the modulation mode
uint8_t ntag21x_set_mirror_page (ntag21x_handle_t *handle, uint8_t page)
 ntag21x set the mirror page
uint8_t ntag21x_get_mirror_page (ntag21x_handle_t *handle, uint8_t *page)
 ntag21x get the mirror page
uint8_t ntag21x_set_protect_start_page (ntag21x_handle_t *handle, uint8_t page)
 ntag21x set the start page of protection
uint8_t ntag21x_get_protect_start_page (ntag21x_handle_t *handle, uint8_t *page)
 ntag21x get the start page of protection
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_get_access (ntag21x_handle_t *handle, ntag21x_access_t access, ntag21x_bool_t *enable)
 ntag21x get the access status
uint8_t ntag21x_set_authenticate_limitation (ntag21x_handle_t *handle, uint8_t limit)
 ntag21x set the authenticate limitation
uint8_t ntag21x_get_authenticate_limitation (ntag21x_handle_t *handle, uint8_t *limit)
 ntag21x get the authenticate limitation

Detailed Description

ntag21x basic driver modules

Typedef Documentation

◆ ntag21x_handle_t

ntag21x handle structure definition

◆ ntag21x_info_t

ntag21x information structure definition

◆ ntag21x_version_t

ntag21x version structure definition

Enumeration Type Documentation

◆ ntag21x_access_t

ntag21x access enumeration definition

Enumerator
NTAG21X_ACCESS_READ_PROTECTION 

enable or disable read access protection

NTAG21X_ACCESS_USER_CONF_PROTECTION 

enable or disable user configuration protection

NTAG21X_ACCESS_NFC_COUNTER 

enable or disable nfc counter protection

NTAG21X_ACCESS_NFC_COUNTER_PASSWORD_PROTECTION 

enable or disable nfc counter password protection

Definition at line 121 of file driver_ntag21x.h.

◆ ntag21x_bool_t

ntag21x bool enumeration definition

Enumerator
NTAG21X_BOOL_FALSE 

false

NTAG21X_BOOL_TRUE 

true

Definition at line 62 of file driver_ntag21x.h.

◆ ntag21x_capability_container_t

ntag21x capability container enumeration definition

Enumerator
NTAG21X_CAPABILITY_CONTAINER_144_BYTE_NTAG213 

ntag213

NTAG21X_CAPABILITY_CONTAINER_496_BYTE_NTAG215 

ntag215

NTAG21X_CAPABILITY_CONTAINER_872_BYTE_NTAG216 

ntag216

Definition at line 80 of file driver_ntag21x.h.

◆ ntag21x_mirror_byte_t

ntag21x mirror byte enumeration definition

Enumerator
NTAG21X_MIRROR_BYTE_0 

byte0

NTAG21X_MIRROR_BYTE_1 

byte1

NTAG21X_MIRROR_BYTE_2 

byte2

NTAG21X_MIRROR_BYTE_3 

byte3

Definition at line 101 of file driver_ntag21x.h.

◆ ntag21x_mirror_t

ntag21x mirror enumeration definition

Enumerator
NTAG21X_MIRROR_NO_ASCII 

no ascii mirror

NTAG21X_MIRROR_UID_ASCII 

uid ascii mirror

NTAG21X_MIRROR_NFC_COUNTER_ASCII 

nfc counter mirror

NTAG21X_MIRROR_UID_NFC_COUNTER_ASCII 

uid and nfc counter mirror

Definition at line 90 of file driver_ntag21x.h.

◆ ntag21x_modulation_mode_t

ntag21x modulation mode enumeration definition

Enumerator
NTAG21X_MODULATION_MODE_NORMAL 

normal

NTAG21X_MODULATION_MODE_STRONG 

strong

Definition at line 112 of file driver_ntag21x.h.

◆ ntag21x_type_t

ntag21x type enumeration definition

Enumerator
NTAG21X_TYPE_INVALID 

invalid

NTAG21X_TYPE_213_5_6 

ntag213/5/6

Definition at line 71 of file driver_ntag21x.h.

Function Documentation

◆ ntag21x_anticollision_cl1()

uint8_t ntag21x_anticollision_cl1 ( ntag21x_handle_t * handle,
uint8_t id[4] )

ntag21x anti collision cl1

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*idpointer to an id buffer
Returns
status code
  • 0 success
  • 1 anti collision cl1 failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 check error
Note
none

Definition at line 469 of file driver_ntag21x.c.

◆ ntag21x_anticollision_cl2()

uint8_t ntag21x_anticollision_cl2 ( ntag21x_handle_t * handle,
uint8_t id[4] )

ntag21x anti collision cl2

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*idpointer to an id buffer
Returns
status code
  • 0 success
  • 1 anti collision cl2 failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 check error
Note
none

Definition at line 534 of file driver_ntag21x.c.

◆ ntag21x_authenticate()

uint8_t ntag21x_authenticate ( ntag21x_handle_t * handle,
uint8_t pwd[4],
uint8_t pack[2] )

ntag21x authenticate

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]*pwdpointer to a pwd buffer
[in]*packpointer to a pack buffer
Returns
status code
  • 0 success
  • 1 authenticate failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 crc error
  • 6 pack check failed
Note
none

Definition at line 1487 of file driver_ntag21x.c.

◆ ntag21x_compatibility_write_page()

uint8_t ntag21x_compatibility_write_page ( ntag21x_handle_t * handle,
uint8_t page,
uint8_t data[4] )

ntag21x compatibility write page

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]pagepage of write
[in]*datapointer to a data buffer
Returns
status code
  • 0 success
  • 1 compatibility write page failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 ack error
Note
none

Definition at line 1338 of file driver_ntag21x.c.

◆ ntag21x_deinit()

uint8_t ntag21x_deinit ( ntag21x_handle_t * handle)

close the chip

Parameters
[in]*handlepointer to an ntag21x handle structure
Returns
status code
  • 0 success
  • 1 contactless deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 268 of file driver_ntag21x.c.

◆ ntag21x_fast_read_page()

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

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]start_pagestart page
[in]stop_pagestop page
[out]*datapointer to a data buffer
[in,out]*lenpointer to a data length buffer
Returns
status code
  • 0 success
  • 1 fast read page failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 stop_page < start_page
  • 5 stop_page - start_page + 1 is over 15
  • 6 len is invalid
  • 7 output_len is invalid
  • 8 crc error
Note
stop_page - start_page + 1 <= 15 4 * (stop_page - start_page + 1) < len

Definition at line 1251 of file driver_ntag21x.c.

◆ ntag21x_get_access()

uint8_t ntag21x_get_access ( ntag21x_handle_t * handle,
ntag21x_access_t access,
ntag21x_bool_t * enable )

ntag21x get the access status

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]accessset access
[out]*enablepointer to a bool value buffer
Returns
status code
  • 0 success
  • 1 get access failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2435 of file driver_ntag21x.c.

◆ ntag21x_get_authenticate_limitation()

uint8_t ntag21x_get_authenticate_limitation ( ntag21x_handle_t * handle,
uint8_t * limit )

ntag21x get the authenticate limitation

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*limitpointer to an authenticate limitation buffer
Returns
status code
  • 0 success
  • 1 get authenticate limitation failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2526 of file driver_ntag21x.c.

◆ ntag21x_get_capability_container()

uint8_t ntag21x_get_capability_container ( ntag21x_handle_t * handle,
ntag21x_capability_container_t * container )

ntag21x get the capability container

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*containerpointer to a capability container buffer
Returns
status code
  • 0 success
  • 1 get capability container failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 crc error
  • 6 data is invalid
Note
none

Definition at line 1019 of file driver_ntag21x.c.

◆ ntag21x_get_dynamic_lock()

uint8_t ntag21x_get_dynamic_lock ( ntag21x_handle_t * handle,
uint8_t lock[3] )

ntag21x get the dynamic lock

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*lockpointer to a lock buffer
Returns
status code
  • 0 success
  • 1 get dynamic lock failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 crc error
Note
none

Definition at line 1774 of file driver_ntag21x.c.

◆ ntag21x_get_mirror()

uint8_t ntag21x_get_mirror ( ntag21x_handle_t * handle,
ntag21x_mirror_t * mirror )

ntag21x get the mirror

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*mirrorpointer to a chip mirror mode buffer
Returns
status code
  • 0 success
  • 1 get mirror failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2015 of file driver_ntag21x.c.

◆ ntag21x_get_mirror_byte()

uint8_t ntag21x_get_mirror_byte ( ntag21x_handle_t * handle,
ntag21x_mirror_byte_t * byte )

ntag21x get the mirror byte

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*bytepointer to a mirror byte buffer
Returns
status code
  • 0 success
  • 1 get mirror byte failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2099 of file driver_ntag21x.c.

◆ ntag21x_get_mirror_page()

uint8_t ntag21x_get_mirror_page ( ntag21x_handle_t * handle,
uint8_t * page )

ntag21x get the mirror page

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*pagepointer to a mirror page buffer
Returns
status code
  • 0 success
  • 1 get mirror page failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2266 of file driver_ntag21x.c.

◆ ntag21x_get_modulation_mode()

uint8_t ntag21x_get_modulation_mode ( ntag21x_handle_t * handle,
ntag21x_modulation_mode_t * mode )

ntag21x get the modulation mode

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*modepointer to a modulation mode buffer
Returns
status code
  • 0 success
  • 1 get modulation mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2183 of file driver_ntag21x.c.

◆ ntag21x_get_protect_start_page()

uint8_t ntag21x_get_protect_start_page ( ntag21x_handle_t * handle,
uint8_t * page )

ntag21x get the start page of protection

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*pagepointer to a start page buffer
Returns
status code
  • 0 success
  • 1 get protect start page failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2349 of file driver_ntag21x.c.

◆ ntag21x_get_serial_number()

uint8_t ntag21x_get_serial_number ( ntag21x_handle_t * handle,
uint8_t number[7] )

ntag21x get the serial number

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*numberpointer to a number buffer
Returns
status code
  • 0 success
  • 1 get serial number failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 crc error
Note
none

Definition at line 948 of file driver_ntag21x.c.

◆ ntag21x_get_static_lock()

uint8_t ntag21x_get_static_lock ( ntag21x_handle_t * handle,
uint8_t lock[2] )

ntag21x get the static lock

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*lockpointer to a lock buffer
Returns
status code
  • 0 success
  • 1 get static lock failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 crc error
Note
none

Definition at line 1906 of file driver_ntag21x.c.

◆ ntag21x_get_version()

uint8_t ntag21x_get_version ( ntag21x_handle_t * handle,
ntag21x_version_t * version )

ntag21x get the version

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*versionpointer to a version structure
Returns
status code
  • 0 success
  • 1 get version failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 crc error
Note
none

Definition at line 733 of file driver_ntag21x.c.

◆ ntag21x_halt()

uint8_t ntag21x_halt ( ntag21x_handle_t * handle)

ntag21x halt

Parameters
[in]*handlepointer to an ntag21x handle structure
Returns
status code
  • 0 success
  • 1 halt failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 430 of file driver_ntag21x.c.

◆ ntag21x_info()

uint8_t ntag21x_info ( ntag21x_info_t * info)

get chip information

Parameters
[out]*infopointer to an ntag21x info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 2595 of file driver_ntag21x.c.

◆ ntag21x_init()

uint8_t ntag21x_init ( ntag21x_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to an ntag21x handle structure
Returns
status code
  • 0 success
  • 1 contactless initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
Note
none

Definition at line 207 of file driver_ntag21x.c.

◆ ntag21x_read_counter()

uint8_t ntag21x_read_counter ( ntag21x_handle_t * handle,
uint32_t * cnt )

ntag21x read the counter

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*cntpointer to a counter buffer
Returns
status code
  • 0 success
  • 1 read counter failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 crc error
Note
none

Definition at line 819 of file driver_ntag21x.c.

◆ ntag21x_read_four_pages()

uint8_t ntag21x_read_four_pages ( ntag21x_handle_t * handle,
uint8_t start_page,
uint8_t data[16] )

ntag21x read four pages

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]start_pagestart page of read
[out]*datapointer to a data buffer
Returns
status code
  • 0 success
  • 1 read four pages failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 crc error
Note
none

Definition at line 1115 of file driver_ntag21x.c.

◆ ntag21x_read_page()

uint8_t ntag21x_read_page ( ntag21x_handle_t * handle,
uint8_t page,
uint8_t data[4] )

ntag21x read page

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]pagepage of read
[out]*datapointer to a data buffer
Returns
status code
  • 0 success
  • 1 read page failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 crc error
Note
none

Definition at line 1180 of file driver_ntag21x.c.

◆ ntag21x_read_signature()

uint8_t ntag21x_read_signature ( ntag21x_handle_t * handle,
uint8_t signature[32] )

ntag21x read the signature

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*signaturepointer to a signature buffer
Returns
status code
  • 0 success
  • 1 read signature failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 crc error
Note
none

Definition at line 884 of file driver_ntag21x.c.

◆ ntag21x_request()

uint8_t ntag21x_request ( ntag21x_handle_t * handle,
ntag21x_type_t * type )

ntag21x request

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*typepointer to a type buffer
Returns
status code
  • 0 success
  • 1 request failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 type is invalid
Note
none

Definition at line 306 of file driver_ntag21x.c.

◆ ntag21x_select_cl1()

uint8_t ntag21x_select_cl1 ( ntag21x_handle_t * handle,
uint8_t id[4] )

ntag21x select cl1

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]*idpointer to an id buffer
Returns
status code
  • 0 success
  • 1 select cl1 failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 sak error
Note
none

Definition at line 599 of file driver_ntag21x.c.

◆ ntag21x_select_cl2()

uint8_t ntag21x_select_cl2 ( ntag21x_handle_t * handle,
uint8_t id[4] )

ntag21x select cl2

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]*idpointer to an id buffer
Returns
status code
  • 0 success
  • 1 select cl2 failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 sak error
Note
none

Definition at line 666 of file driver_ntag21x.c.

◆ ntag21x_set_access()

uint8_t ntag21x_set_access ( ntag21x_handle_t * handle,
ntag21x_access_t access,
ntag21x_bool_t enable )

ntag21x enable or disable access

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]accessset access
[in]enablebool value
Returns
status code
  • 0 success
  • 1 set access failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2388 of file driver_ntag21x.c.

◆ ntag21x_set_authenticate_limitation()

uint8_t ntag21x_set_authenticate_limitation ( ntag21x_handle_t * handle,
uint8_t limit )

ntag21x set the authenticate limitation

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]limitauthenticate limitation
Returns
status code
  • 0 success
  • 1 set authenticate limitation failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 limit > 7
Note
none

Definition at line 2474 of file driver_ntag21x.c.

◆ ntag21x_set_dynamic_lock()

uint8_t ntag21x_set_dynamic_lock ( ntag21x_handle_t * handle,
uint8_t lock[3] )

ntag21x set the dynamic lock

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]*lockpointer to a lock buffer
Returns
status code
  • 0 success
  • 1 set dynamic lock failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 ack error
Note
ntag213
byte0
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
lock_page_30_31 lock_page_28_29 lock_page_26_27 lock_page_24_25 lock_page_22_23 lock_page_20_21 lock_page_18_19 lock_page_16_17
byte1
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0 0 0 0 lock_page_38_39 lock_page_36_37 lock_page_34_35 lock_page_32_33
byte2
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0 0 block_page_36_39 block_page_32_35 block_page_28_31 block_page_24_27 block_page_20_23 block_page_16_19 ntag215
byte0
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
lock_page_128_129 lock_page_112_127 lock_page_96_111 lock_page_80_95 lock_page_64_79 lock_page_48_63 lock_page_32_47 lock_page_16_31
byte1
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0 0 0 0 0 0 0 0
byte2
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0 0 0 0 block_page_112_129 block_page_80_111 block_page_48_79 block_page_16_47 ntag216
byte0
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
lock_page_128_143 lock_page_112_127 lock_page_96_111 lock_page_80_95 lock_page_64_79 lock_page_48_63 lock_page_32_47 lock_page_16_31
byte1
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0 0 lock_page_224_225 lock_page_208_223 lock_page_192_207 lock_page_176_191 lock_page_160_175 lock_page_144_159 byte2
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0 block_page_208_225 block_page_176_207 block_page_144_175 block_page_112_143 block_page_80_111 block_page_48_79 block_page_16_47

Definition at line 1712 of file driver_ntag21x.c.

◆ ntag21x_set_mirror()

uint8_t ntag21x_set_mirror ( ntag21x_handle_t * handle,
ntag21x_mirror_t mirror )

ntag21x set the mirror

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]mirrorchip mirror mode
Returns
status code
  • 0 success
  • 1 set mirror failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1969 of file driver_ntag21x.c.

◆ ntag21x_set_mirror_byte()

uint8_t ntag21x_set_mirror_byte ( ntag21x_handle_t * handle,
ntag21x_mirror_byte_t byte )

ntag21x set the mirror byte

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]bytemirror byte
Returns
status code
  • 0 success
  • 1 set mirror byte failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2053 of file driver_ntag21x.c.

◆ ntag21x_set_mirror_page()

uint8_t ntag21x_set_mirror_page ( ntag21x_handle_t * handle,
uint8_t page )

ntag21x set the mirror page

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]pagemirror page
Returns
status code
  • 0 success
  • 1 set mirror page failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2221 of file driver_ntag21x.c.

◆ ntag21x_set_modulation_mode()

uint8_t ntag21x_set_modulation_mode ( ntag21x_handle_t * handle,
ntag21x_modulation_mode_t mode )

ntag21x set the modulation mode

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]modemodulation mode
Returns
status code
  • 0 success
  • 1 set modulation mode failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2137 of file driver_ntag21x.c.

◆ ntag21x_set_pack()

uint8_t ntag21x_set_pack ( ntag21x_handle_t * handle,
uint8_t pack[2] )

ntag21x set the pack

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]*packpointer to a pack buffer
Returns
status code
  • 0 success
  • 1 set pack failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 ack error
Note
none

Definition at line 1621 of file driver_ntag21x.c.

◆ ntag21x_set_password()

uint8_t ntag21x_set_password ( ntag21x_handle_t * handle,
uint8_t pwd[4] )

ntag21x set the password

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]*pwdpointer to a password buffer
Returns
status code
  • 0 success
  • 1 set pwd failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 ack error
Note
none

Definition at line 1559 of file driver_ntag21x.c.

◆ ntag21x_set_protect_start_page()

uint8_t ntag21x_set_protect_start_page ( ntag21x_handle_t * handle,
uint8_t page )

ntag21x set the start page of protection

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]pagestart page
Returns
status code
  • 0 success
  • 1 set protect start page failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 2304 of file driver_ntag21x.c.

◆ ntag21x_set_static_lock()

uint8_t ntag21x_set_static_lock ( ntag21x_handle_t * handle,
uint8_t lock[2] )

ntag21x set the static lock

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]*lockpointer to a lock buffer
Returns
status code
  • 0 success
  • 1 set static lock failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 ack error
Note
byte0
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
lock_page_7 lock_page_6 lock_page_5 lock_page_4 lock_page_cc block_page_15_10 block_page_9_2 bock_page_cc byte1
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
lock_page_15 lock_page_14 lock_page_13 lock_page_12 lock_page_11 lock_page_10 lock_page_9 lock_page_8

Definition at line 1844 of file driver_ntag21x.c.

◆ ntag21x_wake_up()

uint8_t ntag21x_wake_up ( ntag21x_handle_t * handle,
ntag21x_type_t * type )

ntag21x wake up

Parameters
[in]*handlepointer to an ntag21x handle structure
[out]*typepointer to a type buffer
Returns
status code
  • 0 success
  • 1 wake up failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 type is invalid
Note
none

Definition at line 369 of file driver_ntag21x.c.

◆ ntag21x_write_page()

uint8_t ntag21x_write_page ( ntag21x_handle_t * handle,
uint8_t page,
uint8_t data[4] )

ntag21x write page

Parameters
[in]*handlepointer to an ntag21x handle structure
[in]pagepage of write
[in]*datapointer to a data buffer
Returns
status code
  • 0 success
  • 1 write page failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 output_len is invalid
  • 5 ack error
Note
none

Definition at line 1423 of file driver_ntag21x.c.