-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
115 lines (93 loc) · 2.32 KB
/
main.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#include "RTE_Components.h"
#include CMSIS_device_header
#include <math.h>
#include <stdlib.h>
#include "func.h"
#if defined USE_SYSTICK__
static volatile uint32_t msTicks;
void SysTick_Handler(void);
void SysTick_Handler(void)
{
msTicks++;
}
static void delay (int32_t dlyTicks)
{
uint32_t curTicks;
curTicks = msTicks;
while ((msTicks - curTicks) < dlyTicks)
{
__NOP();
}
}
#else
static void delay (int32_t dlyTicks)
{
dlyTicks <<= 8;
while (dlyTicks--)
{
__NOP();
}
}
#endif
static float gVarF32_s = 1.32f;
float gVarF32 = 0.32f;
double gVarD64 = 0.64;
int64_t gVarS64 = 64;
int32_t gVarS32 = 32;
uint32_t gVarU32 = 32U;
uint32_t *gVarU32_p = &gVarU32;
uint16_t gVarU16 = 16U;
uint8_t gVarU8 = 8U;
char gText[] = "Hello World.";
enum_t gVarEnum = never;
int main (void)
{
volatile float lVarF32 = gVarF32;
volatile double lVarD64 = gVarD64;
volatile int64_t lVarS64 = gVarS64;
volatile int32_t lVarS32 = gVarS32;
volatile uint32_t lVarU32 = gVarU32;
volatile uint32_t *lVarU32_p = gVarU32_p;
volatile uint16_t lVarU16 = gVarU16;
volatile uint8_t lVarU8 = gVarU8;
volatile size_t lVarST = 0;
volatile char lText[20];
volatile enum_t lVarEnum = gVarEnum;
__DSB();
//SystemCoreClockUpdate();
//SysTick_Config(SystemCoreClock / 1000);
lVarF32 = gVarF32_s * gVarF32;
gVarF32 = lVarF32 / gVarF32_s;
gVarS32 = INT32_MAX;
lVarU32 = sfiUSAT(gVarS32, 8U);
lVarU32_p = &lVarU32;
*gVarU32_p = *lVarU32_p;
lVarS64 = lVarS32 = gVarS32;
lVarS64 = lVarS64 * lVarS32;
lVarD64 = sqrt((double)lVarS64);
lVarU8 = sizeof(lVarS64);
lVarST = sizeof(gText);
lText[lVarST - 1] = 0;
for (lVarS32 = 0; lVarS32 < (int32_t)(lVarST - 1); lVarS32++) {
lText[lVarS32] = gText[lVarS32];
gText[lVarS32] = lText[lVarS32] + 1;
}
for (lVarEnum = yes; lVarEnum <= no; lVarEnum++)
{
gVarEnum = lVarEnum;
}
gVarU32 = lVarU16 + lVarU8 - gVarU8;
gVarS32 = sfiMax(lVarS32, (gVarS32 - 4095));
lVarU32 = 1000U;
gVarU32 = sfiAdd(lVarU32, 10U);
lVarS32 = 1000;
gVarS32 = eFnc_add(lVarS32, 10);
eFnc_1();
gVarU32 = eFnc_2(gVarU32);
gVarS32 = eFnc_3(gVarS32, gVarU32);
while (1)
{
__NOP();
delay(20);
}
}