FireBirdLib - Topfield TMS PVR TAP Programming Library
VFD_SetHDDValue.c
Go to the documentation of this file.
1
#include <string.h>
2
#include "
FBLib_tmsvfd.h
"
3
4
bool
VFD_SetHDDValue
(
int
Percent)
5
{
6
TRACEENTER
();
7
8
byte
*
grid
= (
byte
*)
FIS_vGrid
();
9
10
if
(!
VFDUsedByTAP
|| !
grid
|| !
HDDEnabled
)
11
{
12
TRACEEXIT
();
13
return
FALSE;
14
}
15
16
VFD_EnableHDD
(TRUE);
17
18
if
(Percent > 11)
grid
[29] |= 0x20;
19
if
(Percent > 22)
grid
[29] |= 0x40;
20
if
(Percent > 33)
grid
[29] |= 0x80;
21
if
(Percent > 44)
grid
[28] |= 0x01;
22
if
(Percent > 55)
grid
[28] |= 0x02;
23
if
(Percent > 66)
grid
[28] |= 0x04;
24
if
(Percent > 77)
grid
[28] |= 0x08;
25
if
(Percent > 88)
grid
[28] |= 0x10;
26
27
TRACEEXIT
();
28
return
TRUE;
29
}
FBLib_tmsvfd.h
grid
byte * grid
Definition:
VFD_GetControl.c:4
HDDEnabled
bool HDDEnabled
Definition:
VFD_EnableHDD.c:4
VFDUsedByTAP
bool VFDUsedByTAP
Definition:
VFD_GetControl.c:3
FIS_vGrid
dword FIS_vGrid(void)
Definition:
FIS_vgrid.c:3
VFD_SetHDDValue
bool VFD_SetHDDValue(int Percent)
Definition:
VFD_SetHDDValue.c:4
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
VFD_EnableHDD
bool VFD_EnableHDD(bool Enable)
Definition:
VFD_EnableHDD.c:6
tmsvfd
VFD_SetHDDValue.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3