mirror of https://github.com/ARMmbed/mbed-os.git
Updtate event handling model in NFCEEPROM
parent
588c26c128
commit
a989c15d1f
|
@ -537,7 +537,6 @@ The `set_size()` command is called to change the size of the buffer (within the
|
|||
|
||||
```cpp
|
||||
void reset();
|
||||
void process_events();
|
||||
size_t get_max_size();
|
||||
void start_session();
|
||||
void end_session();
|
||||
|
@ -557,7 +556,12 @@ void on_bytes_written(size_t count);
|
|||
void on_size_read(bool success, size_t size);
|
||||
void on_size_written(bool success);
|
||||
void on_bytes_erased(size_t count);
|
||||
void on_event();
|
||||
```
|
||||
|
||||
The implementation also has access to an event queue in case asynchronous operations need to be run:
|
||||
```cpp
|
||||
Delegate *delegate();
|
||||
events::EventQueue *event_queue();
|
||||
```
|
||||
|
||||
### NCI Driver APIs
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 108 KiB |
|
@ -40,6 +40,7 @@ abstract class NFCTarget::Delegate {
|
|||
}
|
||||
|
||||
class NFCEEPROM {
|
||||
+nfc_err_t initialize()
|
||||
+void set_delegate(NFCEEPROM::Delegate* delegate)
|
||||
}
|
||||
|
||||
|
@ -49,9 +50,9 @@ abstract class NFCEEPROM::Delegate {
|
|||
|
||||
abstract class NFCEEPROMDriver {
|
||||
+void set_delegate(Delegate* delegate)
|
||||
+void set_event_queue(events::EventQueue* queue)
|
||||
|
||||
+{abstract} void reset()
|
||||
+{abstract} void process_events()
|
||||
+{abstract} size_t get_max_size()
|
||||
+{abstract} void start_session()
|
||||
+{abstract} void end_session()
|
||||
|
@ -60,6 +61,8 @@ abstract class NFCEEPROMDriver {
|
|||
+{abstract} void write_size(size_t count)
|
||||
+{abstract} void read_size()
|
||||
+{abstract} void erase_bytes(uint32_t address, size_t size)
|
||||
#Delegate *delegate()
|
||||
#events::EventQueue *event_queue()
|
||||
}
|
||||
|
||||
abstract class NFCEEPROMDriver::Delegate {
|
||||
|
@ -70,7 +73,6 @@ abstract class NFCEEPROMDriver::Delegate {
|
|||
+{abstract} void on_size_read(bool success, size_t size)
|
||||
+{abstract} void on_size_written(bool success)
|
||||
+{abstract} void on_bytes_erased(size_t count)
|
||||
+{abstract} void on_event()
|
||||
}
|
||||
|
||||
NFCNDEFCapable <-- NFCTarget
|
||||
|
|
Loading…
Reference in New Issue