sing_data.h
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:11k
- /*****************************************************************************
- File Name : sing_data.h
- Description : Singappl Application related header and definition
- Copyright (C) 2002 STMicroelectronics
- Date Modification Name
- ---- ------------ ----
- 25-06-2004 Adapted to 5517FTACI Beta tree Louie
- *****************************************************************************/
- #ifndef __SING_DATA_H
- #define __SING_DATA_H
- /* Includes ----------------------------------------------------------- */
- #include "appltype.h"
- /* Exported Types ----------------------------------------------------- */
- #define EPG_FLASH_BANK 1
- #define EPG_FLASH_OFFSET 0
- /* Number of AVFS partitions on the disk */
- #define NB_PART 3
- /* Exported Variables ------------------------------------------------- */
- /*=========================================================================
- Global Initialisation
- =========================================================================== */
- //KCY To avoid overflow... bigger than 688 will cause overflow in case 200MHz CPU
- // 688 * 6250000 = 4300000000 > 2^32 = 429497296
- //#define MILLI_DELAY(_ms_) { task_delay(_ms_ * ST_GetClocksPerSecondLow() /1000);}
- //#define MILLI_DELAY(_ms_) {task_delay(ST_GetClocksPerSecondLow() / 1000 * _ms_);}
- //#define MILLI_LOWP(_ms_) { task_delay(_ms_ * 6912 /1000);}
- /*
- * Physical E2P memory map of our application managed NVM partition
- */
- /*
- * ST24E64 8KB size
- */
- #define NVM_APPLICATION_MEM_SIZE (8 * 1024 - 4) /* in bytes - top 4 bytes for MFG id */
- #define EEPROM_SLAVE_ADDRESS ST24E64 /* device id for custom 551X board */
-
- #define NVM_APPLICATION_MEM_START 0x0000 /* physical addr in the device */
- #define NVM_APPLICATION_MEM_END ( NVM_APPLICATION_MEM_START + NVM_APPLICATION_MEM_SIZE ) /* physical end address */
- #define NVM_DEVICE_NAME "E2P0" /* "EEPROM" */
- #ifdef TESTTOOL
- #define STACK_SIZE_SAFE 1024
- #else
- #define STACK_SIZE_SAFE 0
- #endif
- #define CUSTOM_STCLKRV_INIT_MARK_VALUE 174 /* Mark for zero offset to VCX0 */
- #define CUSTOM_STCLKRV_MIN_MARK_VALUE 1 /* minimum PWM Mark value (-75ppm) */
- #define CUSTOM_STCLKRV_MAX_MARK_VALUE 248 /* maximum PWM Mark value (+81ppm) */
- #define CUSTOM_STCLKRV_TICKS_PER_MARK 26 /* VCXO ticks adjust per PWM Mark */
- #define CUSTOM_STCLKRV_SECOND_LINE_ERROR 4
- #ifdef GLOBAL_DATA
- /*#define DATA*/
- /* VICKY - 261199 - added the priority & workspace size definitions */
- #if 0
- const int SFILTER_MONITOR_PRIORITY = 12;
- #else
- const int SFILTER_MONITOR_PRIORITY = 9;
- #endif
- const int DBASE_BUILDER_PROCESS_PRIORITY = 7;
- const int USIF_PROCESS_PRIORITY = 8;
- const int KEYBOARD_PROCESS_PRIORITY = 5;
- const int NVM_SLAVE_PROCESS_PRIORITY = 1; /*! Louie(6/24/2004): formerly 3 */
- const int TUNER_PROCESS_PRIORITY = 5;
- const int SEGDISP_PROCESS_PRIORITY = 4;
- const int BLASTER_PROCESS_PRIORITY = 5;
- #if defined(BUILD_FOR_DVBS) || defined(BUILD_FOR_DVBT)
- const int TUNERSCAN_PROCESS_PRIORITY = 6;
- #endif
- const int TNR_SCAN_TASK_PRIORITY = 8; //TMTM 12
-
- #if 1//TMTM original
- #if 1 //KCY 060922
- const int BLASTER_PROCESS_WORKSPACE = ( 2048 + STACK_SIZE_SAFE );
- const int SEGDISP_PROCESS_WORKSPACE = ( 1024 + STACK_SIZE_SAFE );
- const int SFILTER_MONITOR_WORKSPACE = ( 2048 + STACK_SIZE_SAFE );
- const int DBASE_BUILDER_PROCESS_WORKSPACE = ( 4096+4096+ STACK_SIZE_SAFE );
- const int USIF_PROCESS_WORKSPACE = ( 2048 + STACK_SIZE_SAFE );
- const int KEYBOARD_PROCESS_WORKSPACE = ( 2048 + STACK_SIZE_SAFE );
- const int NVM_SLAVE_PROCESS_STACK_SIZE = ( 1024+1024 + STACK_SIZE_SAFE );
- const int TUNER_PROCESS_STACK_SIZE = ( 4096+4096 + STACK_SIZE_SAFE );
- #ifdef BUILD_FOR_DVBS
- const int TUNERSCAN_PROCESS_WORKSPACE = ( 2048 + STACK_SIZE_SAFE );
- #endif
- #else
- const int BLASTER_PROCESS_WORKSPACE = ( 2048 + STACK_SIZE_SAFE );
- const int SEGDISP_PROCESS_WORKSPACE = ( 1024 + STACK_SIZE_SAFE );
- const int SFILTER_MONITOR_WORKSPACE = ( 2048 + STACK_SIZE_SAFE );
- const int DBASE_BUILDER_PROCESS_WORKSPACE = ( 4096+4096+ STACK_SIZE_SAFE );
- const int USIF_PROCESS_WORKSPACE = ( 20480 + STACK_SIZE_SAFE );
- const int KEYBOARD_PROCESS_WORKSPACE = ( 2048 + STACK_SIZE_SAFE );
- const int NVM_SLAVE_PROCESS_STACK_SIZE = ( 1024+1024 + STACK_SIZE_SAFE );
- const int TUNER_PROCESS_STACK_SIZE = ( 4096 + STACK_SIZE_SAFE );
- #ifdef BUILD_FOR_DVBS
- const int TUNERSCAN_PROCESS_WORKSPACE = ( 2048 + STACK_SIZE_SAFE );
- #endif
- #endif
- #else
- /*JJL:increase tuner&dbase stack avoid system crash when Auto Search*/
- const int BLASTER_PROCESS_WORKSPACE = ( 1024 + STACK_SIZE_SAFE );
- const int SEGDISP_PROCESS_WORKSPACE = ( 1024 + STACK_SIZE_SAFE );
- const int SFILTER_MONITOR_WORKSPACE = ( 1024 + STACK_SIZE_SAFE );
- const int DBASE_BUILDER_PROCESS_WORKSPACE = ( 1024*2+ STACK_SIZE_SAFE );
- const int USIF_PROCESS_WORKSPACE = ( 1024 + STACK_SIZE_SAFE );
- const int KEYBOARD_PROCESS_WORKSPACE = ( 1024 + STACK_SIZE_SAFE );
- const int NVM_SLAVE_PROCESS_STACK_SIZE = ( 1024 + STACK_SIZE_SAFE );
- const int TUNER_PROCESS_STACK_SIZE = ( 1024*2+ STACK_SIZE_SAFE );
- #ifdef BUILD_FOR_DVBS
- const int TUNERSCAN_PROCESS_WORKSPACE = ( 1024 + STACK_SIZE_SAFE );
- #endif
- #endif
- #else /*ifdef GLOBAL_DATA */
- #define DATA extern
-
- /* VICKY - 261199 - added the priority & workspace size definitions */
- DATA const int SFILTER_MONITOR_PRIORITY;
- DATA const int DBASE_BUILDER_PROCESS_PRIORITY;
- DATA const int USIF_PROCESS_PRIORITY;
- DATA const int KEYBOARD_PROCESS_PRIORITY;
- DATA const int NVM_SLAVE_PROCESS_PRIORITY;
- DATA const int TUNER_PROCESS_PRIORITY;
- DATA const int SEGDISP_PROCESS_PRIORITY;
- DATA const int BLASTER_PROCESS_PRIORITY;
- #if defined(BUILD_FOR_DVBS) || defined(BUILD_FOR_DVBT)
- DATA const int TUNERSCAN_PROCESS_PRIORITY;
- #endif
- DATA const int TNR_SCAN_TASK_PRIORITY;
-
- DATA const int BLASTER_PROCESS_WORKSPACE ;
- DATA const int SEGDISP_PROCESS_WORKSPACE ;
- DATA const int SFILTER_MONITOR_WORKSPACE;
- DATA const int DBASE_BUILDER_PROCESS_WORKSPACE;
- DATA const int USIF_PROCESS_WORKSPACE;
- DATA const int KEYBOARD_PROCESS_WORKSPACE;
- DATA const int NVM_SLAVE_PROCESS_STACK_SIZE;
- DATA const int TUNER_PROCESS_STACK_SIZE;
- #ifdef BUILD_FOR_DVBS
- DATA const int TUNERSCAN_PROCESS_WORKSPACE;
- #endif
- #endif
- /*=========================================================================
- Global definitions
- =========================================================================== */
- /* 22/05/00 - Added by LP - Used when DISABLE_GPRIM_REGION is uncommented */
- #ifdef __STOSD_H
- /* Position of OSD Plane for demos */
- #define DISPLAY_X 100
- #define DISPLAY_Y 50
- #define DISPLAY_WIDTH (OSDScreenParams.Width-200)
- #define DISPLAY_HEIGHT (OSDScreenParams.Height-100)
- #endif
- /* cast for using register_command */
- #define RC_CAST boolean (*)(parse_t*, char*)
- typedef enum
- {
- ST_REGION_EUROPE_DVB,
- ST_REGION_USA_DVB,
- ST_REGION_USA_DSS
- } ST_Region_t;
- #ifdef __STTUNER_H
- #ifdef __STDENC_H
- typedef struct
- {
- ST_Region_t Region; /* EUROPE_DVB, USA_DVB or USA_DSS */
- STTUNER_Device_t Device; /* STTUNER_DEVICE_SATELLITE or STTUNER_DEVICE_TERR */
- STTUNER_DemodType_t Demod; /* STV0299 or STV0360 */
- STTUNER_LnbType_t Lnb; /* STV0299 */
- STTUNER_TunerType_t Tuner; /* VG1011 */
- STDENC_EncodingMode_t Display; /* PAL or NTSC */
- } ST_Environment_t;
- ST_Environment_t Environment;
- #endif
- #endif
- /* -------------------------- LCY_PORTSTPTI --------------------------------------- */
- /* DeviceId PTI_xxxx (quick access to hardware) */
- typedef enum
- {
- #if defined(mb295) || defined(mb382) || defined(mb400) || defined(MALY3) || defined(mb436) || defined(DTT5107) /*DANIEL 20060912*/
- PTI_1 = 0, /* On ST20TP3 we can used only one PTI */
- PTI_MAXDEVICE = 1 /* for range test */
- #elif defined(mb290) || defined(mb314) || defined(mb361) || defined(mb390) /* HSC */
- /* On STi5100 we can use three PTI's */
- PTI_1 = 0, /* For TUNER_0 TS */
- PTI_2 = 1, /* For TUNER_1 TS */
- PTI_3 = 2, /* For SWTS (HDD) */
- PTI_MAXDEVICE = 3 /* for range test */
- #else
- #error ERROR:invalid DVD_PLATFORM defined
- #endif
- } PTI_DeviceId_t;
- /* HandleId for multi-instance access */
- typedef U32 PTI_HandleId_t;
- /* ProcessStreamId PTI_PS_xxxx */
- typedef enum
- {
- PTI_PS_TSI = 0, /* For TSI managment (PAT, PMT, SDT ...) */
- #ifndef ST_5100 /* BLOCK COMMENTED OUT by Louie on 9/7/2004 */
- PTI_PS_AV1 = 1, /* Decode on AV CD1 */
- #endif /* BLOCK COMMENT */
- PTI_PS_AV2 = 2, /* Decode on AV CD2 */
- PTI_PS_V3 = 3, /* Decode on V CD3 */
- PTI_PS_V4 = 4, /* Decode on V CD4 */
- PTI_PS_V5 = 5, /* Decode on V CD5 */
- PTI_PS_PES = 6, /* For PES managment (TTX, AC3...) */
- PTI_PS_MAXDEVICE = 7 /* for range test */
- } PTI_ProcessStreamId_t;
- #if defined(ST_5100) /* no multiple handles per PTI */
- #define PTI_PS_AV1 0
- #endif
- #define PTI_MAXOPEN PTI_PS_MAXDEVICE /* ProcessStream ==== Handle */
- /* DMA parameters */
- /*
- Rq : The write length is 4 bytes when transferring from a buffer to
- the CD-FIFO (back buffered mode), and 16 bytes when the slot is
- linked directly to the CD-FIFO
- */
- #ifndef PTI_IS_IN_BACK_BUFFERED_MODE
- #if defined(mb290) || defined(mb314)
- /* Only back buffered mode should be used ! */
- /* MPX does not support 3 bytes transfert */
- #define PTI_IS_IN_BACK_BUFFERED_MODE TRUE
- #else
- #define PTI_IS_IN_BACK_BUFFERED_MODE FALSE
- #endif
- #endif /* ifndef PTI_IS_IN_BACK_BUFFERED_MODE */
- #define PTI_SEND_16_BYTES_TO_CDFIFO TRUE /* If False 4 bytes ! */
- #define PTI_MAP_CDFIFO_TO_LOCAL_RAM FALSE /* For test only */
- #if ( (PTI_SEND_16_BYTES_TO_CDFIFO==FALSE) && (PTI_MAP_CDFIFO_TO_LOCAL_RAM==TRUE) )
- #error "Bad choice !!!"
- #endif
- /* -------------------------- DENC ------------------------------------ */
- typedef enum
- {
- DENC0 = 0,
- DENC_MAXDEVICE
- } DENC_DeviceId_t;
- /* HandleId type */
- typedef U32 DENC_HandleId_t;
- /* -------------------------- VMIX ------------------------------------ */
- #define VMIX_MAXOPEN 1
- #define VMIX_HANDLE_NULL (STVMIX_Handle_t)NULL
- typedef enum
- {
- VMIX0 = 0,
- VMIX_MAXDEVICE
- } VMIX_DeviceId_t;
- /* HandleId type */
- typedef U32 VMIX_HandleId_t;
- /* -------------------------- av_cmds.c ------------------------------- */
- #ifdef __STAUD_H
- extern void aud_start( STAUD_StreamType_t StreamType );
- extern void aud_stop( boolean DisplayError );
- #endif
- #ifdef __STVID_H
- extern void vid_start( STVID_StreamType_t StreamType );
- extern void vid_stop( boolean DisplayError, boolean DisableOutputWindow );
- #endif
- extern void mpeg_enable(BOOLEAN, BOOLEAN) ;
- /* ------------------------------------------------------------------------ */
- #endif /*__SING_DATA_H*/