NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @file nfc_device.h
|
|
|
|
* @brief Abstract interface for managing NFC device data.
|
|
|
|
*
|
|
|
|
* Under the hood, it makes use of the protocol-specific functions that each one of them provides
|
|
|
|
* and abstracts it with a protocol-independent API.
|
|
|
|
*
|
|
|
|
* It does not perform any signal processing, but merely serves as a container with some handy
|
|
|
|
* operations such as loading and saving from and to a file.
|
|
|
|
*/
|
2021-07-02 16:44:10 +03:00
|
|
|
#pragma once
|
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
#include <stddef.h>
|
2021-07-02 16:44:10 +03:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
#include "protocols/nfc_device_base.h"
|
|
|
|
#include "protocols/nfc_protocol.h"
|
2021-07-22 09:05:07 +03:00
|
|
|
|
2022-11-04 10:01:44 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief NfcDevice opaque type definition.
|
|
|
|
*/
|
|
|
|
typedef struct NfcDevice NfcDevice;
|
2022-01-29 12:39:10 +03:00
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Loading callback function signature.
|
|
|
|
*
|
|
|
|
* A function with such signature can be set as a callback to indicate
|
|
|
|
* the completion (or a failure) of nfc_device_load() and nfc_device_save() functions.
|
|
|
|
*
|
|
|
|
* This facility is commonly used to control GUI elements, such as progress dialogs.
|
|
|
|
*
|
|
|
|
* @param[in] context user-defined context that was passed in nfc_device_set_loading_callback().
|
|
|
|
* @param[in] state true if the data was loaded successfully, false otherwise.
|
|
|
|
*/
|
[FL-1962, FL-2464, FL-2465, FL-2466, FL-2560, FL-2637, FL-2595] Ibutton, Infrared, LfRFID GUI fixes (#1392)
* Ibutton, Infrared, LfRFID GUI fixes
* Loading screens update
Co-authored-by: あく <alleteam@gmail.com>
2022-07-17 10:41:16 +03:00
|
|
|
typedef void (*NfcLoadingCallback)(void* context, bool state);
|
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Allocate an NfcDevice instance.
|
|
|
|
*
|
|
|
|
* A newly created instance does not hold any data and thus is considered invalid. The most common
|
|
|
|
* use case would be to set its data by calling nfc_device_set_data() right afterwards.
|
|
|
|
*
|
|
|
|
* @returns pointer to the allocated instance.
|
|
|
|
*/
|
2024-03-25 13:53:32 +03:00
|
|
|
NfcDevice* nfc_device_alloc(void);
|
2021-11-09 00:55:06 +03:00
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Delete an NfcDevice instance.
|
|
|
|
*
|
|
|
|
* @param[in,out] instance pointer to the instance to be deleted.
|
|
|
|
*/
|
|
|
|
void nfc_device_free(NfcDevice* instance);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Clear an NfcDevice instance.
|
|
|
|
*
|
|
|
|
* All data contained in the instance will be deleted and the instance itself will become invalid
|
|
|
|
* as if it was just allocated.
|
|
|
|
*
|
|
|
|
* @param[in,out] instance pointer to the instance to be cleared.
|
|
|
|
*/
|
|
|
|
void nfc_device_clear(NfcDevice* instance);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Reset an NfcDevice instance.
|
|
|
|
*
|
|
|
|
* The data contained in the instance will be reset according to the protocol-defined procedure.
|
|
|
|
* Unlike the nfc_device_clear() function, the instance will remain valid.
|
|
|
|
*
|
|
|
|
* @param[in,out] instance pointer to the instance to be reset.
|
|
|
|
*/
|
|
|
|
void nfc_device_reset(NfcDevice* instance);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Get the protocol identifier from an NfcDevice instance.
|
|
|
|
*
|
|
|
|
* If the instance is invalid, the return value will be NfcProtocolInvalid.
|
|
|
|
*
|
|
|
|
* @param[in] instance pointer to the instance to be queried.
|
|
|
|
* @returns protocol identifier contained in the instance.
|
|
|
|
*/
|
|
|
|
NfcProtocol nfc_device_get_protocol(const NfcDevice* instance);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Get the protocol-specific data from an NfcDevice instance.
|
|
|
|
*
|
|
|
|
* The protocol parameter's behaviour is a bit tricky. The function will check
|
|
|
|
* whether there is such a protocol somewhere in the protocol hierarchy and return
|
|
|
|
* the data exactly from that level.
|
|
|
|
*
|
|
|
|
* Example: Call nfc_device_get_data() on an instance with Mf DESFire protocol.
|
|
|
|
* The protocol hierarchy will look like the following:
|
|
|
|
*
|
|
|
|
* `Mf DESFire --> ISO14443-4A --> ISO14443-3A`
|
|
|
|
*
|
|
|
|
* Thus, the following values of the protocol parameter are valid:
|
|
|
|
*
|
|
|
|
* * NfcProtocolIso14443_3a
|
|
|
|
* * NfcProtocolIso14443_4a
|
|
|
|
* * NfcProtocolMfDesfire
|
|
|
|
*
|
|
|
|
* and passing them to the call would result in the respective data being returned.
|
|
|
|
*
|
|
|
|
* However, supplying a protocol identifier which is not in the hierarchy will
|
|
|
|
* result in a crash. This is to improve type safety.
|
|
|
|
*
|
|
|
|
* @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 data.
|
|
|
|
*/
|
|
|
|
const NfcDeviceData* nfc_device_get_data(const NfcDevice* instance, NfcProtocol protocol);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Get the protocol name by its identifier.
|
|
|
|
*
|
|
|
|
* This function does not require an instance as its return result depends only
|
|
|
|
* the protocol identifier.
|
|
|
|
*
|
|
|
|
* @param[in] protocol numeric identifier of the protocol in question.
|
|
|
|
* @returns pointer to a statically allocated string containing the protocol name.
|
|
|
|
*/
|
|
|
|
const char* nfc_device_get_protocol_name(NfcProtocol protocol);
|
2021-11-09 00:55:06 +03:00
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Get the name of an NfcDevice instance.
|
|
|
|
*
|
|
|
|
* The return value may change depending on the instance's internal state and the name_type parameter.
|
|
|
|
*
|
|
|
|
* @param[in] instance pointer to the instance to be queried.
|
|
|
|
* @param[in] name_type type of the name to be displayed.
|
|
|
|
* @returns pointer to a statically allocated string containing the device name.
|
|
|
|
*/
|
|
|
|
const char* nfc_device_get_name(const NfcDevice* instance, NfcDeviceNameType name_type);
|
2021-07-02 16:44:10 +03:00
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Get the unique identifier (UID) of an NfcDevice instance.
|
|
|
|
*
|
|
|
|
* The UID length is protocol-dependent. Additionally, a particular protocol might support
|
|
|
|
* several UID lengths.
|
|
|
|
*
|
|
|
|
* @param[in] instance pointer to the instance to be queried.
|
|
|
|
* @param[out] uid_len pointer to the variable to contain the UID length.
|
|
|
|
* @returns pointer to the byte array containing the instance's UID.
|
|
|
|
*/
|
|
|
|
const uint8_t* nfc_device_get_uid(const NfcDevice* instance, size_t* uid_len);
|
2021-07-02 16:44:10 +03:00
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Set the unique identifier (UID) of an NfcDevice instance.
|
|
|
|
*
|
|
|
|
* The UID length must be supported by the instance's protocol.
|
|
|
|
*
|
|
|
|
* @param[in,out] instance pointer to the instance to be modified.
|
|
|
|
* @param[in] uid pointer to the byte array containing the new UID.
|
|
|
|
* @param[in] uid_len length of the UID.
|
|
|
|
* @return true if the UID was valid and set, false otherwise.
|
|
|
|
*/
|
|
|
|
bool nfc_device_set_uid(NfcDevice* instance, const uint8_t* uid, size_t uid_len);
|
2021-08-17 00:45:04 +03:00
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Set the data and protocol of an NfcDevice instance.
|
|
|
|
*
|
|
|
|
* Any data previously contained in the instance will be deleted.
|
|
|
|
*
|
|
|
|
* @param[in,out] instance pointer to the instance to be modified.
|
|
|
|
* @param[in] protocol numeric identifier of the data's protocol.
|
|
|
|
* @param[in] protocol_data pointer to the protocol-specific data.
|
|
|
|
*/
|
|
|
|
void nfc_device_set_data(
|
|
|
|
NfcDevice* instance,
|
|
|
|
NfcProtocol protocol,
|
|
|
|
const NfcDeviceData* protocol_data);
|
2021-07-02 16:44:10 +03:00
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Copy (export) the data contained in an NfcDevice instance to an outside NfcDeviceData instance.
|
|
|
|
*
|
|
|
|
* This function does the inverse of nfc_device_set_data().
|
2022-07-26 18:30:49 +03:00
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
* The protocol identifier passed as the protocol parameter MUST match the one
|
|
|
|
* stored in the instance, otherwise a crash will occur.
|
|
|
|
* This is to improve type safety.
|
|
|
|
*
|
|
|
|
* @param[in] instance pointer to the instance to be copied from.
|
|
|
|
* @param[in] protocol numeric identifier of the instance's protocol.
|
|
|
|
* @param[out] protocol_data pointer to the destination data.
|
|
|
|
*/
|
|
|
|
void nfc_device_copy_data(
|
|
|
|
const NfcDevice* instance,
|
|
|
|
NfcProtocol protocol,
|
|
|
|
NfcDeviceData* protocol_data);
|
2021-07-22 09:05:07 +03:00
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Check whether an NfcDevice instance holds certain data.
|
|
|
|
*
|
|
|
|
* This function's behaviour is similar to nfc_device_is_equal(), with the difference
|
|
|
|
* that it takes NfcProtocol and NfcDeviceData* instead of the second NfcDevice*.
|
|
|
|
*
|
|
|
|
* The following code snippets [1] and [2] are equivalent:
|
|
|
|
*
|
|
|
|
* [1]
|
|
|
|
* ```c
|
|
|
|
* bool is_equal = nfc_device_is_equal(device1, device2);
|
|
|
|
* ```
|
|
|
|
* [2]
|
|
|
|
* ```c
|
|
|
|
* NfcProtocol protocol = nfc_device_get_protocol(device2);
|
|
|
|
* const NfcDeviceData* data = nfc_device_get_data(device2, protocol);
|
|
|
|
* bool is_equal = nfc_device_is_equal_data(device1, protocol, data);
|
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* @param[in] instance pointer to the instance to be compared.
|
|
|
|
* @param[in] protocol protocol identifier of the data to be compared.
|
|
|
|
* @param[in] protocol_data pointer to the NFC device data to be compared.
|
|
|
|
* @returns true if the instance is of the right type and the data matches, false otherwise.
|
|
|
|
*/
|
|
|
|
bool nfc_device_is_equal_data(
|
|
|
|
const NfcDevice* instance,
|
|
|
|
NfcProtocol protocol,
|
|
|
|
const NfcDeviceData* protocol_data);
|
2022-03-23 16:45:37 +03:00
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Compare two NfcDevice instances to determine whether they are equal.
|
|
|
|
*
|
|
|
|
* @param[in] instance pointer to the first instance to be compared.
|
|
|
|
* @param[in] other pointer to the second instance to be compared.
|
|
|
|
* @returns true if both instances are considered equal, false otherwise.
|
|
|
|
*/
|
|
|
|
bool nfc_device_is_equal(const NfcDevice* instance, const NfcDevice* other);
|
2021-07-22 09:05:07 +03:00
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Set the loading callback function.
|
|
|
|
*
|
|
|
|
* @param[in,out] instance pointer to the instance to be modified.
|
|
|
|
* @param[in] callback pointer to a function to be called when the load operation completes.
|
|
|
|
* @param[in] context pointer to a user-specific context (will be passed to the callback).
|
|
|
|
*/
|
|
|
|
void nfc_device_set_loading_callback(
|
|
|
|
NfcDevice* instance,
|
|
|
|
NfcLoadingCallback callback,
|
|
|
|
void* context);
|
2021-08-17 00:45:04 +03:00
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Save NFC device data form an NfcDevice instance to a file.
|
|
|
|
*
|
|
|
|
* @param[in] instance pointer to the instance to be saved.
|
|
|
|
* @param[in] path pointer to a character string with a full file path.
|
|
|
|
* @returns true if the data was successfully saved, false otherwise.
|
|
|
|
*/
|
|
|
|
bool nfc_device_save(NfcDevice* instance, const char* path);
|
[FL-1962, FL-2464, FL-2465, FL-2466, FL-2560, FL-2637, FL-2595] Ibutton, Infrared, LfRFID GUI fixes (#1392)
* Ibutton, Infrared, LfRFID GUI fixes
* Loading screens update
Co-authored-by: あく <alleteam@gmail.com>
2022-07-17 10:41:16 +03:00
|
|
|
|
NFC refactoring (#3050)
"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.
2023-10-24 06:08:09 +03:00
|
|
|
/**
|
|
|
|
* @brief Load NFC device data to an NfcDevice instance from a file.
|
|
|
|
*
|
|
|
|
* @param[in,out] instance pointer to the instance to be loaded into.
|
|
|
|
* @param[in] path pointer to a character string with a full file path.
|
|
|
|
* @returns true if the data was successfully loaded, false otherwise.
|
|
|
|
*/
|
|
|
|
bool nfc_device_load(NfcDevice* instance, const char* path);
|
2022-11-04 10:01:44 +03:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|