18#ifndef MBED_NFC_CONTROLLER_H
19#define MBED_NFC_CONTROLLER_H
22#include "events/EventQueue.h"
23#include "platform/SharedPtr.h"
24#include "drivers/Timer.h"
25#include "drivers/Timeout.h"
27#include "NFCDefinitions.h"
28#include "NFCControllerDriver.h"
30#include "platform/Span.h"
40class NFCRemoteInitiator;
42class NFCControllerDriver;
161 void scheduler_process(
bool hw_interrupt);
167 virtual void on_hw_interrupt();
179 bool _discovery_running;
The abstraction for a NFC controller driver.
This class represents a NFC Controller.
nfc_err_t start_discovery()
Start the discovery process using the protocols configured previously.
nfc_err_t cancel_discovery()
Cancel/stop a running discovery process.
NFCController(NFCControllerDriver *driver, events::EventQueue *queue, const Span< uint8_t > &ndef_buffer)
Construct a NFCController instance.
nfc_rf_protocols_bitmask_t get_supported_rf_protocols() const
Get the list of RF protocols supported by this controller.
nfc_err_t configure_rf_protocols(nfc_rf_protocols_bitmask_t rf_protocols)
Set the list of RF protocols to look for during discovery.
nfc_err_t initialize()
Initialize the NFC controller.
void set_delegate(Delegate *delegate)
Set the delegate that will receive events generated by this controller.
This is the base class for all remote endpoints (initiators and targets) addressable over the air int...
This class is an implementation of the Type 4 tag application.
int nfc_err_t
Type for NFC errors.
Nonowning view to a sequence of contiguous elements.
The NFCController delegate.
virtual void on_nfc_initiator_discovered(const SharedPtr< NFCRemoteInitiator > &nfc_initiator)
A remote initiator was discovered (the local controller is in target mode).
nfc_discovery_terminated_reason_t
A enumeration of causes for the discovery process terminating.
@ nfc_discovery_terminated_canceled
Process was canceled by the user.
@ nfc_discovery_terminated_completed
Process completed, at least one endpoint was discovered.
@ nfc_discovery_terminated_rf_error
An unexpected error was encountered during an exchange on the air interface.
virtual void on_nfc_target_discovered(const SharedPtr< NFCRemoteTarget > &nfc_target)
A remote target was discovered (the local controller is in initiator mode).
virtual void on_discovery_terminated(nfc_discovery_terminated_reason_t reason)
The discovery process terminated.
The NFCControllerDriver delegate.