2023-07-06 18:44:45 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <furi.h>
|
|
|
|
#include <gui/gui.h>
|
|
|
|
#include <gui/view.h>
|
|
|
|
#include <gui/modules/validators.h>
|
|
|
|
#include <gui/view_dispatcher.h>
|
|
|
|
#include <gui/scene_manager.h>
|
2023-07-06 19:28:29 +03:00
|
|
|
#include "nfc_maker_icons.h"
|
2023-07-06 18:44:45 +03:00
|
|
|
#include <gui/modules/submenu.h>
|
2023-07-08 19:52:04 +03:00
|
|
|
#include "nfc_maker_text_input.h"
|
2023-07-06 18:44:45 +03:00
|
|
|
#include <gui/modules/byte_input.h>
|
|
|
|
#include <gui/modules/popup.h>
|
|
|
|
#include "scenes/nfc_maker_scene.h"
|
|
|
|
#include <lib/flipper_format/flipper_format.h>
|
|
|
|
#include <lib/toolbox/random_name.h>
|
|
|
|
#include <applications/main/nfc/nfc_i.h>
|
|
|
|
#include <furi_hal_bt.h>
|
2023-07-06 19:28:29 +03:00
|
|
|
#include "strnlen.h"
|
2023-07-06 18:44:45 +03:00
|
|
|
|
|
|
|
#define TEXT_INPUT_LEN 248
|
|
|
|
#define WIFI_INPUT_LEN 90
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
WifiAuthenticationOpen = 0x01,
|
|
|
|
WifiAuthenticationWpa2Personal = 0x20,
|
|
|
|
WifiAuthenticationWpa2Enterprise = 0x10,
|
|
|
|
WifiAuthenticationWpaPersonal = 0x02,
|
|
|
|
WifiAuthenticationWpaEnterprise = 0x08,
|
|
|
|
WifiAuthenticationShared = 0x04,
|
|
|
|
} WifiAuthentication;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
WifiEncryptionAes = 0x08,
|
|
|
|
WifiEncryptionWep = 0x02,
|
|
|
|
WifiEncryptionTkip = 0x04,
|
|
|
|
WifiEncryptionNone = 0x01,
|
|
|
|
} WifiEncryption;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
Gui* gui;
|
|
|
|
SceneManager* scene_manager;
|
|
|
|
ViewDispatcher* view_dispatcher;
|
|
|
|
Submenu* submenu;
|
2023-07-08 19:52:04 +03:00
|
|
|
NFCMaker_TextInput* text_input;
|
2023-07-06 18:44:45 +03:00
|
|
|
ByteInput* byte_input;
|
|
|
|
Popup* popup;
|
|
|
|
|
|
|
|
uint8_t mac_buf[GAP_MAC_ADDR_SIZE];
|
|
|
|
char text_buf[TEXT_INPUT_LEN];
|
|
|
|
char pass_buf[WIFI_INPUT_LEN];
|
|
|
|
char name_buf[TEXT_INPUT_LEN];
|
|
|
|
} NfcMaker;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
NfcMakerViewSubmenu,
|
|
|
|
NfcMakerViewTextInput,
|
|
|
|
NfcMakerViewByteInput,
|
|
|
|
NfcMakerViewPopup,
|
|
|
|
} NfcMakerView;
|