appltype.h
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:3k
- #ifndef __APPLTYPE_H__
- #define __APPLTYPE_H__
- #include "gendef.h"
- /* general & explicit datatype definitions for interfaces */
- #define CHAR signed char
- #define BYTE unsigned char
- #define SHORT signed short
- #define USHORT unsigned short
- #define LONG long
- #define ULONG unsigned long
- #define INT signed int
- #define UINT unsigned int
- /* BOOLEAN declarations */
- #ifndef BOOLEAN
- #define BOOLEAN CHAR
- #endif
- #define SLOT_ID signed char
- /*{{{ Enumerations*/
- /* binary boolean enumeration */
- /*
- * VICKY - 231199 - commented the enumeration type for boolean data
- */
- #if 0
- enum
- {
- FALSE, /* 0 */
- TRUE /* 1 */
- };
- #endif
- /* keyboard selection enumeration */
- enum
- {
- REMOTE_KEYBOARD,
- FRONT_PANEL_KEYBOARD
- };
- /* --- */
- enum
- {
- LNB1, /* offset 0 */
- LNB2,
- LNB3,
- LNB4,
- LNB5,
- LNB6,
- LNB7,
- LNB8
- };
- /* --- */
- typedef enum
- {
- ELEMENT_FREE,
- ELEMENT_OCCUPIED,
- ELEMENT_DELETED
- } element_status_t;
- /* --- */
- typedef enum
- {
- NOT_TUNED,
- TUNED
- } tuner_module_state_t;
- /* --- */
- typedef enum
- {
- DBASE_WAITING_FOR_START_SIGNAL,
- DBASE_RUNNING
- } dbase_module_state_t;
- /* --- */
- typedef enum
- {
- BUILDING_PAT,
- BUILDING_PMT,
- BUILDING_NIT,
- BUILDING_SDT,
- BUILDING_NIT_COMPLETED
- } dbase_table_constuction_state_t;
- /* --- */
- typedef enum
- {
- EPG_NOT_ACTIVE,
- EPG_ACTIVE
- } epg_module_state_t;
- /* --- */
- typedef enum
- {
- BOX_POWERED_ON,
- BOX_STANDBY
- } box_state_t;
- /* --- */
- typedef enum
- {
- J_SECTION_FILTERING_MODULE,
- MOD_TUNER,
- MOD_KEY,
- MOD_MENU,
- MOD_SIPSI,
- J_TIME_MODULE,
- J_AVAPPLET_MODULE,
- J_AV_SEARCH_MODULE,
- J_MESSAGEBOX_MODULE,
- J_EPG_MODULE,
- MOD_NVOD,
- J_PLAY_MODULE,
- J_SCHEDULE_MODULE,
- J_CA_MODULE
- } ;
- /* --- */
- typedef enum
- {
- START_DATA_BASE_BUILDING,
- STOP_DATA_BASE_BUILDING,
- DELETE_DATA_BASE_BASED_ON_TRANSPONDER_SLOT,
- UPDATE_CURRENT_TIME,
- GET_CURRENT_EVENT_INFO,
- DOWNLOAD_EPG_SKED
- } usif_db_cmd_state_t;
- typedef enum
- {
- SECTION_SLOT_FREE, /* no section filter req for this slot */
- SECTION_SLOT_IN_USE, /* filtering is in progress */
- SECTION_SLOT_FILTER_DONE, /* filtering is completed and it is ready to restart or get killed */
- SECTION_SLOT_CRC_ERROR_DETECTED /* crc error detetcted while filtering */
- } sf_slot_status_t;
- /* --- */
- typedef enum
- {
- ONE_KILO_SECTION, /* 1KB long section */
- FOUR_KILO_SECTION /* 4KB long section */
- } sf_filter_mode_t;
- #define DEMUX_INVALID_PID 0x1fff
- /* user defined tags */
- typedef unsigned long opaque_t;
- /*
- * union which converts two 16bit values into 32bit value or versa.
- */
- typedef union
- {
- unsigned int uiWord32;
- struct
- {
- unsigned short sLo16;
- unsigned short sHi16;
- } unShort;
- } WORD2SHORT;
- typedef union
- {
- unsigned int uiWord32;
- struct
- {
- unsigned char ucByte0; /* LSB */
- unsigned char ucByte1;
- unsigned char ucByte2;
- unsigned char ucByte3; /* MSB */
- } byte;
- } WORD2BYTE;
- typedef union
- {
- SHORT sWord16;
- struct
- {
- unsigned char ucByte0; /* LSB */
- unsigned char ucByte1; /* MSB */
- } byte;
- } SHORT2BYTE;
- #define MILLI_DELAY(_ms_) { task_delay(_ms_ * ST_GetClocksPerSecondLow() /1000);}
- #endif /* __APPLTYPE_H__ */