-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpython_playground.h
executable file
·54 lines (42 loc) · 1.14 KB
/
python_playground.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
#include <stdlib.h>
#include <stdio.h>
#include <m-dict.h>
#include <furi.h>
#include <furi_hal.h>
#include <cli/cli.h>
#include <gui/gui.h>
#include <gui/elements.h>
#include <gui/icon.h>
#include <gui/icon_i.h>
#include <gui/view_dispatcher.h>
#include <gui/view.h>
#include <input/input.h>
#include "protocol.h"
#define LOG_TAG "PyPg"
#define CLI_NAME "python_playground"
#define CONNECTED_VIEW_ID 1
#define DISCONNECTED_VIEW_ID 2
DICT_DEF2(IconDict, uint8_t, M_DEFAULT_OPLIST, Icon*, M_PTR_OPLIST)
typedef struct ConnectedViewModel {
GuiDrawData_t* draw_data;
char* debug_msg;
IconDict_t icons;
} ConnectedViewModel_t;
typedef struct Payload {
uint8_t* data;
uint32_t size;
} Payload_t;
typedef struct PPApp {
// Flipper Firmware Variables
ViewDispatcher* view_dispatcher;
Gui* gui;
FuriMutex** mutex;
Cli* cli;
// App Variables
bool cli_running;
// Views
View* connected_view;
View* disconnected_view;
} PPApp_t;
View* connected_view_alloc(PPApp_t* app);
View* disconnected_view_alloc(PPApp_t* app);