|
|
@@ -44,7 +44,7 @@ Gen4PollerError gen4_poller_set_shadow_mode(
|
|
|
|
|
|
do {
|
|
|
uint8_t password_arr[4] = {};
|
|
|
- nfc_util_num2bytes(password, COUNT_OF(password_arr), password_arr);
|
|
|
+ bit_lib_num_to_bytes_be(password, COUNT_OF(password_arr), password_arr);
|
|
|
bit_buffer_append_byte(instance->tx_buffer, GEN4_CMD_PREFIX);
|
|
|
bit_buffer_append_bytes(instance->tx_buffer, password_arr, COUNT_OF(password_arr));
|
|
|
bit_buffer_append_byte(instance->tx_buffer, GEN4_CMD_SET_SHD_MODE);
|
|
|
@@ -81,7 +81,7 @@ Gen4PollerError gen4_poller_set_direct_write_block_0_mode(
|
|
|
|
|
|
do {
|
|
|
uint8_t password_arr[4] = {};
|
|
|
- nfc_util_num2bytes(password, COUNT_OF(password_arr), password_arr);
|
|
|
+ bit_lib_num_to_bytes_be(password, COUNT_OF(password_arr), password_arr);
|
|
|
bit_buffer_append_byte(instance->tx_buffer, GEN4_CMD_PREFIX);
|
|
|
bit_buffer_append_bytes(instance->tx_buffer, password_arr, COUNT_OF(password_arr));
|
|
|
bit_buffer_append_byte(instance->tx_buffer, GEN4_CMD_SET_DW_BLOCK_0);
|
|
|
@@ -116,7 +116,7 @@ Gen4PollerError
|
|
|
|
|
|
do {
|
|
|
uint8_t password_arr[4] = {};
|
|
|
- nfc_util_num2bytes(password, COUNT_OF(password_arr), password_arr);
|
|
|
+ bit_lib_num_to_bytes_be(password, COUNT_OF(password_arr), password_arr);
|
|
|
bit_buffer_append_byte(instance->tx_buffer, GEN4_CMD_PREFIX);
|
|
|
bit_buffer_append_bytes(instance->tx_buffer, password_arr, COUNT_OF(password_arr));
|
|
|
bit_buffer_append_byte(instance->tx_buffer, GEN4_CMD_GET_CFG);
|
|
|
@@ -148,7 +148,7 @@ Gen4PollerError
|
|
|
|
|
|
do {
|
|
|
uint8_t password_arr[4] = {};
|
|
|
- nfc_util_num2bytes(password, COUNT_OF(password_arr), password_arr);
|
|
|
+ bit_lib_num_to_bytes_be(password, COUNT_OF(password_arr), password_arr);
|
|
|
bit_buffer_append_byte(instance->tx_buffer, GEN4_CMD_PREFIX);
|
|
|
bit_buffer_append_bytes(instance->tx_buffer, password_arr, COUNT_OF(password_arr));
|
|
|
bit_buffer_append_byte(instance->tx_buffer, GEN4_CMD_GET_REVISION);
|
|
|
@@ -183,7 +183,7 @@ Gen4PollerError gen4_poller_set_config(
|
|
|
|
|
|
do {
|
|
|
uint8_t password_arr[4] = {};
|
|
|
- nfc_util_num2bytes(password, COUNT_OF(password_arr), password_arr);
|
|
|
+ bit_lib_num_to_bytes_be(password, COUNT_OF(password_arr), password_arr);
|
|
|
bit_buffer_append_byte(instance->tx_buffer, GEN4_CMD_PREFIX);
|
|
|
bit_buffer_append_bytes(instance->tx_buffer, password_arr, COUNT_OF(password_arr));
|
|
|
uint8_t fuse_config = fuse ? GEN4_CMD_FUSE_CFG : GEN4_CMD_SET_CFG;
|
|
|
@@ -221,7 +221,7 @@ Gen4PollerError gen4_poller_write_block(
|
|
|
|
|
|
do {
|
|
|
uint8_t password_arr[4] = {};
|
|
|
- nfc_util_num2bytes(password, COUNT_OF(password_arr), password_arr);
|
|
|
+ bit_lib_num_to_bytes_be(password, COUNT_OF(password_arr), password_arr);
|
|
|
bit_buffer_append_byte(instance->tx_buffer, GEN4_CMD_PREFIX);
|
|
|
bit_buffer_append_bytes(instance->tx_buffer, password_arr, COUNT_OF(password_arr));
|
|
|
bit_buffer_append_byte(instance->tx_buffer, GEN4_CMD_WRITE);
|
|
|
@@ -253,12 +253,12 @@ Gen4PollerError
|
|
|
|
|
|
do {
|
|
|
uint8_t password_arr[4] = {};
|
|
|
- nfc_util_num2bytes(pwd_current, COUNT_OF(password_arr), password_arr);
|
|
|
+ bit_lib_num_to_bytes_be(pwd_current, COUNT_OF(password_arr), password_arr);
|
|
|
bit_buffer_append_byte(instance->tx_buffer, GEN4_CMD_PREFIX);
|
|
|
bit_buffer_append_bytes(instance->tx_buffer, password_arr, COUNT_OF(password_arr));
|
|
|
|
|
|
bit_buffer_append_byte(instance->tx_buffer, GEN4_CMD_SET_PWD);
|
|
|
- nfc_util_num2bytes(pwd_new, COUNT_OF(password_arr), password_arr);
|
|
|
+ bit_lib_num_to_bytes_be(pwd_new, COUNT_OF(password_arr), password_arr);
|
|
|
bit_buffer_append_bytes(instance->tx_buffer, password_arr, COUNT_OF(password_arr));
|
|
|
|
|
|
Iso14443_3aError error = iso14443_3a_poller_send_standard_frame(
|