appltype.h
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:3k
源码类别:

DVD

开发平台:

C/C++

  1. #ifndef  __APPLTYPE_H__
  2. #define  __APPLTYPE_H__
  3. #include "gendef.h"
  4. /* general & explicit datatype definitions for interfaces */
  5. #define  CHAR signed char
  6. #define  BYTE unsigned char
  7. #define  SHORT signed short
  8. #define  USHORT unsigned short
  9. #define  LONG long
  10. #define  ULONG unsigned long
  11. #define  INT signed int
  12. #define  UINT unsigned int
  13. /* BOOLEAN declarations */
  14. #ifndef  BOOLEAN
  15.    #define BOOLEAN    CHAR
  16. #endif
  17. #define SLOT_ID        signed char
  18. /*{{{ Enumerations*/
  19. /* binary boolean enumeration */
  20. /* 
  21.  * VICKY - 231199 - commented the enumeration type for boolean data 
  22.  */
  23. #if   0
  24. enum
  25.    FALSE,      /* 0 */
  26.    TRUE      /* 1 */
  27. };
  28. #endif
  29. /* keyboard selection enumeration */
  30. enum
  31. {
  32.    REMOTE_KEYBOARD,
  33.    FRONT_PANEL_KEYBOARD
  34. };
  35. /* --- */
  36. enum
  37. {
  38.    LNB1,       /* offset 0 */
  39.    LNB2,
  40.    LNB3,
  41.    LNB4,
  42.    LNB5,
  43.    LNB6,
  44.    LNB7,
  45.    LNB8
  46. };
  47. /* --- */
  48. typedef enum
  49. {
  50. ELEMENT_FREE,
  51. ELEMENT_OCCUPIED,
  52. ELEMENT_DELETED
  53. } element_status_t;
  54. /* --- */
  55. typedef enum
  56. {
  57. NOT_TUNED,
  58. TUNED
  59. } tuner_module_state_t;
  60. /* --- */
  61. typedef enum
  62. {
  63. DBASE_WAITING_FOR_START_SIGNAL,
  64. DBASE_RUNNING
  65. } dbase_module_state_t;
  66. /* --- */
  67. typedef enum
  68. {
  69.    BUILDING_PAT,
  70. BUILDING_PMT,
  71. BUILDING_NIT,
  72. BUILDING_SDT,
  73. BUILDING_NIT_COMPLETED
  74. } dbase_table_constuction_state_t;
  75. /* --- */
  76. typedef enum
  77. {
  78.    EPG_NOT_ACTIVE,
  79. EPG_ACTIVE
  80. } epg_module_state_t;
  81. /* --- */
  82. typedef enum
  83. {
  84.    BOX_POWERED_ON,
  85. BOX_STANDBY
  86. } box_state_t;
  87. /* --- */
  88. typedef enum
  89. {
  90. J_SECTION_FILTERING_MODULE,
  91. MOD_TUNER,
  92. MOD_KEY,
  93. MOD_MENU,
  94. MOD_SIPSI,
  95. J_TIME_MODULE,
  96. J_AVAPPLET_MODULE,
  97. J_AV_SEARCH_MODULE,
  98. J_MESSAGEBOX_MODULE,
  99. J_EPG_MODULE,
  100. MOD_NVOD,
  101. J_PLAY_MODULE,
  102. J_SCHEDULE_MODULE,
  103. J_CA_MODULE
  104. } ;
  105. /* --- */
  106. typedef enum
  107. {
  108.    START_DATA_BASE_BUILDING,
  109. STOP_DATA_BASE_BUILDING,
  110. DELETE_DATA_BASE_BASED_ON_TRANSPONDER_SLOT,
  111. UPDATE_CURRENT_TIME,
  112. GET_CURRENT_EVENT_INFO,
  113. DOWNLOAD_EPG_SKED
  114. } usif_db_cmd_state_t;
  115. typedef enum
  116. {
  117.     SECTION_SLOT_FREE, /* no section filter req for this slot */
  118. SECTION_SLOT_IN_USE, /* filtering is in progress */
  119. SECTION_SLOT_FILTER_DONE, /* filtering is completed and it is ready to restart or get killed */
  120. SECTION_SLOT_CRC_ERROR_DETECTED /* crc error detetcted while filtering */
  121. } sf_slot_status_t;
  122. /* --- */
  123. typedef enum
  124. {
  125.    ONE_KILO_SECTION, /* 1KB long section */
  126.    FOUR_KILO_SECTION /* 4KB long section */
  127. } sf_filter_mode_t;
  128. #define DEMUX_INVALID_PID 0x1fff
  129. /* user defined tags */
  130. typedef unsigned long  opaque_t;
  131. /*
  132.  * union which converts two 16bit values into 32bit value or versa.
  133.  */
  134. typedef union 
  135. {
  136.    unsigned int uiWord32;
  137.    struct 
  138.    {
  139.     unsigned short   sLo16;
  140. unsigned short  sHi16;
  141. } unShort;
  142. } WORD2SHORT;
  143. typedef union
  144. {
  145. unsigned int uiWord32;
  146. struct
  147. {
  148. unsigned char ucByte0; /* LSB */
  149. unsigned char ucByte1;
  150. unsigned char ucByte2;
  151. unsigned char ucByte3; /* MSB */
  152. } byte;
  153. } WORD2BYTE;
  154. typedef union
  155. {
  156. SHORT sWord16;
  157. struct
  158. {
  159. unsigned char ucByte0; /* LSB */
  160. unsigned char ucByte1; /* MSB */
  161.    } byte;
  162. } SHORT2BYTE;
  163. #define MILLI_DELAY(_ms_) { task_delay(_ms_ * ST_GetClocksPerSecondLow() /1000);}
  164. #endif  /* __APPLTYPE_H__  */