usifORG.h
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:7k
- /*
- * COPYRIGHT (C) STMicroelectronics Pte Ltd 2004.
- *
- * Source file name : usif.h
- * Description : Usif header
- * Author : TM CHUA
- *
- * =======================
- * IMPROVEMENTS THOUGHT OF
- * =======================
- *
- * =====================
- * MODIFICATION HISTORY:
- * =====================
- *
- * Date Initials Modification
- * ---- -------- ------------
- * 05.03.04 TM CHUA Created
- */
- /* Includes --------------------------------------------------------------- */
- #ifndef __USIF_H
- #define __USIF_H
- /* C++ support */
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include <stdarg.h>
- #include <debug.h>
- #include "stddefs.h"
- #include "staud.h"
- #include "vid.h"
- #include "stpti.h"
- #include "stvtg.h"
- #include "sttbx.h"
- #include "appltype.h"
- #include "sr_dbase.h"
- /*#define USIF_DEBUG*/
- #define MAX_MIXWEIGHT 0x3f /* mixweight */
- #define VOLUME_STEP 4
- #define MAX_VOL_LEVEL 63 /*63 */ /*64*/
- #define MIN_VOL_LEVEL 0 /*48*/
- #define MID_VOL_LEVEL 32
- #define INCREASE_VOLUME 0 /* vol+ */
- #define DECREASE_VOLUME 1 /* vol- */
- #define MUTE_VOLUME 2 /* mute */
- #define VOL_BALANCE_RIGHT_MAX 2 /*( MAX_VOL_LEVEL - MIN_VOL_LEVEL )*/
- #define VOL_BALANCE_LEFT_MAX 1 /*( -1 * ( MAX_VOL_LEVEL - MIN_VOL_LEVEL ) )*/
- #define VOL_BALANCE_CENTRE 0
- #define INDEFINITE_WAIT 0
- #define WAIT_FOR_1_SEC ST_GetClocksPerSecondLow()
- #define WAIT_FOR_2_SEC ( 2 * WAIT_FOR_1_SEC )
- #define WAIT_FOR_3_SEC ( 3 * WAIT_FOR_1_SEC )
- #define WAIT_FOR_10_SEC ( 10 * WAIT_FOR_1_SEC )
- #define WAIT_FOR_HALF_SEC ( WAIT_FOR_1_SEC / 2 )
- #define WAIT_FOR_QUARTER_SEC ( WAIT_FOR_1_SEC / 4 )
- #define WAIT_FOR_ONE_EIGHTH_SEC ( WAIT_FOR_1_SEC / 8 )
- #define PROGRAM_INVALID 0
- #define PROGRAM_VIDEO_ONLY 1
- #define PROGRAM_AUDIO_ONLY 2
- #define PROGRAM_VIDEO_AUDIO 3
- #define PROGRAM_DATA_ONLY 4
- #define DEFAULT_ROW_START 20
- #define DEFAULT_COL_START 100
- #define DEFAULT_DIALOG_ITEM 0
- #define MAX_NO_OF_MENU_ELEMENTS_IN_BIG_SCREEN 10
- #define MAX_EPG_ITEM 8
- #define MAX_DIALOG_MENU_ITEMS 3
- #define INSTALL_INFO_BANDWIDTH_MASK 0x0C /*leslie*/
- /*TMTM -for cable*/
- typedef struct
- {
- U8 SignalStrength;
- U32 SignalQuality;
- U32 BitErrorRate;
- } SIGNALINFO;
- typedef enum
- {
- CURSOR_OFF,
- CURSOR_ON
- } cursor_state_t;
- /* --- */
- typedef enum
- {
- PREV_PAGE,
- NEXT_PAGE
- } menu_page_sel_t;
- /* --- */
- typedef enum
- {
- WAIT_AT_STARTUP,
- WAIT_AT_PROGRAM_NO_ENTRY,
- WAIT_AT_CHANNEL_CHANGE,
- WAIT_AT_INFO_DISPLAY,
- WAIT_AT_VOLUME_CONTROL,
- WAIT_AT_IDLE
- } wait_duration_sel_t;
- typedef enum
- {
- LEFT_JUSTIFICATION,
- CENTER_JUSTIFICATION,
- RIGHT_JUSTIFICATION
- } text_justification_mode_t;
- typedef struct MENU_DATA_STRUCT_TAG
- {
- struct MENU_DATA_STRUCT_TAG *Prev;
- struct MENU_DATA_STRUCT_TAG *Next;
- BYTE aucData[80];
- } MENU_DATA_STRUCT;
- typedef struct dialogmenustruct
- {
- char *pacItemText; /* Dialog prompt */
- } DIALOGMENU;
- /*
- * it contains the details of the box state when it was operated
- * last time.
- */
- typedef struct box_info_t
- {
- char cValidity; /* 0= Invalid: 1= Valid */
- char current_box_state; /* ON/ STANDBY */
- char bSupplyLnb; /* power up LNB from IRD */
- char bMuteState; /* Mute state 0= NO_MUTE 1= MUTE */
- char cVolLevel; /* Volume Level */
- char cVolBalance; /* Balance Level */
- WORD2SHORT stLastWatchingProg;
- /*
- * stLastWatchingProg . sLo16 - Program No (16)
- * stLastWatchingProg . sHi16 - Transponder No (16)
- */
- /*added int Scart_infoTV;*/
- BYTE Install_Info; /*
- * BIT0= Output display format
- * 0- 4:3
- * 0- 16:9
- * BIT1= VCR Recording Source
- * 0- IRD
- * 0- AUX
- * BIT2-3= BANDWIDTH
- * BIT4-7= RESERVED
- */
- char cPassword[9];
- BOOL bParentalLock; /* FALSE: Disabled (default), TRUE: Enabled */
- int LnbIndex;
- STAUD_Stereo_t stAudMode; /* TONY */
- int iUILanguage; /* TONY */
- int timeDateUserOffset; /* the time difference between the current time and UTC */
- signed char xpdrTimeRef; /* Xpdr to be used as time reference, TDT */
- } BOX_INFO_STRUCT;
- /*******************************/
- extern U8 mixweight;
- extern tuner_module_state_t tuner_module_state;
- extern dbase_module_state_t dbase_module_state;
- extern epg_module_state_t epg_module_state;
- extern MENU_DATA_STRUCT astMenuData[MAX_NO_OF_MENU_ELEMENTS_IN_BIG_SCREEN];
- extern MENU_DATA_STRUCT *pstMenuDataHead,
- *pstMenuDataTail;
- extern BOOL bShowFirstProgram;
- extern menu_page_sel_t menu_page_last_sel;
- extern char acGeneralBuffer[80];
- #ifdef PIP_SUPPORT
- extern SHORT sCurTransponderId_Multiple[];
- #define sCurTransponderId sCurTransponderId_Multiple[SRAVC_GetFocusedDecoder()]
- extern int iCurrentProgramNo_Multiple[];
- #define iCurrentProgramNo iCurrentProgramNo_Multiple[SRAVC_GetFocusedDecoder()]
- #else
- extern SHORT sCurTransponderId;
- extern int iCurrentProgramNo;
- #endif
- extern BOX_INFO_STRUCT *pstBoxInfo;
- extern opaque_t idNvmBoxInfoId;
- extern BOOL bNvmBoxInfoPresent;
- extern BOOL NvmPgmPresent; /* TONY */
- extern PROGRAM_LIST *ProgramList; /* TONY */
- extern STAUD_Stereo_t stCurAudMode; /* TONY */
- extern int iUIlanguage; /* TONY */
- extern WORD2SHORT uiProgBeingWatched;
- extern signed char cCurVolLevel;
- extern signed char cCurVolBalance;
- extern BOOL bAudioMuteState;
- extern clock_t tclkWaitDuration;
- extern wait_duration_sel_t wait_duration_forced_during;
- extern BOOL bScreenInUse;
- extern BOOL bScreen2bCleared;
- extern BOOL bAntiflick;
- extern semaphore_t *psemDisplayBufferAccessLock;
- extern char acDisplayBuffer[3][60];
- extern int iInputFrequency;
- extern int iSymbolRate;
- #ifdef BUILD_FOR_DVBS
- extern int iPolarization; /* 1 = Horizontal; 2 = Vertical */
- extern int LnbIndex;
- extern BOOL LnbSupplyOn;
- #endif
- #ifdef BUILD_FOR_DVBC
- extern int iModulation;
- #endif
- extern BOOL parentalLockEnabled;
- #ifdef ENABLE_DVR_FEATURE
- extern char playbackFileName[]; /* id of the file currently shown */
- #endif
- extern U8 newHoursData;
- extern U8 newMinutesData;
- extern U8 newYearData;
- extern U8 newMonthData;
- extern U8 newDayData;
- /* C++ support */
- #ifdef __cplusplus
- }
- #endif
- #endif