1 | #ifndef GlobalVar
|
2 | #define GlobalVar
|
3 |
|
4 | #define DisplayUpdate dogm_flush()
|
5 |
|
6 | #define Set 0
|
7 | #define Get 1
|
8 |
|
9 | uint8_t Private_CurrentFrame = 0;
|
10 | uint8_t Private_ArrowPosition = 0;
|
11 |
|
12 | //GetSet: 0 = set, 1 = get
|
13 |
|
14 | //If you would like to get a value you can use the following syntax:
|
15 | // _Var_ = CurrentFrame(Get, Get);
|
16 | //If you would like to set a value you can use the following syntax:
|
17 | // _Var_ = CurrentFrame(Set, _Value_);
|
18 | uint8_t CurrentFrame(uint8_t GetSet, uint8_t Val)
|
19 | {
|
20 | if (GetSet = Set)
|
21 | {
|
22 | Private_CurrentFrame = Val;
|
23 | return 0;
|
24 | }
|
25 | else if (GetSet = Get)
|
26 | {
|
27 | return Private_CurrentFrame;
|
28 | }
|
29 | }
|
30 |
|
31 | uint8_t ArrowPosition(uint8_t GetSet, uint8_t Val)
|
32 | {
|
33 | if (GetSet = Set)
|
34 | {
|
35 | Private_ArrowPosition = Val;
|
36 | return 0;
|
37 | }
|
38 | else if (GetSet = Get)
|
39 | {
|
40 | return Private_ArrowPosition;
|
41 | }
|
42 | }
|
43 |
|
44 | #endif
|