Skip to content

Commit 967c755

Browse files
authored
Merge pull request #17 from sparkfun/release_candidate
Docs update
2 parents 31410d8 + c790be8 commit 967c755

15 files changed

+134
-97
lines changed

docs/api_SFE_ST25DV64KC.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44

55
The ```SFE_ST25DV64KC``` class provides all of the necessary methods to exchange data with the ST25DV tag.
66

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.
88

99
The tag's unique identifier (UID) can be read with ```getDeviceUID```. The hardware version can be checked with ```getDeviceRevision```.
1010

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```.
1414

15-
!!! note
15+
!!! attention
1616
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.
1717

1818
The memory can be divided up into four areas, each of which can have different security levels applied. ```setMemoryAreaEndAddress``` and ```getMemoryAreaEndAddress```
1919
can change and read the end address for each area.
2020

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```,
2222
```getEEPROMReadProtectionBit``` and ```getEEPROMWriteProtectionBit```.
2323

2424
With an open security session, the RF read and write permissions for each area can be changed and read with ```setAreaRfRwProtection``` and ```getAreaRfRwProtection```.
@@ -64,7 +64,7 @@ tag.setErrorCallback(&errorHandler);
6464

6565
### begin()
6666

67-
This method configures I2C communication with the tag and confirms the tag is connected.
67+
This method configures I<sup>2</sup>C communication with the tag and confirms the tag is connected.
6868

6969
```c++
7070
bool begin(TwoWire &wirePort)
@@ -77,7 +77,7 @@ bool begin(TwoWire &wirePort)
7777
7878
### isConnected()
7979
80-
This method confirms if a device is connected at the expected I2C address.
80+
This method confirms if a device is connected at the expected I<sup>2</sup>C address.
8181
This method can only be called after ```begin```, as ```begin``` configures which TwoWire port will be used.
8282
```begin``` calls ```isConnected``` internally to establish if a tag is connected.
8383
@@ -121,7 +121,7 @@ bool getDeviceRevision(uint8_t *value)
121121

122122
### openI2CSession()
123123

124-
This method enters the I2C security session 64-bit password. password is uint8_t[8].
124+
This method enters the I<sup>2</sup>C security session 64-bit password. password is uint8_t[8].
125125
This method returns ```true``` if the password is written to the tag successfully - but that does not confirm that the password is valid/invalid.
126126
The password validity must be confirmed with ```isI2CSessionOpen```.
127127

@@ -136,7 +136,7 @@ bool openI2CSession(uint8_t *password)
136136
137137
### isI2CSessionOpen()
138138
139-
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.
140140
141141
```c++
142142
bool isI2CSessionOpen()
@@ -148,9 +148,9 @@ bool isI2CSessionOpen()
148148

149149
### writeI2CPassword()
150150

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.).
152152

153-
!!! note
153+
!!! attention
154154
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.
155155

