mirror of https://github.com/ARMmbed/mbed-os.git
NFC: Add a few missing method implementations and run astyle
parent
3f31a95a76
commit
6eb99d65b4
|
@ -117,7 +117,6 @@ private:
|
|||
nfc_err_t ndef_encode(ac_buffer_builder_t *pBufferBldr);
|
||||
nfc_err_t ndef_decode(ac_buffer_t *pBuffer);
|
||||
|
||||
|
||||
Delegate *_delegate;
|
||||
ndef_msg_t _ndef_message;
|
||||
};
|
||||
|
|
|
@ -43,6 +43,9 @@ public:
|
|||
*/
|
||||
NFCRemoteEndpoint(NFCController *controller);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
virtual ~NFCRemoteEndpoint();
|
||||
|
||||
/**
|
||||
|
|
|
@ -75,3 +75,8 @@ nfc_err_t NFCNDEFCapable::ndef_decode(ac_buffer_t *pBuffer)
|
|||
parse_ndef_message(*pBuffer);
|
||||
return NFC_OK;
|
||||
}
|
||||
|
||||
ndef_msg_t *NFCNDEFCapable::ndef_message()
|
||||
{
|
||||
return &_ndef_message;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,11 @@ NFCRemoteEndpoint::NFCRemoteEndpoint(NFCController *controller) : _controller(co
|
|||
|
||||
}
|
||||
|
||||
NFCRemoteEndpoint::~NFCRemoteEndpoint()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
nfc_rf_protocols_bitmask_t NFCRemoteEndpoint::rf_protocols()
|
||||
{
|
||||
nfc_rf_protocols_bitmask_t rf_protocols = {0};
|
||||
|
|
|
@ -40,6 +40,11 @@ Type4RemoteInitiator::Type4RemoteInitiator(NFCController *controller, uint8_t *b
|
|||
nfc_tech_type4_target_init(&_type4, &_iso7816, ndef_message());
|
||||
}
|
||||
|
||||
Type4RemoteInitiator::~Type4RemoteInitiator()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
nfc_err_t Type4RemoteInitiator::connect()
|
||||
{
|
||||
if (_is_connected) {
|
||||
|
@ -121,3 +126,15 @@ bool Type4RemoteInitiator::is_ndef_supported() const
|
|||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void Type4RemoteInitiator::disconnected_callback(bool deselected)
|
||||
{
|
||||
// Call disconnected callback
|
||||
disconnected();
|
||||
}
|
||||
|
||||
void Type4RemoteInitiator::s_disconnected_callback(nfc_tech_iso7816_t *pIso7816, bool deselected, void *pUserData)
|
||||
{
|
||||
Type4RemoteInitiator* self = (Type4RemoteInitiator*) pUserData;
|
||||
self->disconnected_callback(deselected);
|
||||
}
|
Loading…
Reference in New Issue