FireBirdLib - Topfield TMS PVR TAP Programming Library
VFD_CDAnimation.c
Go to the documentation of this file.
1
#include <string.h>
2
#include "
FBLib_tmsvfd.h
"
3
4
//Animation: AGBH
5
// CIBH
6
// CIDJ
7
// EKDJ
8
// EKFL
9
// AGFL
10
11
bool
VFD_CDAnimation
(
bool
Forward)
12
{
13
TRACEENTER
();
14
15
static
int
Counter = 0;
16
byte
*
grid
= (
byte
*)
FIS_vGrid
();
17
18
if
(!
VFDUsedByTAP
|| !
grid
|| !
CDEnabledAnimation
)
19
{
20
TRACEEXIT
();
21
return
FALSE;
22
}
23
24
grid
[25] &= 0xfe;
25
grid
[26] = 0x00;
26
grid
[27] &= 0x1f;
27
28
if
(Forward)
29
Counter++;
30
else
31
Counter--;
32
33
if
(Counter > 5) Counter = 0;
34
if
(Counter < 0) Counter = 5;
35
36
switch
(Counter)
37
{
38
case
0:
39
{
40
grid
[25] |= 0x01;
//A
41
grid
[26] |= 0x04;
//G
42
grid
[26] |= 0x80;
//B
43
grid
[26] |= 0x02;
//H
44
break
;
45
}
46
47
case
1:
48
{
49
grid
[26] |= 0x40;
//C
50
grid
[26] |= 0x01;
//I
51
grid
[26] |= 0x80;
//B
52
grid
[26] |= 0x02;
//H
53
break
;
54
}
55
56
case
2:
57
{
58
grid
[26] |= 0x40;
//C
59
grid
[26] |= 0x01;
//I
60
grid
[26] |= 0x20;
//D
61
grid
[27] |= 0x80;
//J
62
break
;
63
}
64
65
case
3:
66
{
67
grid
[26] |= 0x10;
//E
68
grid
[27] |= 0x40;
//K
69
grid
[26] |= 0x20;
//D
70
grid
[27] |= 0x80;
//J
71
break
;
72
}
73
74
case
4:
75
{
76
grid
[26] |= 0x10;
//E
77
grid
[27] |= 0x40;
//K
78
grid
[26] |= 0x08;
//F
79
grid
[27] |= 0x20;
//L
80
break
;
81
}
82
83
case
5:
84
{
85
grid
[25] |= 0x01;
//A
86
grid
[26] |= 0x04;
//G
87
grid
[26] |= 0x08;
//F
88
grid
[27] |= 0x20;
//L
89
break
;
90
}
91
}
92
93
TRACEEXIT
();
94
return
TRUE;
95
}
FBLib_tmsvfd.h
grid
byte * grid
Definition:
VFD_GetControl.c:4
VFDUsedByTAP
bool VFDUsedByTAP
Definition:
VFD_GetControl.c:3
CDEnabledAnimation
bool CDEnabledAnimation
Definition:
VFD_EnableCDAnimation.c:4
FIS_vGrid
dword FIS_vGrid(void)
Definition:
FIS_vgrid.c:3
VFD_CDAnimation
bool VFD_CDAnimation(bool Forward)
Definition:
VFD_CDAnimation.c:11
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
tmsvfd
VFD_CDAnimation.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3