156156
```c++
@@ -197,11 +197,11 @@ uint16_t getMemoryAreaEndAddress(uint8_t memoryArea)
197197
| `memoryArea` | `uint8_t` | The memory area 1-3 |
198198
| return value | `uint16_t` | The actual end address (16-bit) |
199199
200-
## I2C Read and Write Protection
200+
## I<sup>2</sup>C Read and Write Protection
201201
202202
### programEEPROMReadProtectionBit()
203203
204-
This method sets/clears the I2C read protection bit for the specified memory area 1-4.
204+
This method sets/clears the I<sup>2</sup>C read protection bit for the specified memory area 1-4.
205205
206206
When set, the memory area is only readable if a security session is open.
207207
@@ -215,12 +215,12 @@ bool programEEPROMReadProtectionBit(uint8_t memoryArea, bool readSecured)
215215
| Parameter | Type | Description |
216216
| :-------- | :--- | :---------- |
217217
| `memoryArea` | `uint8_t` | The memory area 1-4 |
218-
| `readSecured` | `bool` | ```true```: read is allowed only if an I2C security session is open. ```false```: read is always allowed |
218+
| `readSecured` | `bool` | ```true```: read is allowed only if an I<sup>2</sup>C security session is open. ```false```: read is always allowed |
219219
| return value | `bool` | ```true``` if the write is successful, otherwise ```false``` |
220220

221221
### programEEPROMWriteProtectionBit()
222222

223-
This method sets/clears the I2C write protection bit for the specified memory area 1-4.
223+
This method sets/clears the I<sup>2</sup>C write protection bit for the specified memory area 1-4.
224224

225225
When set, the memory area is only writeable if a security session is open.
226226

@@ -231,7 +231,7 @@ bool programEEPROMWriteProtectionBit(uint8_t memoryArea, bool writeSecured)
231231
| Parameter | Type | Description |
232232
| :-------- | :--- | :---------- |
233233
| `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 |
235235
| return value | `bool` | ```true``` if the write is successful, otherwise ```false``` |
236236
237237
### getEEPROMReadProtectionBit()
@@ -317,8 +317,8 @@ as defined by ```setAreaRfRwProtection```. The matching RF Password (1-3) can al
317317
318318
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.
319319
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.
322322
323323
```c++
324324
bool setAreaRfPwdCtrl(uint8_t memoryArea, SF_ST25DV_RF_PWD_CTRL pwdCtrl)
@@ -639,7 +639,7 @@ RF_SWITCH_ON, // E2 = 1, E1 = 0
639639

640640
| Parameter | Type | Description |
641641
| :-------- | :--- | :---------- |
642-
| `addressType` | `enum class SF_ST25DV64KC_ADDRESS` | The register type, equivalent to the I2C address |
642+
| `addressType` | `enum class SF_ST25DV64KC_ADDRESS` | The register type, equivalent to the I<sup>2</sup>C address |
643643
| `registerAddress` | `const uint16_t` | The register address |
644644
| `value` | `uint8_t *` | `value` will hold the register value on return |
645645
| return value | `bool` | ```true``` if the read was successful, otherwise ```false``` |
@@ -672,7 +672,7 @@ RF_SWITCH_ON, // E2 = 1, E1 = 0
672672

673673
| Parameter | Type | Description |
674674
| :-------- | :--- | :---------- |
675-
| `addressType` | `enum class SF_ST25DV64KC_ADDRESS` | The register type, equivalent to the I2C address |
675+
| `addressType` | `enum class SF_ST25DV64KC_ADDRESS` | The register type, equivalent to the I<sup>2</sup>C address |
676676
| `registerAddress` | `const uint16_t` | The start register address |
677677
| `data` | `uint8_t *` | `data` will hold the register values on return |
678678
| `dataLength` | `const uint16_t` | The number of registers to be read |
@@ -682,4 +682,4 @@ RF_SWITCH_ON, // E2 = 1, E1 = 0
682682

683683
| Parameter | Type | Description |
684684
| :-------- | :--- | :---------- |
685-
| `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` |

docs/api_SFE_ST25DV64KC_IO.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## Brief Overview
44

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,
66
set or clear individual register bits, and confirm if a register bit is set.
77

88
## Initialization
99

1010
### begin()
1111

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.
1313

1414
It also calls ```isConnected()``` and returns the result, confirming whether the ST25DV has been detected successfully.
1515

@@ -19,12 +19,12 @@ bool begin(TwoWire &wirePort)
1919
2020
| Parameter | Type | Description |
2121
| :-------- | :--- | :---------- |
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 |
2323
| return value | `bool` | ```true``` if the ST25DV is detected, otherwise ```false``` |
2424
2525
### isConnected()
2626
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.
2828
2929
```C++
3030
bool isConnected()
@@ -55,7 +55,7 @@ RF_SWITCH_ON, // E2 = 1, E1 = 0
5555

