Skip to content

Commit 37771be

Browse files
committed
nfctag: documentation cleanup
1 parent 996fbd8 commit 37771be

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

modules/NFCTag.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ NFCTag.prototype._write = function(rx) {
6565
};
6666

6767
/**
68-
* Change tag
69-
*
70-
* setData(data)
68+
* Set Tag contents
7169
*/
7270
NFCTag.prototype.setData = function(data) {
7371
//shutdown
@@ -84,10 +82,7 @@ NFCTag.prototype.setData = function(data) {
8482
};
8583

8684
/**
87-
* Retrieve tag contents
88-
*
89-
* getData();
90-
* =new Uint8Array(...)
85+
* Retrieve tag contents as Uint8Array
9186
*/
9287
NFCTag.prototype.getData = function() {
9388
return this._data;

modules/NFCTag.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ with up to 1k of storage. The storage may be read and written by a NFC Reader as
1111
well as JS code.
1212

1313
Background
14-
==========
14+
----------
1515

1616
Type 2 Tags support three commands, *read*, *write* and *sector select* (if the
1717
data area is larger than 1k). During read and write operations data is addressed
1818
in 4 byte blocks.
1919

2020
Most common Type 2 Tags have a *dynamic memory structure*. This structure defines
2121
the purpose of the first 16 bytes. Those are static and define the Tags type and
22-
configuration. In short - the first 10 bytes are a *Unique ID* and checksum.
22+
configuration. In short: The first 10 bytes are a *Unique ID* and checksum.
2323
Those are followed by 16 lock bits. The final 4 bytes are a capability container.
2424

2525
This *NFC Tag module* initializes the first 10 bytes from NRF52's ROM area. The
@@ -32,14 +32,14 @@ Example
3232
This example creates an empty 768-byte Tag. The table below describes the six
3333
initializer bytes used on the second line:
3434

35-
| Index | Value | Explanation |
36-
|-------|-------|----------------------------------------------------------|
37-
| 0 | 0x00 | Dynamic Lock Bits 0-7 (0x00 denotes no restriction) |
38-
| 1 | 0x00 | Dynamic Lock Bits 8-15 (0x00 denotes no restriction) |
39-
| 2 | 0xE1 | Magic number (Tag contains NFC Forum defined data) |
40-
| 3 | 0x11 | Version (Major and Minor of nfc spec supported, v1.1) |
41-
| 4 | 0x60 | Memory size (byte multiplied by 8: 0x60 * 8 = 768 bytes) |
42-
| 5 | 0x00 | Read and Write access (0x00 denotes no restriction) |
35+
| Index | Value | Explanation |
36+
|-------|-------|-----------------------------------------------------------|
37+
| 0 | 0x00 | Dynamic Lock Bits 0-7 (0x00 denotes no restriction) |
38+
| 1 | 0x00 | Dynamic Lock Bits 8-15 (0x00 denotes no restriction) |
39+
| 2 | 0xE1 | Magic number (Tag contains NFC Forum defined data) |
40+
| 3 | 0x11 | Version (Major and Minor of nfc spec supported, v1.1) |
41+
| 4 | 0x60 | Memory size (value multiplied by 8: 0x60 * 8 = 768 bytes) |
42+
| 5 | 0x00 | Read and Write access (0x00 denotes no restriction) |
4343

4444
It is writtable using almost any NFC Reader e.g. an Android phone (using [NFC TagWriter by NXP](https://play.google.com/store/apps/details?id=com.nxp.nfc.tagwriter).
4545

0 commit comments

Comments
 (0)