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
@@ -88,7 +88,7 @@ If the NFC controller can emulate a smartcard, no handover is necessary, and the
88
88
89
89
### BLE pairing
90
90
91
-
You can use a specifically crafted NDEF message to facilitate out-of-band pairing wth man-in-the-middle protection as specified in the [Bluetooth® Secure Simple Pairing Using NFC](https://members.nfc-forum.org/apps/group_public/download.php/18688/NFCForum-AD-BTSSP_1_1.pdf) document.
91
+
You can use a specifically crafted NDEF message to facilitate out-of-band pairing with man-in-the-middle protection as specified in the [Bluetooth® Secure Simple Pairing Using NFC](https://members.nfc-forum.org/apps/group_public/download.php/18688/NFCForum-AD-BTSSP_1_1.pdf) document.
92
92
93
93
# System architecture and high-level design
94
94
@@ -107,7 +107,7 @@ The NFC API exposed to the user should provide high-level, object-oriented C++ A
107
107
108
108
## Phase 1: MicroNFC stack integration
109
109
110
-
The first step toward integrating NFC in Mbed OS is the integration of the MicroNFC stack, which has drivers for the PN512 and derivatives.
110
+
The first step toward adding NFC to Mbed OS is the integration of the MicroNFC stack, which has drivers for the PN512 and derivatives.
111
111
112
112
Architecture:
113
113
@@ -133,7 +133,7 @@ Examples of NCI-compliant controllers:
133
133
- ST ST21NFC.
134
134
- NXP PN7120 and PN7150.
135
135
136
-
Examples of NCI-compliant transceivers that are *not* NCI-compliant:
136
+
Examples of transceivers that are *not* NCI-compliant:
137
137
138
138
- NXP PN512.
139
139
- NXP PN5180.
@@ -158,7 +158,7 @@ Class diagram:
158
158
159
159
The `NFCController` class is the entrypoint into NFC for the user.
160
160
161
-
When NCI integration is complete (phase 2), this class has to be provided with an`NCIDriver` instance. For now, the one controller we support is the PN512, which implements the `NFCControllerDriver` class. This class is specific to the current MicroNFC release.
161
+
When NCI integration is complete (phase 2), this class will be able to drive a`NCIDriver` instance. For now, the one controller we support is the PN512, which implements the `NFCControllerDriver` class. This class is specific to the current MicroNFC release.
These methods called when a remote initiator (the local controller is acting as a target) or a remote target (the local controller is acting as an initiator) is detected.
248
248
249
-
Shared pointers are used, so the user does not have to maintain the lifetime of these objects. The `NFCController` instance releases its reference when the endpoint is lost (see below).
249
+
These methods use shared pointers, so the user does not have to maintain the lifetime of these objects. The `NFCController` instance releases its reference when the endpoint is lost (see below).
250
250
251
251
### Endpoints
252
252
@@ -272,13 +272,13 @@ Drop the connection with the remote endpoint.
272
272
boolis_connected() const;
273
273
```
274
274
275
-
Set to true when the connection to this endpoint has been activated and is currently selected by the controller.
275
+
Set to true when the remote endpoint activates the connection and selects it.
276
276
277
277
```cpp
278
278
boolis_disconnected() const;
279
279
```
280
280
281
-
Set to true when this endpoint has been lost and the controlled instance has released the reference to the shared pointer.
281
+
Set to true when the remote endpoint is lost and the `NFCController` instance releases its reference to the shared pointer.
282
282
283
283
```cpp
284
284
nfc_rf_protocols_bitmask_trf_protocols() const;
@@ -292,25 +292,25 @@ List the RF protocols that have been activated to communicate with that endpoint
292
292
virtualvoidon_connected();
293
293
```
294
294
295
-
This is called when a connection to this endpoint has been succesfully established.
295
+
This is called when a connection to this endpoint is succesfully established.
296
296
297
297
```cpp
298
298
virtualvoidon_disconnected();
299
299
```
300
300
301
-
This is called when this endpoint has been lost and the controller instance is about to release the reference to the shared pointer.
301
+
This is called when this endpoint is lost and the controller instance is about to release the reference to the shared pointer.
302
302
303
303
#### NFC NDEF capable
304
304
305
-
This class is inherited by all endpoints that have the capability of handling NDEF data.
305
+
This class is the ancestor class for all endpoints which have the capability of handling NDEF data.
Additionally, the type of NFC tag (1 to 5) being emulated can be recovered. Type 4 can be implemented on top of two technologies; therefore, it is separated into type 4a and type 4b.
364
+
Additionally, the user can recover the type of NFC tag (1 to 5) being emulated. Type 4 is implemented on either one of two technologies; therefore, this enum both includes type 4a and type 4b to identify the underlying technology.
365
+
366
+
*Note: This is initially out of scope for the initial release*
365
367
366
368
```cpp
367
369
boolis_iso7816_supported();
368
370
voidadd_iso7816_application(ISO7816App* app);
369
371
```
370
372
371
-
If supported by the underlying technology (ISO-DEP), a contactless smartcard can be emulated, and ISO7816-4 applications can be registered using this API.
373
+
If the underlying technology supports it (ISO-DEP), the user can emulate a contactless smartcard and register ISO7816-4 applications using this API.
372
374
373
375
**Delegate**
374
376
@@ -391,7 +393,7 @@ void erase_ndef_message();
391
393
void read_ndef_message();
392
394
```
393
395
394
-
Calling these functions triggers the appropriate NDEF parsing/building process if handlers are registered in the `NFCNDEFCapable` instance.
396
+
The user can trigger the appropriate NDEF parsing/building process using these methods if handlers are registered in the `NFCNDEFCapable` instance.
The `NFCEEPROM` class derives from `NFCTarget` and shares the same API. A pointer to a `NFCEEPROMDriver` instance (see below) must be passed in the constructor.
408
+
The `NFCEEPROM` class derives from `NFCTarget` and shares the same API. The user must pass a pointer to a `NFCEEPROMDriver` instance (see below) in the constructor.
407
409
408
410
#### NFC remote target
409
411
@@ -576,15 +578,15 @@ For convenience, serialization functions for common types are provided, as well
576
578
577
579
### NFC EEPROM API
578
580
579
-
The one HAL API that vendors have to implement to implement a`NFCEEPROMDriver`driver are the following virtual methods.
581
+
To create the hardware-specific APIs to add support for a new NFC EEPROM, vendors need to derive from`NFCEEPROMDriver`and implement its virtual methods.
580
582
581
-
From the upper layer's point of view, the EEPROM is a byte array that can be read from or written to. Long operations (reads, writes, erasures) must happen asynchronously. Booleans indicate whether a particular operation was succesful. The upper layer is handled by encoding.
583
+
From the upper layer's point of view, the EEPROM is a byte array that can be read from or written to. Long operations (reads, writes, erasures) must happen asynchronously. Booleans indicate whether a particular operation was succesful.
582
584
583
585
Address 0 means the start of the NDEF buffer (not necessarily at address 0 in the EEPROM).
584
586
585
587
When a buffer is passed to the backend, the reference remains valid until the corresponding event is called.
586
588
587
-
The `set_size()` command is called to change the size of the buffer (within the limits set by `get_max_size()`). Inversely, that buffer size can be read using `get_size()`.
589
+
The `set_size()` command is called to change the size of the NDEF buffer (within the limits set by `get_max_size()`). Inversely, that buffer size can be read using `get_size()`.
588
590
589
591
`start_session()` and `end_session()` are used before a series of memory operations to allow the driver to lock or unlock the RF interface during these operations to avoid having concurrent access to the memory.
0 commit comments