mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-10 19:23:31 -07:00
CLI: Fix temporary nfc apdu command
iso15693-3 poller is not exposed to api so wont work with cli also this command is temporary and will be replaced with full nfc cli so it doesnt matter much also apdus arent found on iso15693-3 that often
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
- Fix crash when opening CLI/qFlipper/WebUpdater if some unexpected files are present in `/ext/apps_data/cli/plugins` (by @WillyJL)
|
||||
- FIx crash with `ir universal` command (by @WillyJL)
|
||||
- Fix crash with `date` command (by @WillyJL)
|
||||
- Fix temporary `nfc apdu` command (by @WillyJL)
|
||||
- OFW: Fix subghz chat command (by @GameLord2011)
|
||||
- BadKB: Fix key combos main keys being case sensitive (by @WillyJL)
|
||||
- Sub-GHz:
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#include <lib/nfc/nfc_poller.h>
|
||||
#include <lib/nfc/protocols/iso14443_4a/iso14443_4a_poller.h>
|
||||
#include <lib/nfc/protocols/iso14443_4b/iso14443_4b_poller.h>
|
||||
#include <lib/nfc/protocols/iso15693_3/iso15693_3_poller.h>
|
||||
#include <toolbox/pipe.h>
|
||||
|
||||
#include <furi_hal_nfc.h>
|
||||
@@ -15,13 +14,12 @@
|
||||
#define FLAG_EVENT (1 << 10)
|
||||
|
||||
#define NFC_MAX_BUFFER_SIZE (256)
|
||||
#define NFC_BASE_PROTOCOL_MAX (3)
|
||||
#define NFC_BASE_PROTOCOL_MAX (2)
|
||||
#define POLLER_DONE (1 << 0)
|
||||
#define POLLER_ERR (1 << 1)
|
||||
static NfcProtocol BASE_PROTOCOL[NFC_BASE_PROTOCOL_MAX] = {
|
||||
NfcProtocolIso14443_4a,
|
||||
NfcProtocolIso14443_4b,
|
||||
NfcProtocolIso15693_3};
|
||||
NfcProtocolIso14443_4b};
|
||||
typedef struct ApduContext {
|
||||
BitBuffer* tx_buffer;
|
||||
BitBuffer* rx_buffer;
|
||||
@@ -88,19 +86,6 @@ static NfcCommand trx_callback(NfcGenericEvent event, void* context) {
|
||||
furi_thread_flags_set(apdu_context->thread_id, POLLER_ERR);
|
||||
return NfcCommandStop;
|
||||
}
|
||||
} else if(NfcProtocolIso15693_3 == event.protocol) {
|
||||
Iso15693_3Error err = iso15693_3_poller_send_frame(
|
||||
event.instance,
|
||||
apdu_context->tx_buffer,
|
||||
apdu_context->rx_buffer,
|
||||
ISO15693_3_FDT_POLL_FC);
|
||||
if(Iso15693_3ErrorNone == err) {
|
||||
furi_thread_flags_set(apdu_context->thread_id, POLLER_DONE);
|
||||
return NfcCommandContinue;
|
||||
} else {
|
||||
furi_thread_flags_set(apdu_context->thread_id, POLLER_ERR);
|
||||
return NfcCommandStop;
|
||||
}
|
||||
} else {
|
||||
// should never reach here
|
||||
furi_crash("Unknown protocol");
|
||||
|
||||
Reference in New Issue
Block a user