-
Notifications
You must be signed in to change notification settings - Fork 2
/
nfc_relay.h
63 lines (53 loc) · 1.5 KB
/
nfc_relay.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#pragma once
#include <furi.h>
#include <gui/gui.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <notification/notification_messages.h>
#include <gui/modules/submenu.h>
#include <gui/modules/popup.h>
#include <gui/modules/loading.h>
#include <gui/modules/text_input.h>
#include <gui/modules/widget.h>
#include "scenes/nfc_relay_scene.h"
#include "nfc_relay_icons.h"
#include <furi_hal.h>
#include <bit_buffer.h>
#include <lib/nfc/nfc_device.h>
typedef enum {
NfcRelayModeUart,
} NfcRelayMode;
typedef struct NfcRelayConfigUart {
FuriHalSerialId serialId;
uint32_t baudrate;
} NfcRelayConfigUart;
typedef struct NfcRelayConfig {
NfcRelayMode mode;
NfcRelayConfigUart uart_config;
} NfcRelayConfig;
typedef struct AsReaderWorker AsReaderWorker;
typedef struct AsCardWorker AsCardWorker;
typedef struct NfcRelay {
ViewDispatcher* view_dispatcher;
Gui* gui;
NotificationApp* notifications;
SceneManager* scene_manager;
// Common Views
Submenu* submenu;
Popup* popup;
Loading* loading;
TextInput* text_input;
Widget* widget;
NfcRelayConfig* config;
AsReaderWorker* as_reader_worker;
AsCardWorker* as_card_worker;
} NfcRelay;
typedef enum {
NfcRelayViewMenu,
NfcRelayViewPopup,
NfcRelayViewLoading,
NfcRelayViewTextInput,
NfcRelayViewWidget,
} NfcRelayView;
#define TRACE_TRX
void trace_bit_buffer_hexdump(char* tag, char* prompt, BitBuffer* bitbuffer);