unleashed-firmware/lib/nfc/protocols/iso14443_3b/iso14443_3b_poller_i.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

50 lines
1.2 KiB
C

#pragma once
#include "iso14443_3b_poller.h"
#include "iso14443_3b_i.h"
#ifdef __cplusplus
extern "C" {
#endif
#define ISO14443_3B_POLLER_MAX_BUFFER_SIZE (256U)
typedef enum {
Iso14443_3bPollerStateIdle,
Iso14443_3bPollerStateColResInProgress,
Iso14443_3bPollerStateColResFailed,
Iso14443_3bPollerStateActivationInProgress,
Iso14443_3bPollerStateActivationFailed,
Iso14443_3bPollerStateActivated,
} Iso14443_3bPollerState;
struct Iso14443_3bPoller {
Nfc* nfc;
Iso14443_3bPollerState state;
Iso14443_3bData* data;
BitBuffer* tx_buffer;
BitBuffer* rx_buffer;
NfcGenericEvent general_event;
Iso14443_3bPollerEvent iso14443_3b_event;
Iso14443_3bPollerEventData iso14443_3b_event_data;
NfcGenericCallback callback;
void* context;
};
const Iso14443_3bData* iso14443_3b_poller_get_data(Iso14443_3bPoller* instance);
Iso14443_3bError
iso14443_3b_poller_async_activate(Iso14443_3bPoller* instance, Iso14443_3bData* data);
Iso14443_3bError iso14443_3b_poller_halt(Iso14443_3bPoller* instance);
Iso14443_3bError iso14443_3b_poller_send_frame(
Iso14443_3bPoller* instance,
const BitBuffer* tx_buffer,
BitBuffer* rx_buffer);
#ifdef __cplusplus
}
#endif