-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo_steps.cc
157 lines (121 loc) · 1.67 KB
/
demo_steps.cc
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#include <stdint.h>
#include <stdio.h>
#include "demo_xtil.h"
extern "C" {
/*
* XTIL - GROUP 1
*/
int
step_xtil_function1(
void *bin,
void *bout,
uint8_t btype,
uint16_t bwidth,
uint16_t bheight
) {
xtil_function1(bin, bout, btype, bwidth, bheight);
return 0;
}
int
step_xtil_function2(
void *bin,
void *bout,
uint8_t btype,
uint16_t bwidth,
uint16_t bheight
) {
xtil_function2("Step_F2", 10);
return 0;
}
int
step_xtil_function3(
void *bin,
void *bout,
uint8_t btype
) {
xtil_function1(bin, bout, btype, 800, 600);
return 0;
}
/*
* XTIL - Integer Sequence Functions
*/
int
step_xtil_sequence_generator(
int* bout,
uint8_t count
) {
static int number = 1;
bout[0] = number++;
return 0;
}
int
step_xtil_sequence_adder(
int* bin,
int* bout,
uint8_t
) {
bout[0] = bin[0] + 1;
return 0;
}
int
step_xtil_sequence_consumer(
int* bin
) {
return 0;
}
int
step_xtil_sequence_compator(
int* bin1,
int* bin2
) {
int result;
result = bin1[0] - bin2[0];
fprintf(stderr, "Check result (%d == 0): %s\n",
result, (result != 0) ? "FAILED" : "Success");
return result;
}
/*
* XTIL - GROUP 2
*/
int
step_xtil_function4(
void *bin,
void *bout,
uint8_t btype,
uint16_t bwidth,
uint16_t bheight
) {
xtil_function2("Hello by STEP_XTIL_F4", 4);
return 0;
}
int
step_xtil_function5(
void *bin,
void *bout,
uint8_t btype,
uint16_t bwidth,
uint16_t bheight
) {
xtil_function2("Hello by STEP_XTIL_F5", 5);
return 0;
}
/*
* MACROS
*/
int
step_macro(
char *str,
uint8_t size
) {
xtil_function1(0, 0, 0, 1024, 768);
xtil_function2("STEP MACRO Example", 123);
return 0;
}
int
step_local(
uint8_t a,
uint8_t b
) {
return a+b;
}
}