5656
| Parameter | Type | Description |
5757
| :-------- | :--- | :---------- |
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 |
5959
| `registerAddress` | `const uint16_t` | The register address |
6060
| `value` | `uint8_t *` | `value` will hold the register value on return |
6161
| return value | `bool` | ```true``` if the read was successful, otherwise ```false``` |
@@ -79,7 +79,7 @@ RF_SWITCH_ON, // E2 = 1, E1 = 0
7979

8080
| Parameter | Type | Description |
8181
| :-------- | :--- | :---------- |
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 |
8383
| `registerAddress` | `const uint16_t` | The register address |
8484
| `value` | `const uint8_t` | The value to be written |
8585
| return value | `bool` | ```true``` if the write was successful, otherwise ```false``` |
@@ -106,7 +106,7 @@ RF_SWITCH_ON, // E2 = 1, E1 = 0
106106

107107
| Parameter | Type | Description |
108108
| :-------- | :--- | :---------- |
109-
| `address` | `enum class SF_ST25DV64KC_ADDRESS` | The register type, equivalent to the I2C address |
109+
| `address` | `enum class SF_ST25DV64KC_ADDRESS` | The register type, equivalent to the I<sup>2</sup>C address |
110110
| `registerAddress` | `const uint16_t` | The start register address |
111111
| `buffer` | `uint8_t *const` | A pointer to the array of uint8_t which will hold the read values |
112112
| `packetLength` | `const uint16_t` | The number of registers to be read |
@@ -131,7 +131,7 @@ RF_SWITCH_ON, // E2 = 1, E1 = 0
131131

132132
| Parameter | Type | Description |
133133
| :-------- | :--- | :---------- |
134-
| `address` | `enum class SF_ST25DV64KC_ADDRESS` | The register type, equivalent to the I2C address |
134+
| `address` | `enum class SF_ST25DV64KC_ADDRESS` | The register type, equivalent to the I<sup>2</sup>C address |
135135
| `registerAddress` | `const uint16_t` | The start register address |
136136
| `buffer` | `uint8_t *const` | A pointer to the array of uint8_t which holds the values to be written |
137137
| `packetLength` | `const uint16_t` | The number of values to be written |
@@ -151,7 +151,7 @@ bool setRegisterBit(const SF_ST25DV64KC_ADDRESS address, const uint16_t register
151151
152152
| Parameter | Type | Description |
153153
| :-------- | :--- | :---------- |
154-
| `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 |
155155
| `registerAddress` | `const uint16_t` | The register address |
156156
| `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 |
157157
| return value | `bool` | ```true``` if the write was successful, otherwise ```false``` |
@@ -168,7 +168,7 @@ bool clearRegisterBit(const SF_ST25DV64KC_ADDRESS address, const uint16_t regist
168168

169169
| Parameter | Type | Description |
170170
| :-------- | :--- | :---------- |
171-
| `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 |
172172
| `registerAddress` | `const uint16_t` | The register address |
173173
| `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 |
174174
| return value | `bool` | ```true``` if the write was successful, otherwise ```false``` |
@@ -186,18 +186,18 @@ bool isBitSet(const SF_ST25DV64KC_ADDRESS address, const uint16_t registerAddres
186186
187187
| Parameter | Type | Description |
188188
| :-------- | :--- | :---------- |
189-
| `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 |
190190
| `registerAddress` | `const uint16_t` | The register address |
191191
| `bitMask` | `const uint8_t` | Defines which bits will be tested |
192192
| return value | `bool` | ```true``` if the bit defined by `bitMask` is set, otherwise ```false``` |
193193
194194
## Member Variables
195195
196196
!!! 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.
198198
199199
| Parameter | Type | Description |
200200
| :-------- | :--- | :---------- |
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 |
202202
| `maxRetries` | `const uint8_t` | The maximum number of times a register read or write wil be attempted before triggering an error. Set to 6 |
203203
| `retryDelay` | `const uint8_t` | The number of milliseconds delay between read or write attempts. Set to 5 |

0 commit comments

Comments
 (0)