DVBCore  17.9.0
Open Source DVB Engine
 All Data Structures Files Functions Typedefs Macros Pages
stbhwini.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
24 // pre-processor mechanism so multiple inclusions don't cause compilation error
25 
26 #ifndef _STBHWINI_H
27 
28 #define _STBHWINI_H
29 
30 //---Constant and macro definitions for public use-----------------------------
31 
32 
33 //---Enumerations for public use-----------------------------------------------
34 
35 typedef enum e_hw_subt_control
36 {
37  HW_SUBT_NONE = 0, // no effects of subtitle selection on hardware layer
38  HW_SUBT_EBU = 1, // enables teletext subtitles facilities
39  HW_SUBT_DVB = 2 // enables DVB subtitle facilities
40 } E_HW_SUBT_CONTROL_MASK;
41 
42 typedef enum
43 {
44  HW_STANDBY_ON, /* System is fully on */
45  HW_STANDBY_ACTIVE, /* System is in standby but only the outputs are turned off */
46  HW_STANDBY_PASSIVE, /* Low power standby state with DVBCore still active but not doing anything */
47  HW_STANDBY_LOWPOWER /* Lowest power standby state; DVBCore does not expect to be active */
48 } E_HW_STANDBY_STATE;
49 
50 typedef enum
51 {
52  HW_WAKEUP_UNKNOWN = 0, /* Cause of the system waking up isn't known, so could be power cycle */
53  HW_WAKEUP_TIMER, /* The system was woken up by the wake up timer */
54  HW_WAKEUP_USER /* The system was woken up by user interaction (e.g. front panel or RCU) */
55 } E_HW_WAKEUP_TYPE;
56 
57 //---Global type defs for public use-------------------------------------------
58 
59 //---Global Function prototypes for public use---------------------------------
65 void STB_HWInitialise(E_HW_SUBT_CONTROL_MASK hw_subt);
66 
73 BOOLEAN STB_HWSetStandbyState(E_HW_STANDBY_STATE state);
74 
81 E_HW_STANDBY_STATE STB_HWGetStandbyState(void);
82 
95 void STB_HWSetWakeUpTime(U16BIT mjd, U16BIT year, U8BIT month, U8BIT day, U8BIT hours,
96  U8BIT minutes, U32BIT time_in_mins);
97 
106 E_HW_WAKEUP_TYPE STB_HWGetWakeUpType(void);
107 
112 void STB_HWEnterStandby(void);
113 
118 void STB_HWLeaveStandby(void);
119 
120 #endif // _STBHWINI_H
void STB_HWEnterStandby(void)
Perform any operations required before entering standby.
void STB_HWSetWakeUpTime(U16BIT mjd, U16BIT year, U8BIT month, U8BIT day, U8BIT hours, U8BIT minutes, U32BIT time_in_mins)
Used to set the wake up time for when the system is going to be put into the low power standby state...
BOOLEAN STB_HWSetStandbyState(E_HW_STANDBY_STATE state)
Used to transition the system between the various standby states. It's assumed that the system can mo...
E_HW_STANDBY_STATE STB_HWGetStandbyState(void)
Returns the current standby state of the system. STANDBY_LOWPOWER should never be returned by this fu...
E_HW_WAKEUP_TYPE STB_HWGetWakeUpType(void)
Returns what caused the system to be powered on. This is used to work out what to do after being powe...
void STB_HWLeaveStandby(void)
Perform any operations required when coming out of standby.
void STB_HWInitialise(E_HW_SUBT_CONTROL_MASK hw_subt)
Initialise the platform layer by calling the platform layer initialisation functions that are appropr...