forked from paxo-phone/PaxOS-8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.hpp
82 lines (64 loc) · 1.4 KB
/
main.hpp
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifdef ESP32
#define BUILD_PAXO 1
#endif
//#define OLD_PAXO
#define NEW_PAXO
#include <iterator>
#ifndef BUILD_PAXO
#define BUILD_EMU 1
#endif
#ifdef BUILD_PAXO
#include "soc/rtc_wdt.h"
#include "esp_heap_caps.h"
#include <esp_task_wdt.h>
#endif
#include <stdlib.h>
#include <stdint.h>
#include <iostream>
#ifdef BUILD_EMU
#include <atomic>
struct Rectangle {
uint16_t x;
uint16_t y;
uint16_t width;
uint16_t height;
};
bool *shouldUS;
Rectangle* *screenUZ;
#endif
#include "interface/interface.hpp"
#include "widgets/gui.hpp"
#include "tasks/tasks.hpp"
#include "extensions/extensions.hpp"
#include "lua/lua.hpp"
#include "app/app.hpp"
#ifdef BUILD_PAXO
#include "esp_task_wdt.h"
void setup() // initialize paxos v8
{
//esp_task_wdt_init(10000, 0);
esp_task_wdt_init(30, true);
// Disable the task watchdog timer
esp_task_wdt_deinit();
#endif
#ifdef BUILD_EMU
void setup(bool *shouldUpdateScreen, Rectangle* *screenUpdateZones) // initialize paxos v8
{
shouldUS = shouldUpdateScreen;
screenUZ = screenUpdateZones;
#endif
Gui::initScreen();
shell::init(); new_thread(CORE_BACK, thread_shell, nullptr);
storage::init();
screen_light.init();
gsm.init();
gsm.saveMessages = Message::saveMessage;
home_button.init();
/*LuaInterpreter lua;
lua.loadScript("test.lua");
lua.runApp();*/
launcher();
}
void loop()
{
}