diff --git a/features/nfc/doc/nfc_design.md b/features/nfc/doc/nfc_design.md index c78079c3ad..66b4e1dc6d 100644 --- a/features/nfc/doc/nfc_design.md +++ b/features/nfc/doc/nfc_design.md @@ -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, diff --git a/features/nfc/doc/uml_diagram_controller.png b/features/nfc/doc/uml_diagram_controller.png index 87d413ced3..890ee306ce 100644 Binary files a/features/nfc/doc/uml_diagram_controller.png and b/features/nfc/doc/uml_diagram_controller.png differ diff --git a/features/nfc/doc/uml_diagram_controller.txt b/features/nfc/doc/uml_diagram_controller.txt index 4c46ac4557..9ae3414773 100644 --- a/features/nfc/doc/uml_diagram_controller.txt +++ b/features/nfc/doc/uml_diagram_controller.txt @@ -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 \ No newline at end of file