mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-21 02:03:18 +00:00
363f555ed7
* Implement support for reading Opal card (Sydney, Australia) * stub_parser_verify_read: used UNUSED macro * furi_hal_rtc: expose calendaring as functions * opal: use bit-packed struct to parse, rather than manually shifting about * Update f18 api symbols Co-authored-by: あく <alleteam@gmail.com>
39 lines
1.2 KiB
C
39 lines
1.2 KiB
C
#pragma once
|
|
|
|
#include <furi_hal_nfc.h>
|
|
#include "../nfc_worker.h"
|
|
#include "../nfc_device.h"
|
|
|
|
typedef enum {
|
|
NfcSupportedCardTypePlantain,
|
|
NfcSupportedCardTypeTroika,
|
|
NfcSupportedCardTypePlantain4K,
|
|
NfcSupportedCardTypeTroika4K,
|
|
NfcSupportedCardTypeTwoCities,
|
|
NfcSupportedCardTypeAllInOne,
|
|
NfcSupportedCardTypeOpal,
|
|
|
|
NfcSupportedCardTypeEnd,
|
|
} NfcSupportedCardType;
|
|
|
|
typedef bool (*NfcSupportedCardVerify)(NfcWorker* nfc_worker, FuriHalNfcTxRxContext* tx_rx);
|
|
|
|
typedef bool (*NfcSupportedCardRead)(NfcWorker* nfc_worker, FuriHalNfcTxRxContext* tx_rx);
|
|
|
|
typedef bool (*NfcSupportedCardParse)(NfcDeviceData* dev_data);
|
|
|
|
typedef struct {
|
|
NfcProtocol protocol;
|
|
NfcSupportedCardVerify verify;
|
|
NfcSupportedCardRead read;
|
|
NfcSupportedCardParse parse;
|
|
} NfcSupportedCard;
|
|
|
|
extern NfcSupportedCard nfc_supported_card[NfcSupportedCardTypeEnd];
|
|
|
|
bool nfc_supported_card_verify_and_parse(NfcDeviceData* dev_data);
|
|
|
|
// stub_parser_verify_read does nothing, and always reports that it does not
|
|
// support the card. This is needed for DESFire card parsers which can't
|
|
// provide keys, and only use NfcSupportedCard->parse.
|
|
bool stub_parser_verify_read(NfcWorker* nfc_worker, FuriHalNfcTxRxContext* tx_rx);
|