You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api_SFE_ST25DV64KC.md
+22-22
Original file line number
Diff line number
Diff line change
@@ -4,21 +4,21 @@
4
4
5
5
The ```SFE_ST25DV64KC``` class provides all of the necessary methods to exchange data with the ST25DV tag.
6
6
7
-
Communication with the tag is started by calling ```begin``` and providing the address of a ```TwoWire``` (I2C) Port. ```begin``` will default to ```Wire``` if no ```wirePort``` is provided.
7
+
Communication with the tag is started by calling ```begin``` and providing the address of a ```TwoWire``` (I<sup>2</sup>C) Port. ```begin``` will default to ```Wire``` if no ```wirePort``` is provided.
8
8
9
9
The tag's unique identifier (UID) can be read with ```getDeviceUID```. The hardware version can be checked with ```getDeviceRevision```.
10
10
11
-
By default, the user memory can be both read and written to via both I2C and RF (NFC). But, to change any of the IC's settings, a security session needs to be opened
12
-
by entering the correct password. The default password is eight zeros ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ) and - for I2C - can be entered by calling
13
-
```openI2CSession```. The status of the security session can be checked with ```isI2CSessionOpen```. The I2C password can be changed with ```writeI2CPassword```.
11
+
By default, the user memory can be both read and written to via both I<sup>2</sup>C and RF (NFC). But, to change any of the IC's settings, a security session needs to be opened
12
+
by entering the correct password. The default password is eight zeros ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ) and - for I<sup>2</sup>C - can be entered by calling
13
+
```openI2CSession```. The status of the security session can be checked with ```isI2CSessionOpen```. The I<sup>2</sup>C password can be changed with ```writeI2CPassword```.
14
14
15
-
!!! note
15
+
!!! attention
16
16
The password can be read back from the tag with ```readRegisterValues```, _**but**_ only when a security session is open. If you change the password, close the security session and then forget the password, _**your tag is locked forever**_. There is no way to change or reset the pasword unless you know the password. If you change it, write it down somewhere.
17
17
18
18
The memory can be divided up into four areas, each of which can have different security levels applied. ```setMemoryAreaEndAddress``` and ```getMemoryAreaEndAddress```
19
19
can change and read the end address for each area.
20
20
21
-
With an open security session, the I2C read and write permissions for each area can be changed and read with ```programEEPROMReadProtectionBit```, ```programEEPROMWriteProtectionBit```,
21
+
With an open security session, the I<sup>2</sup>C read and write permissions for each area can be changed and read with ```programEEPROMReadProtectionBit```, ```programEEPROMWriteProtectionBit```,
22
22
```getEEPROMReadProtectionBit``` and ```getEEPROMWriteProtectionBit```.
23
23
24
24
With an open security session, the RF read and write permissions for each area can be changed and read with ```setAreaRfRwProtection``` and ```getAreaRfRwProtection```.
This method checks if the I2C security session is open, i.e. that the correct password has been entered.
139
+
This method checks if the I<sup>2</sup>C security session is open, i.e. that the correct password has been entered.
140
140
141
141
```c++
142
142
bool isI2CSessionOpen()
@@ -148,9 +148,9 @@ bool isI2CSessionOpen()
148
148
149
149
### writeI2CPassword()
150
150
151
-
This method changes the I2C password. It will only be successful when a security session is open, i.e. you need to know the current password to be able to change the password (obvs.).
151
+
This method changes the I<sup>2</sup>C password. It will only be successful when a security session is open, i.e. you need to know the current password to be able to change the password (obvs.).
152
152
153
-
!!! note
153
+
!!! attention
154
154
The password can be read back from the tag with ```readRegisterValues```, _**but**_ only when a security session is open. If you change the password, close the security session and then forget the password, _**your tag is locked forever**_. There is no way to change or reset the pasword unless you know the password. If you change it, write it down somewhere.
| `memoryArea` | `uint8_t` | The memory area 1-4 |
234
-
| `writeSecured` | `bool` | ```true```: write is allowed only if an I2C security session is open. ```false```: write is always allowed |
234
+
| `writeSecured` | `bool` | ```true```: write is allowed only if an I<sup>2</sup>C security session is open. ```false```: write is always allowed |
235
235
| return value | `bool` | ```true``` if the write is successful, otherwise ```false``` |
236
236
237
237
### getEEPROMReadProtectionBit()
@@ -317,8 +317,8 @@ as defined by ```setAreaRfRwProtection```. The matching RF Password (1-3) can al
317
317
318
318
By default, the `pwdCtrl` setting for each memory area is `RF_PWD_NEVER`, meaning that a RF User security session can not be opened by password.
319
319
320
-
To protect a tag against unwanted changes via an RF Configuration Session, RF Password 0 should be changed using an App like ST's "NFC Tap".
321
-
It is not possible to do this via I2C. The I2C interface has no access to the four RF passwords.
320
+
!!! attention
321
+
To protect a tag against unwanted changes via an RF Configuration Session, RF Password 0 should be changed using an App like ST's "NFC Tap". It is not possible to do this via I<sup>2</sup>C. The I<sup>2</sup>C interface has no access to the four RF passwords.
|`st25_io`|`class SFE_ST2525DV64KC_IO`| An instance of the `SFE_ST2525DV64KC_IO` class, providing I2C communication methods and storage for `wirePort`|
685
+
|`st25_io`|`class SFE_ST2525DV64KC_IO`| An instance of the `SFE_ST2525DV64KC_IO` class, providing I<sup>2</sup>C communication methods and storage for `wirePort`|
Copy file name to clipboardExpand all lines: docs/api_SFE_ST25DV64KC_IO.md
+13-13
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,14 @@
2
2
3
3
## Brief Overview
4
4
5
-
The ```SFE_ST25DV64KC_IO``` class provides the interface to the ST25DV hardware via I2C. It provides methods to: read and write single and multiple register values,
5
+
The ```SFE_ST25DV64KC_IO``` class provides the interface to the ST25DV hardware via I<sup>2</sup>C. It provides methods to: read and write single and multiple register values,
6
6
set or clear individual register bits, and confirm if a register bit is set.
7
7
8
8
## Initialization
9
9
10
10
### begin()
11
11
12
-
This method records the specified TwoWire port and uses that for all future I2C communication.
12
+
This method records the specified TwoWire port and uses that for all future I<sup>2</sup>C communication.
13
13
14
14
It also calls ```isConnected()``` and returns the result, confirming whether the ST25DV has been detected successfully.
15
15
@@ -19,12 +19,12 @@ bool begin(TwoWire &wirePort)
19
19
20
20
| Parameter | Type | Description |
21
21
| :-------- | :--- | :---------- |
22
-
| `wirePort` | `TwoWire &` | The I2C port to be used to communicate with the ST25DV |
22
+
| `wirePort` | `TwoWire &` | The I<sup>2</sup>C port to be used to communicate with the ST25DV |
23
23
| return value | `bool` | ```true``` if the ST25DV is detected, otherwise ```false``` |
24
24
25
25
### isConnected()
26
26
27
-
This method confirms if the ST25DV is connected by polling one of its I2C addresses.
27
+
This method confirms if the ST25DV is connected by polling one of its I<sup>2</sup>C addresses.
28
28
29
29
```C++
30
30
bool isConnected()
@@ -55,7 +55,7 @@ RF_SWITCH_ON, // E2 = 1, E1 = 0
55
55
56
56
| Parameter | Type | Description |
57
57
| :-------- | :--- | :---------- |
58
-
|`address`|`enum class SF_ST25DV64KC_ADDRESS`| The register type, equivalent to the I2C address |
58
+
|`address`|`enum class SF_ST25DV64KC_ADDRESS`| The register type, equivalent to the I<sup>2</sup>C address |
59
59
|`registerAddress`|`const uint16_t`| The register address |
60
60
|`value`|`uint8_t *`|`value` will hold the register value on return |
61
61
| return value |`bool`|```true``` if the read was successful, otherwise ```false```|
@@ -79,7 +79,7 @@ RF_SWITCH_ON, // E2 = 1, E1 = 0
79
79
80
80
| Parameter | Type | Description |
81
81
| :-------- | :--- | :---------- |
82
-
|`address`|`enum class SF_ST25DV64KC_ADDRESS`| The register type, equivalent to the I2C address |
82
+
|`address`|`enum class SF_ST25DV64KC_ADDRESS`| The register type, equivalent to the I<sup>2</sup>C address |
83
83
|`registerAddress`|`const uint16_t`| The register address |
84
84
|`value`|`const uint8_t`| The value to be written |
85
85
| return value |`bool`|```true``` if the write was successful, otherwise ```false```|
| `address` | `enum class SF_ST25DV64KC_ADDRESS` | The register type, equivalent to the I2C address |
154
+
| `address` | `enum class SF_ST25DV64KC_ADDRESS` | The register type, equivalent to the I<sup>2</sup>C address |
155
155
| `registerAddress` | `const uint16_t` | The register address |
156
156
| `bitMask` | `const uint8_t` | Defines which bits will be set. Each bit set in `bitMask` will cause the corresponding bit in `registerAddress` to be set |
157
157
| return value | `bool` | ```true``` if the write was successful, otherwise ```false``` |
|`address`|`enum class SF_ST25DV64KC_ADDRESS`| The register type, equivalent to the I2C address |
171
+
|`address`|`enum class SF_ST25DV64KC_ADDRESS`| The register type, equivalent to the I<sup>2</sup>C address |
172
172
|`registerAddress`|`const uint16_t`| The register address |
173
173
|`bitMask`|`const uint8_t`| Defines which bits will be cleared. Each bit set in `bitMask` will cause the corresponding bit in `registerAddress` to be cleared |
174
174
| return value |`bool`|```true``` if the write was successful, otherwise ```false```|
| `address` | `enum class SF_ST25DV64KC_ADDRESS` | The register type, equivalent to the I2C address |
189
+
| `address` | `enum class SF_ST25DV64KC_ADDRESS` | The register type, equivalent to the I<sup>2</sup>C address |
190
190
| `registerAddress` | `const uint16_t` | The register address |
191
191
| `bitMask` | `const uint8_t` | Defines which bits will be tested |
192
192
| return value | `bool` | ```true``` if the bit defined by `bitMask` is set, otherwise ```false``` |
193
193
194
194
## Member Variables
195
195
196
196
!!! note
197
-
When the ST25DV is busy writing to its internal `DATA` memory, it will NACK any further attempted I2C transmissions until the write is complete. The write duration is variable and depends on whether the write crosses block boundaries. Therefore, the library implements a retry strategy. Each read or write will be attempted up to `maxRetries` times, with a delay of `retryDelay` in between, before an error is triggered.
197
+
When the ST25DV is busy writing to its internal `DATA` memory, it will NACK any further attempted I<sup>2</sup>C transmissions until the write is complete. The write duration is variable and depends on whether the write crosses block boundaries. Therefore, the library implements a retry strategy. Each read or write will be attempted up to `maxRetries` times, with a delay of `retryDelay` in between, before an error is triggered.
198
198
199
199
| Parameter | Type | Description |
200
200
| :-------- | :--- | :---------- |
201
-
| `readWriteChunkSize` | `uint8_t` | The number of bytes that will be read or written in a single I2C transmission. Default is 32 |
201
+
| `readWriteChunkSize` | `uint8_t` | The number of bytes that will be read or written in a single I<sup>2</sup>C transmission. Default is 32 |
202
202
| `maxRetries` | `const uint8_t` | The maximum number of times a register read or write wil be attempted before triggering an error. Set to 6 |
203
203
| `retryDelay` | `const uint8_t` | The number of milliseconds delay between read or write attempts. Set to 5 |
0 commit comments