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
4bool HDD_RECSlotSetDuration(byte Slot, word Duration)
5{
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}
dword FIS_vRECSlotAddress(byte Slot)
bool HDD_RECSlotSetDuration(byte Slot, word Duration)
#define TRACEEXIT()
Definition: libFireBird.h:1244
#define TRACEENTER()
Definition: libFireBird.h:1243
dword HDD_NumberOfRECSlots(void)