FireBirdLib - Topfield TMS PVR TAP Programming Library
FrontPanelEEPROMWrite.c
Go to the documentation of this file.
1
#include <unistd.h>
2
#include "
FBLib_main.h
"
3
4
bool
FrontPanelEEPROMWrite
(word Address,
byte
Data)
5
{
6
TRACEENTER
();
7
8
byte
Buffer[8];
9
10
if
(!
FP_Initialize
() || !
HookFrontTxPacket
())
11
{
12
TRACEEXIT
();
13
return
FALSE;
14
}
15
16
//Query: D3 EAH EAL DTA
17
Buffer[0] = 0xD3;
18
Buffer[1] = Address >> 8;
19
Buffer[2] = Address & 0xff;
20
Buffer[3] = Data;
21
22
Front_TxPacket_hooked
(Buffer);
23
UnhookFrontTxPacket
();
24
25
//Cache the two options so that the FrontPanelEEPROMRead() doesn't need to communicate with the front panel
26
if
(Address == 0x01ff)
FPPatchAntiFreezeOption
= Data;
27
if
(Address == 0x01fe)
FPPatchPowerRestoreOption
= Data;
28
29
TRACEEXIT
();
30
return
TRUE;
31
}
FBLib_main.h
FP_Initialize
bool FP_Initialize(void)
Definition:
FrontPanelComm.c:121
FPPatchPowerRestoreOption
byte FPPatchPowerRestoreOption
Definition:
FrontPanelComm.c:7
HookFrontTxPacket
bool HookFrontTxPacket(void)
Definition:
FrontPanelComm.c:92
UnhookFrontTxPacket
void UnhookFrontTxPacket(void)
Definition:
FrontPanelComm.c:73
FPPatchAntiFreezeOption
byte FPPatchAntiFreezeOption
Definition:
FrontPanelComm.c:6
Front_TxPacket_hooked
void Front_TxPacket_hooked(byte *Data)
Definition:
FrontPanelComm.c:18
FrontPanelEEPROMWrite
bool FrontPanelEEPROMWrite(word Address, byte Data)
Definition:
FrontPanelEEPROMWrite.c:4
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
main
FrontPanelEEPROMWrite.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3