mirror of https://github.com/ARMmbed/mbed-os.git
Amend NFCController API
parent
f7ff432535
commit
978bd26fcb
|
@ -92,6 +92,11 @@ For now, the one controller we support is the PN512 which implements the `NFCCon
|
|||
|
||||
It offers the following methods:
|
||||
|
||||
```cpp
|
||||
void set_delegate(Delegate* delegate);
|
||||
```
|
||||
Set the instance's delegate.
|
||||
|
||||
```cpp
|
||||
struct nfc_rf_protocols_bitmask_t
|
||||
{
|
||||
|
@ -122,6 +127,11 @@ These are mapped against NFC Forum-defined protocols.
|
|||
* NFC-DEP is based on ISO/IEC 18092 / FIXME and is the basis for NFC peer-to-peer communication.
|
||||
* T5T is also known as ISO/IEC 15963.
|
||||
|
||||
```cpp
|
||||
nfc_err_t initialize();
|
||||
```
|
||||
Initialize the NFC controller.
|
||||
|
||||
```cpp
|
||||
nfc_err_t configure_rf_protocols(nfc_rf_protocols_bitmask_t rf_protocols);
|
||||
```
|
||||
|
@ -215,16 +225,6 @@ ndef::MessageBuilder* ndef_message_builder();
|
|||
|
||||
This class derives from the base `NFCEndpoint` and `NFCNDEFCapable` classes.
|
||||
|
||||
```cpp
|
||||
bool is_ndef_supported();
|
||||
|
||||
void set_ndef_message(const NDEFMessage& message);
|
||||
void clear_ndef_message();
|
||||
NDEFMessage get_ndef_message();
|
||||
```
|
||||
These methods provide access to the NDEF message that we are exposing to the remote initiator.
|
||||
|
||||
|
||||
```cpp
|
||||
enum nfc_tag_type_t {
|
||||
nfc_tag_type_1,
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 34 KiB |
|
@ -3,6 +3,7 @@ class NFCController {
|
|||
+NFCController(NFCControllerDriver* driver, events::EventQueue* queue)
|
||||
+void set_delegate(NFCController::Delegate* delegate)
|
||||
+nfc_rf_protocols_bitmask_t get_supported_rf_protocols() const
|
||||
+nfc_err_t initialize()
|
||||
+nfc_err_t configure_rf_protocols(nfc_rf_protocols_bitmask_t rf_protocols)
|
||||
+nfc_err_t start_discovery()
|
||||
+nfc_err_t cancel_discovery()
|
||||
|
@ -15,11 +16,18 @@ abstract class NFCController::Delegate {
|
|||
}
|
||||
|
||||
abstract class NFCControllerDriver {
|
||||
+{abstract} void initialize(scheduler_timer_t* pTimer)
|
||||
+{abstract} transceiver_t* get_transceiver()
|
||||
+void set_delegate(Delegate* delegate)
|
||||
+{abstract} transceiver_t* initialize(scheduler_timer_t* pTimer)
|
||||
+{abstract} void get_supported_nfc_techs(nfc_tech_t* initiator, nfc_tech_t* target) const
|
||||
}
|
||||
|
||||
abstract class NFCControllerDriver::Delegate {
|
||||
+{abstract} void on_hw_interrupt()
|
||||
}
|
||||
|
||||
NFCController o-- NFCController::Delegate
|
||||
NFCController o-- NFCControllerDriver
|
||||
NFCControllerDriver o-- NFCControllerDriver::Delegate
|
||||
NFCControllerDriver::Delegate <-- NFCController
|
||||
|
||||
@enduml
|
Loading…
Reference in New Issue