forked from cool4uma/UART_Terminal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuart_terminal_app_i.h
51 lines (41 loc) · 1.3 KB
/
uart_terminal_app_i.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
#pragma once
#include "uart_terminal_app.h"
#include "scenes/uart_terminal_scene.h"
#include "uart_terminal_custom_event.h"
#include "uart_terminal_uart.h"
#include <gui/gui.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <gui/modules/text_box.h>
#include <gui/modules/variable_item_list.h>
#include "uart_text_input.h"
#define NUM_MENU_ITEMS (5)
#define UART_TERMINAL_TEXT_BOX_STORE_SIZE (4096)
#define UART_TERMINAL_TEXT_INPUT_STORE_SIZE (512)
#define UART_CH (FuriHalUartIdUSART1)
struct UART_TerminalApp {
Gui* gui;
ViewDispatcher* view_dispatcher;
SceneManager* scene_manager;
char text_input_store[UART_TERMINAL_TEXT_INPUT_STORE_SIZE + 1];
FuriString* text_box_store;
size_t text_box_store_strlen;
TextBox* text_box;
UART_TextInput* text_input;
VariableItemList* var_item_list;
UART_TerminalUart* uart;
int selected_menu_index;
int selected_option_index[NUM_MENU_ITEMS];
const char* selected_tx_string;
bool is_command;
bool is_custom_tx_string;
bool focus_console_start;
bool show_stopscan_tip;
int BAUDRATE;
int TERMINAL_MODE; //1=AT mode, 0=other mode
};
typedef enum {
UART_TerminalAppViewVarItemList,
UART_TerminalAppViewConsoleOutput,
UART_TerminalAppViewTextInput,
} UART_TerminalAppView;