flipperzero-firmware/applications/nfc/nfc_worker_i.h
gornekich fb73d3bd52
[FL-1214] NFC application (#448)
* platform: include only used api-hal files
* api-hal-nfc: introduce nfc hal
* nfc_worker: rework nfc worker
* nfc: move nfc from services to applications, add startup hook
* api-hal-nfc: init nfc worker in api_hal_detect
* nfc: rework nfc application
* nfc: fix app exit
* api-hal-nfc: init nfc worker only once
2021-05-06 22:51:20 +03:00

37 lines
741 B
C

#pragma once
#include "nfc_types.h"
#include "nfc_worker.h"
#include <furi.h>
#include <stdbool.h>
#include <rfal_analogConfig.h>
#include <rfal_rf.h>
#include <rfal_nfc.h>
#include <rfal_nfca.h>
#include <rfal_nfcb.h>
#include <rfal_nfcf.h>
#include <rfal_nfcv.h>
#include <st25r3916.h>
#include <st25r3916_irq.h>
struct NfcWorker {
osMessageQueueId_t message_queue;
osThreadAttr_t thread_attr;
osThreadId_t thread;
NfcWorkerState state;
ReturnCode error;
};
void nfc_worker_change_state(NfcWorker* nfc_worker, NfcWorkerState state);
void nfc_worker_task(void* context);
void nfc_worker_poll(NfcWorker* nfc_worker);
void nfc_worker_emulate(NfcWorker* nfc_worker);
void nfc_worker_field(NfcWorker* nfc_worker);