-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCORE.c
60 lines (49 loc) · 1.25 KB
/
CORE.c
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
#pragma region LICENSE
// GNU GENERAL PUBLIC LICENSE
// Version 3, 29 June 2007
//
// Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
// Everyone is permitted to copy and distribute verbatim copies
// of this license document, but changing it is not allowed.
// ...
// Copyright (C) 2024 Rohan Bharatia
#pragma endregion LICENSE
#pragma once
#ifndef _CORE_c_
#define _CORE_c_
// Source files
#include "CORE/base.c"
#include "CORE/control.c"
#include "CORE/subsystem.c"
#include "CORE/algorithm.c"
#undef EMERGENCY_QUIT
#ifdef DEBUG_ALL
#define BASE_DEBUG_ALL
#define CONTROL_DEBUG_ALL
#define SUBSYSTEM_DEBUG_ALL
#define ALGORITHM_DEBUG_ALL
#elif DEBUG_NONE
#define BASE_DEBUG_NONE
#define CONTROL_DEBUG_NONE
#define SUBSYSTEM_DEBUG_NONE
#define ALGORITHM_DEBUG_NONE
#endif // DEBUG_ALL
void emergencyStop(void)
{
#define EMERGENCY_QUIT
}
// Entry point
int main(int argc, char* argv)
{
startTimeMillis = millis(void);
startTimeMicros = micros(void);
setup(void);
while (1)
{
loop(void);
#ifdef EMERGENCY_QUIT
return 1;
#endif // EMERGENCY_QUIT
}
}
#endif // _CORE_c_