FireBirdLib - Topfield TMS PVR TAP Programming Library
HDD_RECSlotSetDuration.c
Go to the documentation of this file.
1
#include "
FBLib_rec.h
"
2
#include "
flash/FBLib_flash.h
"
3
4
bool
HDD_RECSlotSetDuration
(
byte
Slot, word Duration)
5
{
6
TRACEENTER
();
7
8
//Because only the TP struct differes, we may use one timer struct for all systems
9
TYPE_Timer_TMSS *RECSlot;
10
11
//Sanity check of the parameters
12
if
(Slot >
HDD_NumberOfRECSlots
())
13
{
14
TRACEEXIT
();
15
return
FALSE;
16
}
17
18
RECSlot = (TYPE_Timer_TMSS*)
FIS_vRECSlotAddress
(Slot);
19
if
(RECSlot == NULL)
20
{
21
TRACEEXIT
();
22
return
FALSE;
23
}
24
25
//Check if the selected REC-slot is currently in use
26
if
(RECSlot->TimerInfo.Duration == 0)
27
{
28
TRACEEXIT
();
29
return
FALSE;
30
}
31
32
RECSlot->TimerInfo.Duration = Duration;
33
34
TRACEEXIT
();
35
return
TRUE;
36
}
FBLib_flash.h
FBLib_rec.h
FIS_vRECSlotAddress
dword FIS_vRECSlotAddress(byte Slot)
Definition:
FIS_vRECSlotAddress.c:3
HDD_RECSlotSetDuration
bool HDD_RECSlotSetDuration(byte Slot, word Duration)
Definition:
HDD_RECSlotSetDuration.c:4
TRACEEXIT
#define TRACEEXIT()
Definition:
libFireBird.h:1244
TRACEENTER
#define TRACEENTER()
Definition:
libFireBird.h:1243
HDD_NumberOfRECSlots
dword HDD_NumberOfRECSlots(void)
Definition:
HDD_NumberOfRECSlots.c:3
rec
HDD_RECSlotSetDuration.c
Generated on Fri Apr 29 2022 13:34:01 for FireBirdLib - Topfield TMS PVR TAP Programming Library by
1.9.3