mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-25 06:13:14 +03:00
d92b0a82cc
"A long time ago in a galaxy far, far away...." we started NFC subsystem refactoring. Starring: - @gornekich - NFC refactoring project lead, architect, senior developer - @gsurkov - architect, senior developer - @RebornedBrain - senior developer Supporting roles: - @skotopes, @DrZlo13, @hedger - general architecture advisors, code review - @Astrrra, @doomwastaken, @Hellitron, @ImagineVagon333 - quality assurance Special thanks: @bettse, @pcunning, @nxv, @noproto, @AloneLiberty and everyone else who has been helping us all this time and contributing valuable knowledges, ideas and source code.
47 lines
1.3 KiB
C
47 lines
1.3 KiB
C
/**
|
|
* @file nfc_device_i.h
|
|
* @brief NfcDevice private types and definitions.
|
|
*
|
|
* This file is an implementation detail. It must not be included in
|
|
* any public API-related headers.
|
|
*/
|
|
#pragma once
|
|
|
|
#include "nfc_device.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @brief NfcDevice structure definition.
|
|
*/
|
|
struct NfcDevice {
|
|
NfcProtocol protocol; /**< Numeric identifier of the data's protocol*/
|
|
NfcDeviceData* protocol_data; /**< Pointer to the NFC device data. */
|
|
|
|
NfcLoadingCallback
|
|
loading_callback; /**< Pointer to the function to be called upon loading completion. */
|
|
void* loading_callback_context; /**< Pointer to the context to be passed to the loading callback. */
|
|
};
|
|
|
|
/**
|
|
* @brief Get the mutable (non-const) data from an NfcDevice instance.
|
|
*
|
|
* The behaviour is the same as with nfc_device_get_data(), but the
|
|
* return pointer is non-const, allowing for changing data it is pointing to.
|
|
*
|
|
* @see nfc_device.h
|
|
*
|
|
* Under the hood, nfc_device_get_data() calls this and then adds const-ness to the return value.
|
|
*
|
|
* @param instance pointer to the instance to be queried
|
|
* @param protocol protocol identifier of the data to be retrieved.
|
|
* @returns pointer to the instance's (mutable) data.
|
|
*/
|
|
NfcDeviceData* nfc_device_get_data_ptr(const NfcDevice* instance, NfcProtocol protocol);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|