unleashed-firmware/lib/nfc/protocols/iso14443_4b/iso14443_4b.h
gornekich d92b0a82cc
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 12:08:09 +09:00

47 lines
1.2 KiB
C

#pragma once
#include <nfc/protocols/iso14443_3b/iso14443_3b.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
Iso14443_4bErrorNone,
Iso14443_4bErrorNotPresent,
Iso14443_4bErrorProtocol,
Iso14443_4bErrorTimeout,
} Iso14443_4bError;
typedef struct Iso14443_4bData Iso14443_4bData;
// Virtual methods
Iso14443_4bData* iso14443_4b_alloc();
void iso14443_4b_free(Iso14443_4bData* data);
void iso14443_4b_reset(Iso14443_4bData* data);
void iso14443_4b_copy(Iso14443_4bData* data, const Iso14443_4bData* other);
bool iso14443_4b_verify(Iso14443_4bData* data, const FuriString* device_type);
bool iso14443_4b_load(Iso14443_4bData* data, FlipperFormat* ff, uint32_t version);
bool iso14443_4b_save(const Iso14443_4bData* data, FlipperFormat* ff);
bool iso14443_4b_is_equal(const Iso14443_4bData* data, const Iso14443_4bData* other);
const char* iso14443_4b_get_device_name(const Iso14443_4bData* data, NfcDeviceNameType name_type);
const uint8_t* iso14443_4b_get_uid(const Iso14443_4bData* data, size_t* uid_len);
bool iso14443_4b_set_uid(Iso14443_4bData* data, const uint8_t* uid, size_t uid_len);
Iso14443_3bData* iso14443_4b_get_base_data(const Iso14443_4bData* data);
#ifdef __cplusplus
}
#endif