Skip to content

Commit a3334bb

Browse files
committed
update chameleon ultra upstream
1 parent b6b9283 commit a3334bb

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

fw/application/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ SRC_FILES += \
332332
$(CHAMELEON_ROOT)/application/src/rfid/nfctag/hf/crypto1_helper.c \
333333
$(CHAMELEON_ROOT)/application/src/rfid/nfctag/hf/nfc_14a.c \
334334
$(CHAMELEON_ROOT)/application/src/rfid/nfctag/hf/nfc_mf1.c \
335-
$(CHAMELEON_ROOT)/application/src/rfid/nfctag/hf/nfc_ntag.c \
335+
$(CHAMELEON_ROOT)/application/src/rfid/nfctag/hf/nfc_mf0_ntag.c \
336336
$(CHAMELEON_ROOT)/application/src/rfid/crc_utils.c \
337337
$(CHAMELEON_ROOT)/application/src/rfid/hex_utils.c \
338338
$(CHAMELEON_ROOT)/application/src/rfid/mf1_crapto1.c \

fw/application/src/app/chameleon/port/tag_helper.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "nrf_log.h"
66
#include "utils2.h"
77
#include <string.h>
8+
#define NFC_TAG_NTAG_DATA_SIZE 4
89

910
const static tag_specific_type_name_t tag_type_names[] = {
1011
{TAG_TYPE_UNDEFINED, "-", "-", 0},
@@ -75,9 +76,9 @@ const nfc_tag_14a_coll_res_reference_t *tag_helper_get_active_coll_res_ref() {
7576
// nfc_tag_mf1_information_t *m_tag_information = (nfc_tag_mf1_information_t *)tag_buffer->buffer;
7677
// return &m_tag_information->res_coll;
7778
} else {
78-
// nfc_tag_ntag_information_t *m_tag_information = (nfc_tag_ntag_information_t *)tag_buffer->buffer;
79+
// nfc_tag_mf0_ntag_information_t *m_tag_information = (nfc_tag_mf0_ntag_information_t *)tag_buffer->buffer;
7980
// return &m_tag_information->res_coll;
80-
return get_ntag_coll_res();
81+
return nfc_tag_mf0_ntag_get_coll_res();
8182
}
8283
}
8384

@@ -150,7 +151,7 @@ uint8_t *tag_helper_get_active_tag_memory_data() {
150151
nfc_tag_mf1_information_t *m_tag_information = (nfc_tag_mf1_information_t *)tag_buffer->buffer;
151152
return &m_tag_information->memory;
152153
} else {
153-
nfc_tag_ntag_information_t *m_tag_information = (nfc_tag_ntag_information_t *)tag_buffer->buffer;
154+
nfc_tag_mf0_ntag_information_t *m_tag_information = (nfc_tag_mf0_ntag_information_t *)tag_buffer->buffer;
154155
return &m_tag_information->memory;
155156
}
156157
}
@@ -160,12 +161,12 @@ void tag_helper_generate_uid() {
160161
tag_group_type_t tag_group_type = tag_helper_get_tag_group_type(tag_type);
161162
tag_data_buffer_t *tag_buffer = get_buffer_by_tag_type(tag_type);
162163
if (tag_group_type == TAG_GROUP_NTAG) {
163-
nfc_tag_ntag_information_t *m_tag_information = (nfc_tag_ntag_information_t *)tag_buffer->buffer;
164+
nfc_tag_mf0_ntag_information_t *m_tag_information = (nfc_tag_mf0_ntag_information_t *)tag_buffer->buffer;
164165
uint8_t uuid[7];
165166
ret_code_t err_code = utils_rand_bytes(uuid, sizeof(uuid));
166167
if (err_code == NRF_SUCCESS) {
167168
uuid[0] = 04; // fixed
168-
m_tag_information->memory[0][0] = uuid[0];
169+
m_tag_information->memory[0][0] = uuid[0];
169170
m_tag_information->memory[0][1] = uuid[1];
170171
m_tag_information->memory[0][2] = uuid[2];
171172
// BCC 0 is always equal to UID0 ⊕ UID 1 ⊕ UID 2 ⊕ 0x88

fw/application/src/app/chameleon/port/tag_helper.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#ifndef TAG_HELPER_H
22
#define TAG_HELPER_H
33

4-
#include "tag_base_type.h"
54
#include "nfc_14a.h"
5+
#include "nfc_mf0_ntag.h"
66
#include "nfc_mf1.h"
7-
#include "nfc_ntag.h"
7+
#include "tag_base_type.h"
88

99
#define TAG_TYPE_MAX 9
1010
#define TAG_TYPE_HF_MAX 8
@@ -25,7 +25,7 @@ typedef enum {
2525

2626
extern const tag_specific_type_t hf_tag_specific_types[];
2727

28-
const tag_specific_type_name_t* tag_helper_get_tag_type_name(tag_specific_type_t tag_type);
28+
const tag_specific_type_name_t *tag_helper_get_tag_type_name(tag_specific_type_t tag_type);
2929
const nfc_tag_14a_coll_res_reference_t *tag_helper_get_active_coll_res_ref();
3030
tag_specific_type_t tag_helper_get_active_tag_type();
3131
void tag_helper_format_uid(char *buff, uint8_t *uid, uint8_t uid_len);
@@ -39,5 +39,4 @@ uint8_t *tag_helper_get_active_tag_memory_data();
3939

4040
void tag_helper_generate_uid();
4141

42-
4342
#endif

fw/components/chameleon-ultra

fw/components/littlefs

Submodule littlefs updated 67 files

0 commit comments

Comments
 (0)