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 07:08:09 +04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "st25tb.h"
|
|
|
|
|
#include <lib/nfc/nfc.h>
|
|
|
|
|
|
|
|
|
|
#include <nfc/nfc_poller.h>
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
typedef struct St25tbPoller St25tbPoller;
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
|
St25tbPollerEventTypeError,
|
|
|
|
|
St25tbPollerEventTypeReady,
|
|
|
|
|
} St25tbPollerEventType;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
St25tbError error;
|
|
|
|
|
} St25tbPollerEventData;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
St25tbPollerEventType type;
|
|
|
|
|
St25tbPollerEventData* data;
|
|
|
|
|
} St25tbPollerEvent;
|
|
|
|
|
|
2023-11-15 12:32:45 +04:00
|
|
|
St25tbError st25tb_poller_send_frame(
|
|
|
|
|
St25tbPoller* instance,
|
|
|
|
|
const BitBuffer* tx_buffer,
|
|
|
|
|
BitBuffer* rx_buffer,
|
|
|
|
|
uint32_t fwt);
|
|
|
|
|
|
|
|
|
|
St25tbError st25tb_poller_initiate(St25tbPoller* instance, uint8_t* chip_id);
|
|
|
|
|
|
|
|
|
|
St25tbError st25tb_poller_activate(St25tbPoller* instance, St25tbData* data);
|
|
|
|
|
|
|
|
|
|
St25tbError st25tb_poller_get_uid(St25tbPoller* instance, uint8_t* uid);
|
|
|
|
|
|
|
|
|
|
St25tbError
|
|
|
|
|
st25tb_poller_read_block(St25tbPoller* instance, uint32_t* block, uint8_t block_number);
|
|
|
|
|
|
|
|
|
|
St25tbError st25tb_poller_halt(St25tbPoller* instance);
|
|
|
|
|
|
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 07:08:09 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|