mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-16 01:28:00 +00:00
fb73d3bd52
* 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
41 lines
No EOL
714 B
C
41 lines
No EOL
714 B
C
#pragma once
|
|
|
|
#include "nfc.h"
|
|
#include "nfc_types.h"
|
|
#include "nfc_views.h"
|
|
#include "nfc_worker.h"
|
|
|
|
#include <furi.h>
|
|
|
|
#include <gui/gui.h>
|
|
#include <gui/view.h>
|
|
#include <gui/view_dispatcher.h>
|
|
#include <assets_icons.h>
|
|
#include <cli/cli.h>
|
|
|
|
#include <menu/menu.h>
|
|
#include <menu/menu_item.h>
|
|
#include <gui/modules/submenu.h>
|
|
|
|
struct Nfc {
|
|
osMessageQueueId_t message_queue;
|
|
|
|
NfcWorker* worker;
|
|
|
|
Gui* gui;
|
|
|
|
Submenu* submenu;
|
|
|
|
View* view_detect;
|
|
View* view_emulate;
|
|
View* view_field;
|
|
View* view_cli;
|
|
View* view_error;
|
|
ViewDispatcher* view_dispatcher;
|
|
};
|
|
|
|
Nfc* nfc_alloc();
|
|
|
|
void nfc_start(Nfc* nfc, NfcView view_id, NfcWorkerState worker_state);
|
|
|
|
int32_t nfc_task(void* p); |