return err;
}
-/* The dynamic read function:
+/*
+ * The dynamic read function:
* Bytes [0..3] : CC
* [4..8]: TLV Lock ControlIT (0x01, 0x03, v1, V2, V3)
* [9..13]: TLV Reserved Memory Control (0x02, 0x03, V1, V2, V3)
pndef = pndef + 5; /* skip TLV Lock bits bytes */
pndef = pndef + 5; /* skip TLV ControlIT bytes */
- /* Save first NFC bytes to tag memory
+ /*
+ * Save first NFC bytes to tag memory
* 10 blocks[0x3..0xC] of 8 bytes + 2 bytes from block 2
- * */
+ */
memcpy(tagdata, pndef, 10 * BLOCK_SIZE + 2);
/* Read the next one, up to the end of the data area */
t1_tag->tag = tag;
memcpy(t1_tag->uid, cookie->uid, UID_LENGTH);
- /*s Set the ReadWrite flag */
+ /* Set the ReadWrite flag */
if (TAG_T1_WRITE_FLAG(cc) == TYPE1_NOWRITE_ACCESS)
near_tag_set_ro(tag, TRUE);
else
return -EINVAL;
/* This check is valid for only static tags.
- * Max data length on Type 2 Tag including TLV's
+ * Max data length on Type 1 Tag including TLV's
* is TYPE1_STATIC_MAX_DATA_SIZE */
if (near_tag_get_memory_layout(tag) == NEAR_TAG_MEMORY_STATIC) {
if ((ndef->length + 3) > TYPE1_STATIC_MAX_DATA_SIZE) {
else
near_tag_set_ro(tag, FALSE);
- /* TODO: see how we can get the UID value:
+ /*
+ * TODO: see how we can get the UID value:
* near_tag_set_uid(tag, resp + NFC_HEADER_SIZE, 8);
- * */
+ */
/* Read 1st block */
err = ISO_ReadBinary(2, cookie->r_apdu_max_size - 2,
cookie->target_idx = target_idx;
cookie->cb = cb;
cookie->tag = NULL;
- cookie->read_data = 0;;
+ cookie->read_data = 0;
/* Check for V2 type 4 tag */
err = ISO_Select(iso_appname_v2, ARRAY_SIZE(iso_appname_v2),
cookie->target_idx = target_idx;
cookie->cb = cb;
cookie->tag = NULL;
- cookie->read_data = 0;;
+ cookie->read_data = 0;
/* Check for V2 type 4 tag */
err = ISO_Select(iso_appname_v2, ARRAY_SIZE(iso_appname_v2),
/* Carrier data reference length */
ac_record->cdr_len = rec[offset];
+ offset++;
/* Carrier data reference */
- offset++;
ac_record->cdr = rec[offset];
offset = offset + ac_record->cdr_len;