mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-20 11:51:48 +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.
63 lines
1.6 KiB
C
63 lines
1.6 KiB
C
#pragma once
|
|
|
|
#include <nfc/protocols/iso14443_3a/iso14443_3a_poller_i.h>
|
|
#include <nfc/helpers/iso14443_4_layer.h>
|
|
|
|
#include "iso14443_4a_poller.h"
|
|
#include "iso14443_4a_i.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define ISO14443_4A_POLLER_ATS_FWT_FC (40000)
|
|
|
|
typedef enum {
|
|
Iso14443_4aPollerStateIdle,
|
|
Iso14443_4aPollerStateReadAts,
|
|
Iso14443_4aPollerStateError,
|
|
Iso14443_4aPollerStateReady,
|
|
|
|
Iso14443_4aPollerStateNum,
|
|
} Iso14443_4aPollerState;
|
|
|
|
typedef enum {
|
|
Iso14443_4aPollerSessionStateIdle,
|
|
Iso14443_4aPollerSessionStateActive,
|
|
Iso14443_4aPollerSessionStateStopRequest,
|
|
} Iso14443_4aPollerSessionState;
|
|
|
|
struct Iso14443_4aPoller {
|
|
Iso14443_3aPoller* iso14443_3a_poller;
|
|
Iso14443_4aPollerState poller_state;
|
|
Iso14443_4aPollerSessionState session_state;
|
|
Iso14443_4aError error;
|
|
Iso14443_4aData* data;
|
|
Iso14443_4Layer* iso14443_4_layer;
|
|
BitBuffer* tx_buffer;
|
|
BitBuffer* rx_buffer;
|
|
Iso14443_4aPollerEventData iso14443_4a_event_data;
|
|
Iso14443_4aPollerEvent iso14443_4a_event;
|
|
NfcGenericEvent general_event;
|
|
NfcGenericCallback callback;
|
|
void* context;
|
|
};
|
|
|
|
Iso14443_4aError iso14443_4a_process_error(Iso14443_3aError error);
|
|
|
|
const Iso14443_4aData* iso14443_4a_poller_get_data(Iso14443_4aPoller* instance);
|
|
|
|
Iso14443_4aError iso14443_4a_poller_halt(Iso14443_4aPoller* instance);
|
|
|
|
Iso14443_4aError
|
|
iso14443_4a_poller_async_read_ats(Iso14443_4aPoller* instance, Iso14443_4aAtsData* data);
|
|
|
|
Iso14443_4aError iso14443_4a_poller_send_block(
|
|
Iso14443_4aPoller* instance,
|
|
const BitBuffer* tx_buffer,
|
|
BitBuffer* rx_buffer);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|