GlobalVar.c


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