Skip to content

Commit

Permalink
New tag type select
Browse files Browse the repository at this point in the history
  • Loading branch information
solosky committed Aug 11, 2024
1 parent 877a835 commit 9c64c39
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 8 additions & 0 deletions fw/application/src/app/chameleon/port/tag_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const static tag_specific_type_name_t tag_type_names[] = {
{TAG_TYPE_MF0UL21,"UL21", "MF0UL21", MF0UL21_PAGES * NFC_TAG_NTAG_DATA_SIZE},

};

// typedef enum {
// NFC_TAG_MF1_WRITE_NORMAL = 0u,
// NFC_TAG_MF1_WRITE_DENIED = 1u,
Expand All @@ -50,9 +51,16 @@ const tag_specific_type_t hf_tag_specific_types[] = {
TAG_TYPE_MIFARE_2048,
TAG_TYPE_MIFARE_4096,
// NTAG series
TAG_TYPE_NTAG_210,
TAG_TYPE_NTAG_212,
TAG_TYPE_NTAG_213,
TAG_TYPE_NTAG_215,
TAG_TYPE_NTAG_216,

TAG_TYPE_MF0ICU1,
TAG_TYPE_MF0ICU2,
TAG_TYPE_MF0UL11,
TAG_TYPE_MF0UL21
};

tag_group_type_t tag_helper_get_tag_group_type(tag_specific_type_t tag_type) {
Expand Down
3 changes: 1 addition & 2 deletions fw/application/src/app/chameleon/port/tag_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
#include "nfc_mf1.h"
#include "tag_base_type.h"

#define TAG_TYPE_MAX 9
#define TAG_TYPE_HF_MAX 8
#define TAG_TYPE_HF_MAX 13
#define SLOT_MAX 8

typedef struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void chameleon_scene_menu_card_type_on_enter(void *user_data) {
app_chameleon_t *app = user_data;

// 0 is unkown...
for (uint32_t i = 1; i < TAG_TYPE_HF_MAX; i++) {
for (uint32_t i = 1; i < TAG_TYPE_HF_MAX + 1; i++) {
const tag_specific_type_name_t *tag_name = tag_helper_get_tag_type_name(hf_tag_specific_types[i]);
mui_list_view_add_item(app->p_list_view, ICON_FILE, tag_name->long_name, (void *)CHAMELEON_MENU_CARD_TYPE);
}
Expand Down

0 comments on commit 9c64c39

Please sign in to comment.