Bluecell_operate.h 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611
  1. /*
  2. * Bluecell_operate.h
  3. *
  4. * Created on: 2020. 4. 3.
  5. * Author: YJ
  6. */
  7. #ifndef BLUECELL_OPERATE_H_
  8. #define BLUECELL_OPERATE_H_
  9. #include <stdbool.h>
  10. #include "Bluecell_operate.h"
  11. /*
  12. SYN
  13. Sub-UID
  14. R-Code
  15. TR-ID
  16. Seq-Num
  17. TTL
  18. Time
  19. 占쏙옙占쏙옙 占쏙옙占쏙옙
  20. CMD
  21. Length
  22. Header Checksum
  23. SUB-DATA
  24. SUB-DATA-CRC
  25. ETX
  26. */
  27. /*
  28. *
  29. 0 80 占쏙옙체 占쏙옙占쏙옙 占쏙옙회 占쏙옙占� AID 占쌓몌옙 占쏙옙占쏙옙 占쏙옙占쏙옙 占쏙옙청 占쏙옙 占쏙옙占쏙옙 (占쏙옙청 Frame占쏙옙 SUB-DATA 占쏙옙 占쏙옙占싱댐옙 0)
  30. 1 81 占쏙옙占쏙옙 占쏙옙청 占쏙옙占쏙옙 占쏙옙청占쏙옙 REQ占쏙옙 0x01 占싱곤옙 占쏙옙占쏙옙占쏙옙 占쏙옙체 占쏙옙占쏙옙占쏙옙 占쏙옙占승몌옙 占쏙옙占쏙옙
  31. 10 90 Download Notification 占쌕울옙琯占� 占쏙옙占쏙옙
  32. 11 91 Download Data 占쌕울옙琯占� data
  33. 12 92 Download Confirm 占쌕울옙琯占� 확占쏙옙
  34. 13 93 Download Complete Download Complete Command
  35. 14 94 System-Reboot System Rebooting Command
  36. 40 C0 占쏙옙占싱븝옙 占쏙옙회 占쏙옙 占쏙옙占쏙옙
  37. 41 C1 占쏙옙占싱븝옙 占쏙옙占쏙옙 占쏙옙 占쏙옙占쏙옙
  38. *
  39. *
  40. */
  41. #define ANSI_COLOR_RED "\x1b[31m"
  42. #define ANSI_COLOR_GREEN "\x1b[32m"
  43. #define ANSI_COLOR_YELLOW "\x1b[33m"
  44. #define ANSI_COLOR_BLUE "\x1b[34m"
  45. #define ANSI_COLOR_MAGENTA "\x1b[35m"
  46. #define ANSI_COLOR_CYAN "\x1b[36m"
  47. #define ANSI_COLOR_RESET "\x1b[0m" "\r\n"
  48. #define MBIC_BANK1_NUM 1
  49. #define MBIC_BANK2_NUM 2
  50. typedef enum{
  51. AllDataReq = 0, // -> Response 80
  52. DataCtrlReq, // -> Response 81
  53. DownNotification, // -> Response 90
  54. DownData, // -> Response 91
  55. DownConfirm , // -> Response 92
  56. DownComplete, // -> Response 93
  57. SystemReboot, // -> Response 94
  58. TableDataReq = 40,
  59. }MBICBootProt_st;
  60. typedef enum{
  61. MBIC_GET = 0,
  62. MBIC_SET,
  63. MBIC_Table_Get = 0x40,
  64. MBIC_Table_Set = 0x41,
  65. }BMBM_CMD;
  66. typedef struct{
  67. uint8_t High_bit;
  68. uint8_t Low_bit;
  69. }OneByteToTwoByte;
  70. typedef enum{
  71. MBIC_Notice_REQ = 0x10,
  72. MBIC_Download_DATA_REQ,
  73. MBIC_Download_Confirm_REQ,
  74. MBIC_Complete_Notice_REQ_REQ,
  75. MBIC_Reboot_Notice_REQ,
  76. }MBIC_Download_Req_L;
  77. typedef enum{
  78. MBIC_Notice_RSP = 0x90,
  79. MBIC_Download_DATA_RSP,
  80. MBIC_Download_Confirm_RSP,
  81. MBIC_Complete_Notice_RSP,
  82. MBIC_Reboot_Notice_RSP,
  83. }MBIC_Download_Rsp_L;
  84. typedef enum{
  85. MBIC_PREAMBLE_0 = 0,
  86. MBIC_PREAMBLE_1,
  87. MBIC_PREAMBLE_2,
  88. MBIC_PREAMBLE_3,
  89. MBIC_SUBUID_0,
  90. MBIC_SUBUID_1,
  91. MBIC_RCODE_0,
  92. MBIC_TRID_0,
  93. MBIC_TRID_1,
  94. MBIC_SEQSUM_0, // 9Index
  95. MBIC_TTL_0, //10 INDEX
  96. MBIC_TIME_0, // YEAR
  97. MBIC_TIME_1,// Month
  98. MBIC_TIME_2,// day
  99. MBIC_TIME_3,// Hour
  100. MBIC_TIME_4,// minute
  101. MBIC_TIME_5,//second
  102. MBIC_ERRRESPONSE_0,
  103. MBIC_CMD_0,
  104. MBIC_LENGTH_0, // 19INDEX
  105. MBIC_LENGTH_1, // 20
  106. MBIC_HEADERCHECKSUM_0,
  107. MBIC_PAYLOADSTART,
  108. /*
  109. * PayLoadSTART
  110. */
  111. }MBICProt_st;
  112. typedef enum{
  113. AGC_Alarm_DL1_Index = 0,
  114. AGC_Alarm_DL2_Index,
  115. AGC_Alarm_DL3_Index,
  116. AGC_Alarm_DL4_Index,
  117. AGC_Alarm_DL_Index_MAX,
  118. }AGC_Alarm_I;
  119. typedef enum{
  120. ALC_Alarm_UL1_Index = 0,
  121. ALC_Alarm_UL2_Index,
  122. ALC_Alarm_UL3_Index,
  123. ALC_Alarm_UL4_Index,
  124. ALC_Alarm_UL_Index_MAX,
  125. }ALC_Alarm_I;
  126. typedef enum{
  127. AGC_Table_DL1_Ref_Index = 0,
  128. AGC_Table_DL2_Ref_Index,
  129. AGC_Table_DL3_Ref_Index,
  130. AGC_Table_DL4_Ref_Index,
  131. AGC_Table_DL_Ref_Index_MAX,
  132. }AGC_Table_I;
  133. #define TABLE_MAX_VALUE 0
  134. #define TABLE_LENGTH_MAX 70
  135. typedef enum{
  136. ALC_Table_UL1_Ref_Index = 0,
  137. ALC_Table_UL2_Ref_Index,
  138. ALC_Table_UL3_Ref_Index,
  139. ALC_Table_UL4_Ref_Index,
  140. ALC_Table_UL_Ref_Index_MAX,
  141. };
  142. typedef enum{
  143. Table_DL1_Ref_Index = 0,
  144. Table_DL2_Ref_Index,
  145. Table_DL3_Ref_Index,
  146. Table_DL4_Ref_Index,
  147. Table_UL1_Ref_Index,
  148. Table_UL2_Ref_Index,
  149. Table_UL3_Ref_Index,
  150. Table_UL4_Ref_Index,
  151. Table_ATT_Ref_Index_MAX,
  152. };
  153. typedef enum{
  154. Alarm_Bit_List = 0x00,
  155. Alarm_Mask,
  156. Alarm_Test_Mode,
  157. Alarm_Test_Dummy,
  158. CPU_Version,
  159. ModuleINFORMATION_null1,
  160. CPU_Current_Bank,
  161. CPU_Bank_Select_Reboot_by,
  162. CPU_Bank1_Image_Version,
  163. CPU_Bank1_Image_BuildTime,
  164. CPU_Bank1_Image_Name,
  165. CPU_Bank2_Image_Version,
  166. CPU_Bank2_Image_BuildTime,
  167. CPU_Bank2_Image_Name,
  168. SW_Reset,
  169. Factory_Set_Initialization,
  170. }SERIAL_ModuleINFORMATION;
  171. typedef enum{
  172. Temperature = 0x10,
  173. Temperature_Offset,
  174. Temp_High_Threshold,
  175. Temp_High_Threshold_Default,
  176. Temp_High_Alarm,
  177. LED_TEST,
  178. Node,
  179. Type,
  180. PCB_Version,
  181. Serial_Number,
  182. Manufacture,
  183. Manufacture_Date,
  184. Temp_Shutdown_Path_ON_OFF,
  185. Freq_ID,
  186. Carrier_ID,
  187. Carrier_ON_OFF,
  188. }SERIAL_ENVIRONMENT_INVENTORY_t;
  189. typedef enum{
  190. DLI_P1_Level = 0x20,
  191. DLI_P2_Level,
  192. DLI_P3_Level,
  193. DLI_P4_Level,
  194. ULO_P1_Level,
  195. ULO_P2_Level,
  196. ULO_P3_Level,
  197. ULO_P4_Level,
  198. }SERIAL_Current_Volt_t;
  199. typedef struct{
  200. bool AGC1_En;
  201. bool AGC2_En;
  202. bool AGC3_En;
  203. bool AGC4_En;
  204. bool ALC1_En;
  205. bool ALC2_En;
  206. bool ALC3_En;
  207. bool ALC4_En;
  208. }AutoCtrl_st;
  209. typedef enum{
  210. BLUECELL_HEADER,
  211. BLUECELL_TYPE,
  212. BLUECELL_LENGTH_H,
  213. BLUECELL_LENGTH_L,
  214. BLUECELL_CRCINDEX,
  215. BLUECELL_DATA,
  216. }BLUECELLProt_st;
  217. typedef enum{
  218. MBIC_TableIndex_Unit_Type = 0,
  219. MBIC_TableIndex_Reseved = 1,
  220. MBIC_TableIndex_Number = 2,
  221. MBIC_TableIndex_Ref = 3,
  222. MBIC_TableIndex_Length = 4,
  223. MBIC_TableIndex_Max,
  224. }MBIC_TableLoadIndex_t;
  225. typedef enum{
  226. Bluecell_Table_ATT_DL1 = 0,
  227. Bluecell_Table_ATT_UL1,
  228. Bluecell_Table_ATT_DL2,
  229. Bluecell_Table_ATT_UL2,
  230. Bluecell_Table_ATT_DL3,
  231. Bluecell_Table_ATT_UL3,
  232. Bluecell_Table_ATT_DL4,
  233. Bluecell_Table_ATT_UL4,
  234. Bluecell_Table_DET_DL1,
  235. Bluecell_Table_DET_UL1,
  236. Bluecell_Table_DET_DL2,
  237. Bluecell_Table_DET_UL2,
  238. Bluecell_Table_DET_DL3,
  239. Bluecell_Table_DET_UL3,
  240. Bluecell_Table_DET_DL4,
  241. Bluecell_Table_DET_UL4,
  242. Bluecell_Table_TEMP_DL1,
  243. Bluecell_Table_TEMP_UL1,
  244. Bluecell_Table_TEMP_DL2,
  245. Bluecell_Table_TEMP_UL2,
  246. Bluecell_Table_TEMP_DL3,
  247. Bluecell_Table_TEMP_UL3,
  248. Bluecell_Table_TEMP_DL4,
  249. Bluecell_Table_TEMP_UL4,
  250. }Bluecell_tableIndex;
  251. typedef enum{
  252. MBIC_PROT_PREAMBLE0_INDEX,
  253. MBIC_PROT_PREAMBLE1_INDEX,
  254. MBIC_PROT_PREAMBLE2_INDEX,
  255. MBIC_PROT_PREAMBLE3_INDEX, //4
  256. MBIC_PROT_SUB_UID0_INDEX,
  257. MBIC_PROT_SUB_UID1_INDEX,
  258. MBIC_PROT_R_CODE_INDEX,
  259. MBIC_PROT_TR_ID0_INDEX,
  260. MBIC_PROT_TR_ID1_INDEX,
  261. MBIC_PROT_SEQ_NUM_INDEX, //10
  262. MBIC_PROT_TTL_INDEX,
  263. MBIC_PROT_TIME0_INDEX,
  264. MBIC_PROT_TIME1_INDEX,
  265. MBIC_PROT_TIME2_INDEX,
  266. MBIC_PROT_TIME3_INDEX,
  267. MBIC_PROT_TIME4_INDEX,
  268. MBIC_PROT_TIME5_INDEX,
  269. MBIC_PROT_ERR_RESP_INDEX,
  270. MBIC_PROT_CMD_INDEX, // 19
  271. MBIC_PROT_LENGTH_INDEX,
  272. MBIC_PROT_HEADERCHECKSUM_INDEX,
  273. MBIC_PROT_SUB_DATA_INDEX,
  274. MBIC_PROT_INDEX_MAX,
  275. };
  276. typedef enum{
  277. MBIC_Table_DL1_INDEX = 0,
  278. MBIC_Table_DL2_INDEX ,
  279. MBIC_Table_DL3_INDEX ,
  280. MBIC_Table_DL4_INDEX ,
  281. MBIC_Table_UL1_INDEX ,
  282. MBIC_Table_UL2_INDEX ,
  283. MBIC_Table_UL3_INDEX ,
  284. MBIC_Table_UL4_INDEX ,
  285. MBIC_Table_INDEX ,
  286. }MBIC_ALC_TableIndex;
  287. //5~ - 25
  288. typedef struct{
  289. int8_t DET_DL_0;
  290. int8_t DET_DL_1;
  291. int8_t DET_DL_2;
  292. int8_t DET_DL_3;
  293. int8_t DET_DL_4;
  294. int8_t DET_DL_5;
  295. int8_t DET_DL_6;
  296. int8_t DET_DL_7;
  297. int8_t DET_DL_8;
  298. int8_t DET_DL_9;
  299. int8_t DET_DL_10;
  300. int8_t DET_DL_11;
  301. int8_t DET_DL_12;
  302. int8_t DET_DL_13;
  303. int8_t DET_DL_14;
  304. int8_t DET_DL_15;
  305. int8_t DET_DL_16;
  306. int8_t DET_DL_17;
  307. int8_t DET_DL_18;
  308. int8_t DET_DL_19;
  309. int8_t DET_DL_20;
  310. int8_t DET_DL_21;
  311. int8_t DET_DL_22;
  312. int8_t DET_DL_23;
  313. int8_t DET_DL_24;
  314. int8_t DET_DL_25;
  315. int8_t DET_DL_26;
  316. int8_t DET_DL_27;
  317. int8_t DET_DL_28;
  318. int8_t DET_DL_29;
  319. int8_t DET_DL_30;
  320. }AGC_dBm_t;
  321. typedef struct{
  322. int8_t DET_UL_0;
  323. int8_t DET_UL_1;
  324. int8_t DET_UL_2;
  325. int8_t DET_UL_3;
  326. int8_t DET_UL_4;
  327. int8_t DET_UL_5;
  328. int8_t DET_UL_6;
  329. int8_t DET_UL_7;
  330. int8_t DET_UL_8;
  331. int8_t DET_UL_9;
  332. int8_t DET_UL_10;
  333. int8_t DET_UL_11;
  334. int8_t DET_UL_12;
  335. int8_t DET_UL_13;
  336. int8_t DET_UL_14;
  337. int8_t DET_UL_15;
  338. int8_t DET_UL_16;
  339. int8_t DET_UL_17;
  340. int8_t DET_UL_18;
  341. int8_t DET_UL_19;
  342. int8_t DET_UL_20;
  343. int8_t DET_UL_21;
  344. int8_t DET_UL_22;
  345. int8_t DET_UL_23;
  346. int8_t DET_UL_24;
  347. int8_t DET_UL_25;
  348. int8_t DET_UL_26;
  349. int8_t DET_UL_27;
  350. int8_t DET_UL_28;
  351. int8_t DET_UL_29;
  352. int8_t DET_UL_30;
  353. int8_t DET_UL_31;
  354. int8_t DET_UL_32;
  355. int8_t DET_UL_33;
  356. int8_t DET_UL_34;
  357. int8_t DET_UL_35;
  358. int8_t DET_UL_36;
  359. int8_t DET_UL_37;
  360. int8_t DET_UL_38;
  361. int8_t DET_UL_39;
  362. int8_t DET_UL_40;
  363. int8_t DET_UL_41;
  364. int8_t DET_UL_42;
  365. int8_t DET_UL_43;
  366. int8_t DET_UL_44;
  367. int8_t DET_UL_45;
  368. int8_t DET_UL_46;
  369. int8_t DET_UL_47;
  370. int8_t DET_UL_48;
  371. int8_t DET_UL_49;
  372. int8_t DET_UL_50;
  373. int8_t DET_UL_51;
  374. int8_t DET_UL_52;
  375. int8_t DET_UL_53;
  376. int8_t DET_UL_54;
  377. int8_t DET_UL_55;
  378. int8_t DET_UL_56;
  379. int8_t DET_UL_57;
  380. int8_t DET_UL_58;
  381. int8_t DET_UL_59;
  382. int8_t DET_UL_60;
  383. int8_t DET_UL_61;
  384. int8_t DET_UL_62;
  385. int8_t DET_UL_63;
  386. int8_t DET_UL_64;
  387. int8_t DET_UL_65;
  388. int8_t DET_UL_66;
  389. int8_t DET_UL_67;
  390. int8_t DET_UL_68;
  391. int8_t DET_UL_69;
  392. }ALC_dBm_t;
  393. typedef enum{
  394. DLI_RF_Path1_ON_OFF = 0x30,
  395. DLI_RF_Path2_ON_OFF,
  396. DLI_RF_Path3_ON_OFF,
  397. DLI_RF_Path4_ON_OFF,
  398. DLI_Gain_Atten1,
  399. DLI_Gain_Atten2,
  400. DLI_Gain_Atten3,
  401. DLI_Gain_Atten4,
  402. DLI_Gain_Atten_Offset1,
  403. DLI_Gain_Atten_Offset2,
  404. DLI_Gain_Atten_Offset3,
  405. DLI_Gain_Atten_Offset4,
  406. DLI_Level_High_Threshold,
  407. DLI_Level_Low_Threshold,
  408. DLI_Level_High_Low_Threshold_default,
  409. DLI_Level,
  410. DLI_Level_High_Alarm1=0x40,
  411. DLI_Level_High_Alarm2,
  412. DLI_Level_High_Alarm3,
  413. DLI_Level_High_Alarm4,
  414. DLI_Level_Low_Alarm1,
  415. DLI_Level_Low_Alarm2,
  416. DLI_Level_Low_Alarm3,
  417. DLI_Level_Low_Alarm4,
  418. SERIAL_DL_NULL0,
  419. DLI_FRBT_Atten,
  420. DLI_FRBT_D_Day,
  421. DLI_FRBT_Status,
  422. DLI_AGC_ON_OFF=0x50,
  423. DLI_AGC_Threshold,
  424. DLI_AGC_Threshold_Default,
  425. DLI_Shutdown_ON_OFF,
  426. DLI_Shutdown_Threshold,
  427. DLI_Shutdown_Threshold_Default,
  428. DLI_Shutdown_Count,
  429. DLI_AGC_Alarm1,
  430. DLI_AGC_Alarm2,
  431. DLI_AGC_Alarm3,
  432. DLI_AGC_Alarm4,
  433. DLI_Shutdown_Alarm1,
  434. DLI_Shutdown_Alarm2,
  435. DLI_Shutdown_Alarm3,
  436. DLI_Shutdown_Alarm4,
  437. }SERIAL_DL_t;
  438. typedef enum{
  439. ULO_RF_Path1_ON_OFF = 0x60,
  440. ULO_RF_Path2_ON_OFF,
  441. ULO_RF_Path3_ON_OFF,
  442. ULO_RF_Path4_ON_OFF,
  443. ULO_Gain_Atten1,
  444. ULO_Gain_Atten2,
  445. ULO_Gain_Atten3,
  446. ULO_Gain_Atten4,
  447. ULO_Gain_Atten_Offset1,
  448. ULO_Gain_Atten_Offset2,
  449. ULO_Gain_Atten_Offset3,
  450. ULO_Gain_Atten_Offset4,
  451. ULO_Level_High_Threshold,
  452. SERIAL_UL_NULL0,
  453. ULO_Level_High_Threshold_default,
  454. ULO_Level,
  455. ULO_Level_High_Alarm1=0x70,
  456. ULO_Level_High_Alarm2,
  457. ULO_Level_High_Alarm3,
  458. ULO_Level_High_Alarm4,
  459. ULO_SelfTest1,
  460. ULO_SelfTest2,
  461. ULO_SelfTest3,
  462. ULO_SelfTest4,
  463. ULO_ALC_ON_OFF=0x80,
  464. ULO_ALC_Threshold,
  465. ULO_ALC_Threshold_Default,
  466. ULO_Shutdown_ON_OFF,
  467. ULO_Shutdown_Threshold,
  468. ULO_Shutdown_Threshold_Default,
  469. ULO_Shutdown_Retry_Count,
  470. ULO_ALC_Alarm1,
  471. ULO_ALC_Alarm2,
  472. ULO_ALC_Alarm3,
  473. ULO_ALC_Alarm4,
  474. ULO_Shutdown_Alarm1,
  475. ULO_Shutdown_Alarm2,
  476. ULO_Shutdown_Alarm3,
  477. ULO_Shutdown_Alarm4,
  478. ULO_ALC_Atten,
  479. }SERIAL_UL_t;
  480. #define RETRYCNT_MAX 4
  481. #define MBIC_HEADER_SIZE 22
  482. #define MBIC_TAIL_SIZE 3
  483. #define MBIC_PREAMBLE0 0x16
  484. #define MBIC_PREAMBLE1 0x16
  485. #define MBIC_PREAMBLE2 0x16
  486. #define MBIC_PREAMBLE3 0x16
  487. #define MBIC_SUBUID0 0x00
  488. #define MBIC_SUBUID1 0xF1
  489. #define MBIC_RCODE
  490. #define MBIC_TRID
  491. #define MBIC_SEQNUM
  492. #define MBIC_TTL
  493. #define MBIC_TIME
  494. #define MBIC_ERRRESPONSE 0x00
  495. #define MBIC_CMD
  496. #define MBIC_LENGTH
  497. #define MBIC_CHECKSHUM_INDEX MBIC_HEADER_SIZE - 1 //CheckSUM REMOVE INDEX
  498. #define MBIC_ETX 0x03
  499. #define MBIC_NODE_MU 0x80
  500. #define MBIC_CPUVERSION 0x000000
  501. typedef enum{
  502. MBIC_Shutdown_DL1 = 0,
  503. MBIC_Shutdown_DL2,
  504. MBIC_Shutdown_DL3,
  505. MBIC_Shutdown_DL4,
  506. MBIC_Shutdown_UL1,
  507. MBIC_Shutdown_UL2,
  508. MBIC_Shutdown_UL3,
  509. MBIC_Shutdown_UL4,
  510. MBIC_Shutdown_MaxIndex,
  511. }MBIC_ShutdownIndex_t;
  512. enum DATATYPE
  513. {
  514. BLUECELL_SOFTWARERESET = 0,
  515. ATT_DL1_PATH = 0x12,
  516. ATT_UL1_PATH = 0x16,
  517. ATT_SelfTest1 = 0x18,
  518. ATT_DL2_PATH = 0x22,
  519. ATT_UL2_PATH = 0x26,
  520. ATT_SelfTest2 = 0x28,
  521. ATT_DL3_PATH = 0x32,
  522. ATT_UL3_PATH = 0x36,
  523. ATT_SelfTest3 = 0x38,
  524. ATT_DL4_PATH = 0x42,
  525. ATT_UL4_PATH = 0x46,
  526. ATT_SelfTest4 = 0x48,
  527. Bluecell_ULO_ALC_ON_OFF = 0x51,
  528. Bluecell_DLI_AGC_ON_OFF = 0x61,
  529. ATT_TableSet = 0x70,
  530. ATT_TableGet = 0x71,
  531. Bluecell_StatusReq = 0x77,
  532. Bluecell_StatusSave = 0x78,
  533. Bluecell_DL1_USER = 0x80,
  534. Bluecell_DL2_USER = 0x81,
  535. Bluecell_DL3_USER = 0x82,
  536. Bluecell_DL4_USER = 0x83,
  537. Bluecell_UL1_USER = 0x84,
  538. Bluecell_UL2_USER = 0x85,
  539. Bluecell_UL3_USER = 0x86,
  540. Bluecell_UL4_USER = 0x87,
  541. Bluecell_TEMP_USER = 0x88,
  542. Bluecell_DLI_AGC_Threshold,
  543. Bluecell_DLI_AGC_Threshold_Default,
  544. Bluecell_DLI_Shutdown_ON_OFF,
  545. Bluecell_DLI_Shutdown_Threshold,
  546. Bluecell_DLI_Shutdown_Threshold_Default,
  547. Bluecell_DLI_Shutdown_Count,
  548. Bluecell_DLI_Level_High_Threshold ,
  549. Bluecell_DLI_Level_Low_Threshold ,
  550. Bluecell_DLI_Level_High_Low_Threshold_default ,
  551. Bluecell_LED_TEST ,
  552. Bluecell_Temperature_Offset ,
  553. Bluecell_Temp_High_Threshold ,
  554. Bluecell_Temp_High_Threshold_Default ,
  555. Bluecell_ULO_Level_High_Threshold ,
  556. Bluecell_ULO_Level_High_Threshold_default ,
  557. Bluecell_ULO_ALC_Threshold ,
  558. Bluecell_ULO_ALC_Threshold_Default ,
  559. Bluecell_ULO_Shutdown_ON_OFF ,
  560. Bluecell_ULO_Shutdown_Threshold ,
  561. Bluecell_ULO_Shutdown_Threshold_Default ,
  562. Bluecell_ULO_Shutdown_Retry_Count ,
  563. Bluecell_Alarm_Mask,
  564. Bluecell_ATT_DL1,
  565. Bluecell_ATT_DL2,
  566. Bluecell_ATT_DL3,
  567. Bluecell_ATT_DL4,
  568. Bluecell_ATT_UL1,
  569. Bluecell_ATT_UL2,
  570. Bluecell_ATT_UL3,
  571. Bluecell_ATT_UL4,
  572. Bluecell_ATT_DL1_USER,
  573. Bluecell_ATT_DL2_USER,
  574. Bluecell_ATT_DL3_USER,
  575. Bluecell_ATT_DL4_USER,
  576. Bluecell_ATT_UL1_USER,
  577. Bluecell_ATT_UL2_USER,
  578. Bluecell_ATT_UL3_USER,
  579. Bluecell_ATT_UL4_USER,
  580. BLuecell_ATT_ALC1,
  581. BLuecell_ATT_ALC2,
  582. BLuecell_ATT_ALC3,
  583. BLuecell_ATT_ALC4,
  584. Bluecell_BankSelect,
  585. Bluecell_TimeSetting,
  586. Bluecell_Factory_Set,
  587. Bluecell_CarrierOnOff,
  588. Bluecell_PCBVersionSet,
  589. Bluecell_SerialNumberSet,
  590. Bluecell_ManufactureDateSet,
  591. Bluecell_DL_Det_ALL_Offset,
  592. Bluecell_UL_Det_Path1_Offset,
  593. Bluecell_UL_Det_Path2_Offset,
  594. Bluecell_UL_Det_Path3_Offset,
  595. Bluecell_UL_Det_Path4_Offset,
  596. Bluecell_Temp_Shutdown_Path_ON_OFF
  597. };
  598. typedef enum{
  599. DLI_P1_Level_Table_Number = 0x00,
  600. DLI_P2_Level_Table_Number = 0x01,
  601. DLI_P3_Level_Table_Number = 0x02,
  602. DLI_P4_Level_Table_Number = 0x03,
  603. ULO_P1_Level_Table_Number = 0x10,
  604. ULO_P2_Level_Table_Number = 0x11,
  605. ULO_P3_Level_Table_Number = 0x12,
  606. ULO_P4_Level_Table_Number = 0x13,
  607. DLI_P1_ATT_Temp_guarantee_Table_Number = 0x20,
  608. DLI_P2_ATT_Temp_guarantee_Table_Number = 0x21,
  609. DLI_P3_ATT_Temp_guarantee_Table_Number = 0x22,
  610. DLI_P4_ATT_Temp_guarantee_Table_Number = 0x23,
  611. ULO_P1_ATT_Temp_guarantee_Table_Number = 0x30,
  612. ULO_P2_ATT_Temp_guarantee_Table_Number = 0x31,
  613. ULO_P3_ATT_Temp_guarantee_Table_Number = 0x32,
  614. ULO_P4_ATT_Temp_guarantee_Table_Number = 0x33,
  615. DLI_P1_ATT_Accuracy_Table_Number = 0x40,
  616. DLI_P2_ATT_Accuracy_Table_Number = 0x41,
  617. DLI_P3_ATT_Accuracy_Table_Number = 0x42,
  618. DLI_P4_ATT_Accuracy_Table_Number = 0x43,
  619. ULO_P1_ATT_Accuracy_Table_Number = 0x50,
  620. ULO_P2_ATT_Accuracy_Table_Number = 0x51,
  621. ULO_P3_ATT_Accuracy_Table_Number = 0x52,
  622. ULO_P4_ATT_Accuracy_Table_Number = 0x53,
  623. }MBIC_Table_Number;
  624. #define ATTENTABLEDLUL_LENGTH 64
  625. #define ATTENTABLEDET_DL_LENGTH 33
  626. #define ATTENTABLEDET_UL_LENGTH 46
  627. #define ATTENTABLE_TEMP_LENGTH 10
  628. #define ATTENTABLEDL_REF 0
  629. #define ATTENTABLEUL_REF 0
  630. #define ATTENTABLEDET_DL_REF 7
  631. #define ATTENTABLEDET_UL_REF -15
  632. #define ATTENTABLE_TEMP_REF -10
  633. #define UNIT_TYPE_MBIC 0x01
  634. /*FLAG BIT START */
  635. #define ENVIRONMENT_TEMPHIGH 0x80
  636. #define ALARM_DLI_P4_LEVEL_LOW 0x80
  637. #define ALARM_DLI_P3_LEVEL_LOW 0x40
  638. #define ALARM_DLI_P2_LEVEL_LOW 0x20
  639. #define ALARM_DLI_P1_LEVEL_LOW 0x10
  640. #define ALARM_DLI_P4_LEVEL_HIGH 0x08
  641. #define ALARM_DLI_P3_LEVEL_HIGH 0x04
  642. #define ALARM_DLI_P2_LEVEL_HIGH 0x02
  643. #define ALARM_DLI_P1_LEVEL_HIGH 0x01
  644. #define ALARM_AGC_P4 0x80
  645. #define ALARM_AGC_P3 0x40
  646. #define ALARM_AGC_P2 0x20
  647. #define ALARM_AGC_P1 0x10
  648. #define ALARM_DLI_SHUTDOWN_P4 0x08
  649. #define ALARM_DLI_SHUTDOWN_P3 0x04
  650. #define ALARM_DLI_SHUTDOWN_P2 0x02
  651. #define ALARM_DLI_SHUTDOWN_P1 0x01
  652. #define ALARM_ULO_P4_LEVEL_HIGH 0x08
  653. #define ALARM_ULO_P3_LEVEL_HIGH 0x04
  654. #define ALARM_ULO_P2_LEVEL_HIGH 0x02
  655. #define ALARM_ULO_P1_LEVEL_HIGH 0x01
  656. #define ALARM_ALC_P4 0x80
  657. #define ALARM_ALC_P3 0x40
  658. #define ALARM_ALC_P2 0x20
  659. #define ALARM_ALC_P1 0x10
  660. #define ALARM_ULO_SHUTDOWN_P4 0x08
  661. #define ALARM_ULO_SHUTDOWN_P3 0x04
  662. #define ALARM_ULO_SHUTDOWN_P2 0x02
  663. #define ALARM_ULO_SHUTDOWN_P1 0x01
  664. /*FLAG BIT END*/
  665. #define MBIC_DLI_AGC_Threshold_Default_H 0xFF
  666. #define MBIC_DLI_AGC_Threshold_Default_L 0xF6
  667. #define MBIC_DLI_Shutdown_Threshold_Default_H 0xFF
  668. #define MBIC_DLI_Shutdown_Threshold_Default_L 0xFF
  669. #define MBIC_DLI_Level_High_Threshold_default_H 0x00
  670. #define MBIC_DLI_Level_High_Threshold_default_L 0x07
  671. #define MBIC_DLI_Level_Low_Threshold_default_H 0xFF
  672. #define MBIC_DLI_Level_Low_Threshold_default_L 0xD5
  673. #define MBIC_ULO_Level_High_Threshold_Default_H 0xFF
  674. #define MBIC_ULO_Level_High_Threshold_Default_L 0xEE
  675. #define MBIC_Temp_High_Threshold_Default 0x50
  676. #define MBIC_ULO_ALC_Threshold_Default_H 0xFF
  677. #define MBIC_ULO_ALC_Threshold_Default_L 0xD8
  678. #define MBIC_ULO_Shutdown_Threshold_Default_H 0xFF
  679. #define MBIC_ULO_Shutdown_Threshold_Default_L 0xF0
  680. #define HIDDENATTEN 5 * 10
  681. typedef enum{
  682. ENVIRONMENT = 0,
  683. DL1,
  684. DL2,
  685. UL1,
  686. UL2,
  687. MAX_ALARM_Len,
  688. }AlarmList;
  689. typedef struct{
  690. uint8_t bluecell_User_DL1_H; uint8_t bluecell_User_DL1_L;
  691. uint8_t bluecell_User_DL2_H; uint8_t bluecell_User_DL2_L;
  692. uint8_t bluecell_User_DL3_H; uint8_t bluecell_User_DL3_L;
  693. uint8_t bluecell_User_DL4_H; uint8_t bluecell_User_DL4_L;
  694. uint8_t bluecell_User_UL1_H; uint8_t bluecell_User_UL1_L;
  695. uint8_t bluecell_User_UL2_H; uint8_t bluecell_User_UL2_L;
  696. uint8_t bluecell_User_UL3_H; uint8_t bluecell_User_UL3_L;
  697. uint8_t bluecell_User_UL4_H; uint8_t bluecell_User_UL4_L;
  698. }USER_ATTEN_st;
  699. typedef enum{
  700. MBIC_BOOT_MARK = 0,
  701. MBIC_BOOT_TYPE = 9 ,
  702. MBIC_BOOT_FILE_TYPE= 10,
  703. MBIC_BOOT_VERSION = 11,
  704. MBIC_BOOT_FILENAME = 14,
  705. MBIC_BOOT_CREATION_TIME= 55,
  706. MBIC_BOOT_LENGTH = 61,
  707. MBIC_BOOT_CRC =65,
  708. MBIC_BOOT_RESERVED = 69,
  709. MBIC_BOOT_DATA = 128,
  710. }HFR_BootLoader_Index_;
  711. typedef enum{
  712. HFR_BANK1 = 1,
  713. HFR_BANK2 = 2,
  714. HFR_FACTORY = 3,
  715. }HFR_BootBankIndex_;
  716. typedef enum{
  717. HFR_BANK1_SEL = 1,
  718. HFR_BANK2_SEL = 2,
  719. HFR_AUTO_SEL = 3,
  720. }HFR_BootSelIndex_;
  721. typedef struct{
  722. uint8_t bluecell_header;
  723. uint8_t bluecell_type;
  724. uint8_t bluecell_length;
  725. uint8_t bluecell_crcindex;
  726. uint8_t Selftest1;
  727. uint8_t Selftest2;
  728. uint8_t Selftest3;
  729. uint8_t Selftest4;
  730. uint8_t ATT_DL1_PATH;
  731. uint8_t ATT_DL2_PATH;
  732. uint8_t ATT_DL3_PATH;
  733. uint8_t ATT_DL4_PATH;
  734. uint8_t ATT_UL1_PATH;
  735. uint8_t ATT_UL2_PATH;
  736. uint8_t ATT_UL3_PATH;
  737. uint8_t ATT_UL4_PATH;
  738. uint8_t ATT_DL1_H;
  739. uint8_t ATT_DL1_L;
  740. uint8_t ATT_DL2_H;
  741. uint8_t ATT_DL2_L;
  742. uint8_t ATT_DL3_H;
  743. uint8_t ATT_DL3_L;
  744. uint8_t ATT_DL4_H;
  745. uint8_t ATT_DL4_L;
  746. uint8_t ATT_UL1_H;
  747. uint8_t ATT_UL1_L;
  748. uint8_t ATT_UL2_H;
  749. uint8_t ATT_UL2_L;
  750. uint8_t ATT_UL3_H;
  751. uint8_t ATT_UL3_L;
  752. uint8_t ATT_UL4_H;
  753. uint8_t ATT_UL4_L;
  754. uint8_t ULO_P1_Level1_H;
  755. uint8_t ULO_P1_Level1_L;
  756. uint8_t ULO_P2_Level2_H;
  757. uint8_t ULO_P2_Level2_L;
  758. uint8_t ULO_P3_Level3_H;
  759. uint8_t ULO_P3_Level3_L;
  760. uint8_t ULO_P4_Level4_H;
  761. uint8_t ULO_P4_Level4_L;
  762. uint8_t DLI_P1_Level1_H;
  763. uint8_t DLI_P1_Level1_L;
  764. uint8_t DLI_P2_Level2_H;
  765. uint8_t DLI_P2_Level2_L;
  766. uint8_t DLI_P3_Level3_H;
  767. uint8_t DLI_P3_Level3_L;
  768. uint8_t DLI_P4_Level4_H;
  769. uint8_t DLI_P4_Level4_L;
  770. int8_t DET_TEMP;
  771. uint8_t DLI_AGC_ON_OFF;
  772. uint8_t ULO_ALC_ON_OFF;
  773. uint8_t ULO_Level1_H;
  774. uint8_t ULO_Level1_L;
  775. uint8_t ULO_Level2_H;
  776. uint8_t ULO_Level2_L;
  777. uint8_t ULO_Level3_H;
  778. uint8_t ULO_Level3_L;
  779. uint8_t ULO_Level4_H;
  780. uint8_t ULO_Level4_L;
  781. uint8_t DLI_Level1_H;
  782. uint8_t DLI_Level1_L;
  783. uint8_t DLI_Level2_H;
  784. uint8_t DLI_Level2_L;
  785. uint8_t DLI_Level3_H;
  786. uint8_t DLI_Level3_L;
  787. uint8_t DLI_Level4_H;
  788. uint8_t DLI_Level4_L;
  789. uint8_t ULO_ALC_Threshold_H;
  790. uint8_t ULO_ALC_Threshold_L;
  791. uint8_t bluecell_User_DL1_H;
  792. uint8_t bluecell_User_DL1_L;
  793. uint8_t bluecell_User_DL2_H;
  794. uint8_t bluecell_User_DL2_L;
  795. uint8_t bluecell_User_DL3_H;
  796. uint8_t bluecell_User_DL3_L;
  797. uint8_t bluecell_User_DL4_H;
  798. uint8_t bluecell_User_DL4_L;
  799. uint8_t bluecell_User_UL1_H;
  800. uint8_t bluecell_User_UL1_L;
  801. uint8_t bluecell_User_UL2_H;
  802. uint8_t bluecell_User_UL2_L;
  803. uint8_t bluecell_User_UL3_H;
  804. uint8_t bluecell_User_UL3_L;
  805. uint8_t bluecell_User_UL4_H;
  806. uint8_t bluecell_User_UL4_L;
  807. uint8_t bluecell_User_TEMP_H;
  808. uint8_t bluecell_User_TEMP_L;
  809. int8_t bluecell_User_TEMP_OFFSET;
  810. int8_t Temp_High_Threshold;
  811. int8_t Temp_High_Threshold_Default;
  812. uint8_t DLI_Level_High_Threshold_H;
  813. uint8_t DLI_Level_High_Threshold_L;
  814. uint8_t DLI_Level_Low_Threshold_H;
  815. uint8_t DLI_Level_Low_Threshold_L;
  816. uint8_t DLI_Level_High_Low_Threshold_default;
  817. uint8_t ALARM_TEMP_HIGH; //bit
  818. uint8_t ALARM_DLI_Level;
  819. uint8_t ALARM_DLI_SHTUTDOWN;
  820. uint8_t ALARM_DLI_AGC_Alarm;
  821. uint8_t ALARM_ULO_ALC_Alarm;
  822. uint8_t ALARM_ULO_Level;
  823. uint8_t ALARM_ULO_SHTUTDOWN;
  824. uint8_t ALARM_MASK1;
  825. uint8_t ALARM_MASK2;
  826. uint8_t ALARM_MASK3;
  827. uint8_t ALARM_MASK4;
  828. uint8_t ALARM_MASK5;
  829. uint8_t ALARM_TESTMODE;
  830. uint8_t ALARM_Test_Dummy1;
  831. uint8_t ALARM_Test_Dummy2;
  832. uint8_t ALARM_Test_Dummy3;
  833. uint8_t ALARM_Test_Dummy4;
  834. uint8_t ALARM_Test_Dummy5;
  835. uint8_t CPUVERSION1;
  836. uint8_t CPUVERSION2;
  837. uint8_t CPUVERSION3;
  838. uint8_t CPU_Current_Bank;
  839. uint8_t CPU_Bank_Select;//Reboot_by;
  840. uint8_t CPU_Bank1_Image_Version1;
  841. uint8_t CPU_Bank1_Image_Version2;
  842. uint8_t CPU_Bank1_Image_Version3;
  843. uint8_t CPU_Bank1_Image_BuildTime1;
  844. uint8_t CPU_Bank1_Image_BuildTime2;
  845. uint8_t CPU_Bank1_Image_BuildTime3;
  846. uint8_t CPU_Bank1_Image_BuildTime4;
  847. uint8_t CPU_Bank1_Image_BuildTime5;
  848. uint8_t CPU_Bank1_Image_BuildTime6;
  849. uint8_t CPU_Bank1_Image_Name[32];
  850. uint8_t CPU_Bank2_Image_Version1;
  851. uint8_t CPU_Bank2_Image_Version2;
  852. uint8_t CPU_Bank2_Image_Version3;
  853. uint8_t CPU_Bank2_Image_BuildTime1;
  854. uint8_t CPU_Bank2_Image_BuildTime2;
  855. uint8_t CPU_Bank2_Image_BuildTime3;
  856. uint8_t CPU_Bank2_Image_BuildTime4;
  857. uint8_t CPU_Bank2_Image_BuildTime5;
  858. uint8_t CPU_Bank2_Image_BuildTime6;
  859. uint8_t CPU_Bank2_Image_Name[32];
  860. uint8_t S_W_Reset;
  861. uint8_t Factory_Set_Initialization;
  862. uint8_t Temp_High_Alarm;
  863. uint8_t LED_TEST;
  864. uint8_t NODE;
  865. uint8_t Type;
  866. uint8_t PCB_Version[2];
  867. uint8_t Serial_Number[20]; // INDEX : 20
  868. uint8_t Manufacture;
  869. uint8_t Manufacture_Date[3];
  870. uint8_t Freq_ID;
  871. uint8_t Carrier_ID;
  872. uint8_t Carrier_ON_OFF;
  873. uint8_t DLI_Level_High_Alarm1;
  874. uint8_t DLI_Level_High_Alarm2;
  875. uint8_t DLI_Level_High_Alarm3;
  876. uint8_t DLI_Level_High_Alarm4;
  877. uint8_t DLI_Level_Low_Alarm1;
  878. uint8_t DLI_Level_Low_Alarm2;
  879. uint8_t DLI_Level_Low_Alarm3;
  880. uint8_t DLI_Level_Low_Alarm4;
  881. uint8_t DLI_FRBT_Atten1_H;
  882. uint8_t DLI_FRBT_Atten1_L;
  883. uint8_t DLI_FRBT_Atten2_H;
  884. uint8_t DLI_FRBT_Atten2_L;
  885. uint8_t DLI_FRBT_Atten3_H;
  886. uint8_t DLI_FRBT_Atten3_L;
  887. uint8_t DLI_FRBT_Atten4_H;
  888. uint8_t DLI_FRBT_Atten4_L;
  889. uint8_t DLI_FRBT_D_Day;
  890. uint8_t DLI_FRBT_Status;
  891. uint8_t DLI_AGC_Threshold_H;
  892. uint8_t DLI_AGC_Threshold_L;
  893. uint8_t DLI_AGC_Threshold_default;
  894. uint8_t DLI_Shutdown_ON_OFF;
  895. uint8_t DLI_Shutdown_Threshold_H;
  896. uint8_t DLI_Shutdown_Threshold_L;
  897. uint8_t DLI_Shutdown_Threshold_Default;
  898. uint8_t DLI_Shutdown_Retry_Count1;
  899. uint8_t DLI_Shutdown_Retry_Count2;
  900. uint8_t DLI_Shutdown_Retry_Count3;
  901. uint8_t DLI_Shutdown_Retry_Count4;
  902. uint8_t DLI_AGC_Alarm1;
  903. uint8_t DLI_AGC_Alarm2;
  904. uint8_t DLI_AGC_Alarm3;
  905. uint8_t DLI_AGC_Alarm4;
  906. uint8_t DLI_Shutdown_Alarm1;
  907. uint8_t DLI_Shutdown_Alarm2;
  908. uint8_t DLI_Shutdown_Alarm3;
  909. uint8_t DLI_Shutdown_Alarm4;
  910. uint8_t ULO_Level_High_Threshold_H;
  911. uint8_t ULO_Level_High_Threshold_L;
  912. uint8_t ULO_Level_High_Threshold_default;
  913. uint8_t ULO_Level_High_Alarm1;
  914. uint8_t ULO_Level_High_Alarm2;
  915. uint8_t ULO_Level_High_Alarm3;
  916. uint8_t ULO_Level_High_Alarm4;
  917. uint8_t ULO_ALC_Threshold_Default;
  918. uint8_t ULO_Shutdown_ON_OFF;
  919. uint8_t ULO_Shutdown_Threshold_H;
  920. uint8_t ULO_Shutdown_Threshold_L;
  921. uint8_t ULO_Shutdown_Threshold_Default;
  922. uint8_t ULO_Shutdown_Retry_Count1;
  923. uint8_t ULO_Shutdown_Retry_Count2;
  924. uint8_t ULO_Shutdown_Retry_Count3;
  925. uint8_t ULO_Shutdown_Retry_Count4;
  926. uint8_t ULO_ALC_Alarm1;
  927. uint8_t ULO_ALC_Alarm2;
  928. uint8_t ULO_ALC_Alarm3;
  929. uint8_t ULO_ALC_Alarm4;
  930. uint8_t ULO_Shutdown_Alarm1;
  931. uint8_t ULO_Shutdown_Alarm2;
  932. uint8_t ULO_Shutdown_Alarm3;
  933. uint8_t ULO_Shutdown_Alarm4;
  934. uint8_t MBIC_ULO_ALC_Atten1_H;
  935. uint8_t MBIC_ULO_ALC_Atten1_L;
  936. uint8_t MBIC_ULO_ALC_Atten2_H;
  937. uint8_t MBIC_ULO_ALC_Atten2_L;
  938. uint8_t MBIC_ULO_ALC_Atten3_H;
  939. uint8_t MBIC_ULO_ALC_Atten3_L;
  940. uint8_t MBIC_ULO_ALC_Atten4_H;
  941. uint8_t MBIC_ULO_ALC_Atten4_L;
  942. int8_t MBIC_DLI_P1_Level_Table_Ref;
  943. int8_t MBIC_DLI_P2_Level_Table_Ref;
  944. int8_t MBIC_DLI_P3_Level_Table_Ref;
  945. int8_t MBIC_DLI_P4_Level_Table_Ref;
  946. int8_t MBIC_ULO_P1_Level_Table_Ref;
  947. int8_t MBIC_ULO_P2_Level_Table_Ref;
  948. int8_t MBIC_ULO_P3_Level_Table_Ref;
  949. int8_t MBIC_ULO_P4_Level_Table_Ref;
  950. int8_t MBIC_TEMP_DL_P1_Level_Table_Ref;
  951. int8_t MBIC_TEMP_DL_P2_Level_Table_Ref;
  952. int8_t MBIC_TEMP_DL_P3_Level_Table_Ref;
  953. int8_t MBIC_TEMP_DL_P4_Level_Table_Ref;
  954. int8_t MBIC_TEMP_UL_P1_Level_Table_Ref;
  955. int8_t MBIC_TEMP_UL_P2_Level_Table_Ref;
  956. int8_t MBIC_TEMP_UL_P3_Level_Table_Ref;
  957. int8_t MBIC_TEMP_UL_P4_Level_Table_Ref;
  958. int8_t MBIC_DLI_P1_Table_Length;
  959. int8_t MBIC_DLI_P2_Table_Length;
  960. int8_t MBIC_DLI_P3_Table_Length;
  961. int8_t MBIC_DLI_P4_Table_Length;
  962. int8_t MBIC_ULO_P1_Table_Length;
  963. int8_t MBIC_ULO_P2_Table_Length;
  964. int8_t MBIC_ULO_P3_Table_Length;
  965. int8_t MBIC_ULO_P4_Table_Length;
  966. int8_t MBIC_DLI_P1_Level_Table_Length;
  967. int8_t MBIC_DLI_P2_Level_Table_Length;
  968. int8_t MBIC_DLI_P3_Level_Table_Length;
  969. int8_t MBIC_DLI_P4_Level_Table_Length;
  970. int8_t MBIC_ULO_P1_Level_Table_Length;
  971. int8_t MBIC_ULO_P2_Level_Table_Length;
  972. int8_t MBIC_ULO_P3_Level_Table_Length;
  973. int8_t MBIC_ULO_P4_Level_Table_Length;
  974. int8_t MBIC_TEMP_DL_P1_Level_Table_Length;
  975. int8_t MBIC_TEMP_DL_P2_Level_Table_Length;
  976. int8_t MBIC_TEMP_DL_P3_Level_Table_Length;
  977. int8_t MBIC_TEMP_DL_P4_Level_Table_Length;
  978. int8_t MBIC_TEMP_UL_P1_Level_Table_Length;
  979. int8_t MBIC_TEMP_UL_P2_Level_Table_Length;
  980. int8_t MBIC_TEMP_UL_P3_Level_Table_Length;
  981. int8_t MBIC_TEMP_UL_P4_Level_Table_Length;
  982. uint8_t DL_Det_ALL_Offset;
  983. uint8_t MBIC_Download_Auto_Restart_Set;
  984. uint8_t Path_TempSave_Bit;/*DL1 / DL 2 /DL3 /DL4 /UL1/UL2/UL3/UL4*/
  985. uint8_t Path_TempShutdown_Set;/*DL1 / DL 2 /DL3 /DL4 /UL1/UL2/UL3/UL4*/
  986. int8_t UL_Det_Path_Offset[1];
  987. uint8_t bluecell_crc_H;
  988. uint8_t bluecell_crc_L;
  989. uint8_t bluecell_etx;
  990. }BLUESTATUS_st;
  991. /*ssizeof 320 byte*/
  992. typedef struct{
  993. uint8_t Table_0_0_dBm;
  994. uint8_t Table_0_5_dBm;
  995. uint8_t Table_1_0_dBm;
  996. uint8_t Table_1_5_dBm;
  997. uint8_t Table_2_0_dBm;
  998. uint8_t Table_2_5_dBm;
  999. uint8_t Table_3_0_dBm;
  1000. uint8_t Table_3_5_dBm;
  1001. uint8_t Table_4_0_dBm;
  1002. uint8_t Table_4_5_dBm;
  1003. uint8_t Table_5_0_dBm;
  1004. uint8_t Table_5_5_dBm;
  1005. uint8_t Table_6_0_dBm;
  1006. uint8_t Table_6_5_dBm;
  1007. uint8_t Table_7_0_dBm;
  1008. uint8_t Table_7_5_dBm;
  1009. uint8_t Table_8_0_dBm;
  1010. uint8_t Table_8_5_dBm;
  1011. uint8_t Table_9_0_dBm;
  1012. uint8_t Table_9_5_dBm;
  1013. uint8_t Table_10_0_dBm;
  1014. uint8_t Table_10_5_dBm;
  1015. uint8_t Table_11_0_dBm;
  1016. uint8_t Table_11_5_dBm;
  1017. uint8_t Table_12_0_dBm;
  1018. uint8_t Table_12_5_dBm;
  1019. uint8_t Table_13_0_dBm;
  1020. uint8_t Table_13_5_dBm;
  1021. uint8_t Table_14_0_dBm;
  1022. uint8_t Table_14_5_dBm;
  1023. uint8_t Table_15_0_dBm;
  1024. uint8_t Table_15_5_dBm;
  1025. uint8_t Table_16_0_dBm;
  1026. uint8_t Table_16_5_dBm;
  1027. uint8_t Table_17_0_dBm;
  1028. uint8_t Table_17_5_dBm;
  1029. uint8_t Table_18_0_dBm;
  1030. uint8_t Table_18_5_dBm;
  1031. uint8_t Table_19_0_dBm;
  1032. uint8_t Table_19_5_dBm;
  1033. uint8_t Table_20_0_dBm;
  1034. uint8_t Table_20_5_dBm;
  1035. uint8_t Table_21_0_dBm;
  1036. uint8_t Table_21_5_dBm;
  1037. uint8_t Table_22_0_dBm;
  1038. uint8_t Table_22_5_dBm;
  1039. uint8_t Table_23_0_dBm;
  1040. uint8_t Table_23_5_dBm;
  1041. uint8_t Table_24_0_dBm;
  1042. uint8_t Table_24_5_dBm;
  1043. uint8_t Table_25_0_dBm;
  1044. uint8_t Table_25_5_dBm;
  1045. uint8_t Table_26_0_dBm;
  1046. uint8_t Table_26_5_dBm;
  1047. uint8_t Table_27_0_dBm;
  1048. uint8_t Table_27_5_dBm;
  1049. uint8_t Table_28_0_dBm;
  1050. uint8_t Table_28_5_dBm;
  1051. uint8_t Table_29_0_dBm;
  1052. uint8_t Table_29_5_dBm;
  1053. uint8_t Table_30_0_dBm;
  1054. uint8_t Table_30_5_dBm;
  1055. uint8_t Table_31_0_dBm;
  1056. uint8_t Table_31_5_dBm;
  1057. uint8_t Table_xx_x_1_dBm;
  1058. uint8_t Table_xx_x_2_dBm;
  1059. uint8_t Table_xx_x_3_dBm;
  1060. uint8_t Table_xx_x_4_dBm;
  1061. uint8_t Table_xx_x_5_dBm;
  1062. uint8_t Table_xx_x_6_dBm;
  1063. uint8_t Table_xx_x_7_dBm;
  1064. uint8_t Table_xx_x_8_dBm;
  1065. uint8_t Table_xx_x_9_dBm;
  1066. uint8_t Table_xx_x_10_dBm;
  1067. uint8_t Table_xx_x_11_dBm;
  1068. uint8_t Table_xx_x_12_dBm;
  1069. uint8_t Table_xx_x_13_dBm;
  1070. uint8_t Table_xx_x_14_dBm;
  1071. uint8_t Table_xx_x_15_dBm;
  1072. uint8_t Table_xx_x_16_dBm;
  1073. uint8_t Table_xx_x_17_dBm;
  1074. uint8_t Table_xx_x_18_dBm;
  1075. uint8_t Table_xx_x_19_dBm;
  1076. uint8_t Table_xx_x_20_dBm;
  1077. uint8_t Table_xx_x_21_dBm;
  1078. uint8_t Table_xx_x_22_dBm;
  1079. uint8_t Table_xx_x_23_dBm;
  1080. uint8_t Table_xx_x_24_dBm;
  1081. uint8_t Table_xx_x_25_dBm;
  1082. uint8_t Table_xx_x_26_dBm;
  1083. uint8_t Table_xx_x_27_dBm;
  1084. uint8_t Table_xx_x_28_dBm;
  1085. uint8_t Table_xx_x_29_dBm;
  1086. uint8_t Table_xx_x_30_dBm;
  1087. int8_t Table_Ref;
  1088. int8_t Table_Length;
  1089. }ATT_TABLE_st;
  1090. typedef struct{
  1091. uint8_t Table_Det5_dBm_H ;
  1092. uint8_t Table_Det5_dBm_L ;
  1093. uint8_t Table_Det4_dBm_H ;
  1094. uint8_t Table_Det4_dBm_L ;
  1095. uint8_t Table_Det3_dBm_H ;
  1096. uint8_t Table_Det3_dBm_L ;
  1097. uint8_t Table_Det2_dBm_H ;
  1098. uint8_t Table_Det2_dBm_L ;
  1099. uint8_t Table_Det1_dBm_H ;
  1100. uint8_t Table_Det1_dBm_L ;
  1101. uint8_t Table_Det0_dBm_H ;
  1102. uint8_t Table_Det0_dBm_L ;
  1103. uint8_t Table_Det_1_dBm_H ;
  1104. uint8_t Table_Det_1_dBm_L ;
  1105. uint8_t Table_Det_2_dBm_H ;
  1106. uint8_t Table_Det_2_dBm_L ;
  1107. uint8_t Table_Det_3_dBm_H ;
  1108. uint8_t Table_Det_3_dBm_L ;
  1109. uint8_t Table_Det_4_dBm_H ;
  1110. uint8_t Table_Det_4_dBm_L ;
  1111. uint8_t Table_Det_5_dBm_H ;
  1112. uint8_t Table_Det_5_dBm_L ;
  1113. uint8_t Table_Det_6_dBm_H ;
  1114. uint8_t Table_Det_6_dBm_L ;
  1115. uint8_t Table_Det_7_dBm_H ;
  1116. uint8_t Table_Det_7_dBm_L ;
  1117. uint8_t Table_Det_8_dBm_H ;
  1118. uint8_t Table_Det_8_dBm_L ;
  1119. uint8_t Table_Det_9_dBm_H ;
  1120. uint8_t Table_Det_9_dBm_L ;
  1121. uint8_t Table_Det_10_dBm_H ;
  1122. uint8_t Table_Det_10_dBm_L ;
  1123. uint8_t Table_Det_11_dBm_H ;
  1124. uint8_t Table_Det_11_dBm_L ;
  1125. uint8_t Table_Det_12_dBm_H ;
  1126. uint8_t Table_Det_12_dBm_L ;
  1127. uint8_t Table_Det_13_dBm_H ;
  1128. uint8_t Table_Det_13_dBm_L ;
  1129. uint8_t Table_Det_14_dBm_H ;
  1130. uint8_t Table_Det_14_dBm_L ;
  1131. uint8_t Table_Det_15_dBm_H ;
  1132. uint8_t Table_Det_15_dBm_L ;
  1133. uint8_t Table_Det_16_dBm_H ;
  1134. uint8_t Table_Det_16_dBm_L ;
  1135. uint8_t Table_Det_17_dBm_H ;
  1136. uint8_t Table_Det_17_dBm_L ;
  1137. uint8_t Table_Det_18_dBm_H ;
  1138. uint8_t Table_Det_18_dBm_L ;
  1139. uint8_t Table_Det_19_dBm_H ;
  1140. uint8_t Table_Det_19_dBm_L ;
  1141. uint8_t Table_Det_20_dBm_H ;
  1142. uint8_t Table_Det_20_dBm_L ;
  1143. uint8_t Table_Det_21_dBm_H ;
  1144. uint8_t Table_Det_21_dBm_L ;
  1145. uint8_t Table_Det_22_dBm_H ;
  1146. uint8_t Table_Det_22_dBm_L ;
  1147. uint8_t Table_Det_23_dBm_H ;
  1148. uint8_t Table_Det_23_dBm_L ;
  1149. uint8_t Table_Det_24_dBm_H ;
  1150. uint8_t Table_Det_24_dBm_L ;
  1151. uint8_t Table_Det_25_dBm_H ;
  1152. uint8_t Table_Det_25_dBm_L ;
  1153. uint8_t Table_Det_xx1_dBm_H ;
  1154. uint8_t Table_Det_xx1_dBm_L ;
  1155. uint8_t Table_Det_xx2_dBm_H ;
  1156. uint8_t Table_Det_xx2_dBm_L ;
  1157. uint8_t Table_Det_xx3_dBm_H ;
  1158. uint8_t Table_Det_xx3_dBm_L ;
  1159. uint8_t Table_Det_xx4_dBm_H ;
  1160. uint8_t Table_Det_xx4_dBm_L ;
  1161. uint8_t Table_Det_xx5_dBm_H ;
  1162. uint8_t Table_Det_xx5_dBm_L ;
  1163. uint8_t Table_Det_xx6_dBm_H ;
  1164. uint8_t Table_Det_xx6_dBm_L ;
  1165. uint8_t Table_Det_xx7_dBm_H ;
  1166. uint8_t Table_Det_xx7_dBm_L ;
  1167. uint8_t Table_Det_xx8_dBm_H ;
  1168. uint8_t Table_Det_xx8_dBm_L ;
  1169. uint8_t Table_Det_xx9_dBm_H ;
  1170. uint8_t Table_Det_xx9_dBm_L ;
  1171. uint8_t Table_Det_xx10_dBm_H ;
  1172. uint8_t Table_Det_xx10_dBm_L ;
  1173. uint8_t Table_Det_xx11_dBm_H ;
  1174. uint8_t Table_Det_xx11_dBm_L ;
  1175. uint8_t Table_Det_xx12_dBm_H ;
  1176. uint8_t Table_Det_xx12_dBm_L ;
  1177. uint8_t Table_Det_xx13_dBm_H ;
  1178. uint8_t Table_Det_xx13_dBm_L ;
  1179. uint8_t Table_Det_xx14_dBm_H ;
  1180. uint8_t Table_Det_xx14_dBm_L ;
  1181. uint8_t Table_Det_xx15_dBm_H ;
  1182. uint8_t Table_Det_xx15_dBm_L ;
  1183. uint8_t Table_Det_xx16_dBm_H ;
  1184. uint8_t Table_Det_xx16_dBm_L ;
  1185. uint8_t Table_Det_xx17_dBm_H ;
  1186. uint8_t Table_Det_xx17_dBm_L ;
  1187. uint8_t Table_Det_xx18_dBm_H ;
  1188. uint8_t Table_Det_xx18_dBm_L ;
  1189. uint8_t Table_Det_xx19_dBm_H ;
  1190. uint8_t Table_Det_xx19_dBm_L ;
  1191. uint8_t Table_Det_xx20_dBm_H ;
  1192. uint8_t Table_Det_xx20_dBm_L ;
  1193. uint8_t Table_Det_xx21_dBm_H ;
  1194. uint8_t Table_Det_xx21_dBm_L ;
  1195. uint8_t Table_Det_xx22_dBm_H ;
  1196. uint8_t Table_Det_xx22_dBm_L ;
  1197. uint8_t Table_Det_xx23_dBm_H ;
  1198. uint8_t Table_Det_xx23_dBm_L ;
  1199. uint8_t Table_Det_xx24_dBm_H ;
  1200. uint8_t Table_Det_xx24_dBm_L ;
  1201. uint8_t Table_Det_xx25_dBm_H ;
  1202. uint8_t Table_Det_xx25_dBm_L ;
  1203. uint8_t Table_Det_xx26_dBm_H ;
  1204. uint8_t Table_Det_xx26_dBm_L ;
  1205. uint8_t Table_Det_xx27_dBm_H ;
  1206. uint8_t Table_Det_xx27_dBm_L ;
  1207. uint8_t Table_Det_xx28_dBm_H ;
  1208. uint8_t Table_Det_xx28_dBm_L ;
  1209. uint8_t Table_Det_xx29_dBm_H ;
  1210. uint8_t Table_Det_xx29_dBm_L ;
  1211. uint8_t Table_Det_xx30_dBm_H ;
  1212. uint8_t Table_Det_xx30_dBm_L ;
  1213. uint8_t Table_Det_xx31_dBm_H ;
  1214. uint8_t Table_Det_xx31_dBm_L ;
  1215. uint8_t Table_Det_xx32_dBm_H ;
  1216. uint8_t Table_Det_xx32_dBm_L ;
  1217. uint8_t Table_Det_xx33_dBm_H ;
  1218. uint8_t Table_Det_xx33_dBm_L ;
  1219. uint8_t Table_Det_xx34_dBm_H ;
  1220. uint8_t Table_Det_xx34_dBm_L ;
  1221. uint8_t Table_Det_xx35_dBm_H ;
  1222. uint8_t Table_Det_xx35_dBm_L ;
  1223. uint8_t Table_Det_xx36_dBm_H ;
  1224. uint8_t Table_Det_xx36_dBm_L ;
  1225. uint8_t Table_Det_xx37_dBm_H ;
  1226. uint8_t Table_Det_xx37_dBm_L ;
  1227. uint8_t Table_Det_xx38_dBm_H ;
  1228. uint8_t Table_Det_xx38_dBm_L ;
  1229. uint8_t Table_Det_xx39_dBm_H ;
  1230. uint8_t Table_Det_xx39_dBm_L ;
  1231. uint8_t Table_Det_xx40_dBm_H ;
  1232. uint8_t Table_Det_xx40_dBm_L ;
  1233. uint8_t Table_Det_xx41_dBm_H ;
  1234. uint8_t Table_Det_xx41_dBm_L ;
  1235. uint8_t Table_Det_xx42_dBm_H ;
  1236. uint8_t Table_Det_xx42_dBm_L ;
  1237. uint8_t Table_Det_xx43_dBm_H ;
  1238. uint8_t Table_Det_xx43_dBm_L ;
  1239. uint8_t Table_Det_xx44_dBm_H ;
  1240. uint8_t Table_Det_xx44_dBm_L ;
  1241. uint8_t Table_Det_xx45_dBm_H ;
  1242. uint8_t Table_Det_xx45_dBm_L ;
  1243. uint8_t Table_Det_xx46_dBm_H ;
  1244. uint8_t Table_Det_xx46_dBm_L ;
  1245. uint8_t Table_Det_xx47_dBm_H ;
  1246. uint8_t Table_Det_xx47_dBm_L ;
  1247. uint8_t Table_Det_xx48_dBm_H ;
  1248. uint8_t Table_Det_xx48_dBm_L ;
  1249. int8_t Table_Ref ;
  1250. int8_t Table_Length ;
  1251. }DET_TABLEDL_st;
  1252. typedef struct{
  1253. uint8_t Table_Det_15_dBm_H ;
  1254. uint8_t Table_Det_15_dBm_L ;
  1255. uint8_t Table_Det_16_dBm_H ;
  1256. uint8_t Table_Det_16_dBm_L ;
  1257. uint8_t Table_Det_17_dBm_H ;
  1258. uint8_t Table_Det_17_dBm_L ;
  1259. uint8_t Table_Det_18_dBm_H ;
  1260. uint8_t Table_Det_18_dBm_L ;
  1261. uint8_t Table_Det_19_dBm_H ;
  1262. uint8_t Table_Det_19_dBm_L ;
  1263. uint8_t Table_Det_20_dBm_H ;
  1264. uint8_t Table_Det_20_dBm_L ;
  1265. uint8_t Table_Det_21_dBm_H ;
  1266. uint8_t Table_Det_21_dBm_L ;
  1267. uint8_t Table_Det_22_dBm_H ;
  1268. uint8_t Table_Det_22_dBm_L ;
  1269. uint8_t Table_Det_23_dBm_H ;
  1270. uint8_t Table_Det_23_dBm_L ;
  1271. uint8_t Table_Det_24_dBm_H ;
  1272. uint8_t Table_Det_24_dBm_L ;
  1273. uint8_t Table_Det_25_dBm_H ;
  1274. uint8_t Table_Det_25_dBm_L ;
  1275. uint8_t Table_Det_26_dBm_H ;
  1276. uint8_t Table_Det_26_dBm_L ;
  1277. uint8_t Table_Det_27_dBm_H ;
  1278. uint8_t Table_Det_27_dBm_L ;
  1279. uint8_t Table_Det_28_dBm_H ;
  1280. uint8_t Table_Det_28_dBm_L ;
  1281. uint8_t Table_Det_29_dBm_H ;
  1282. uint8_t Table_Det_29_dBm_L ;
  1283. uint8_t Table_Det_30_dBm_H ;
  1284. uint8_t Table_Det_30_dBm_L ;
  1285. uint8_t Table_Det_31_dBm_H ;
  1286. uint8_t Table_Det_31_dBm_L ;
  1287. uint8_t Table_Det_32_dBm_H ;
  1288. uint8_t Table_Det_32_dBm_L ;
  1289. uint8_t Table_Det_33_dBm_H ;
  1290. uint8_t Table_Det_33_dBm_L ;
  1291. uint8_t Table_Det_34_dBm_H ;
  1292. uint8_t Table_Det_34_dBm_L ;
  1293. uint8_t Table_Det_35_dBm_H ;
  1294. uint8_t Table_Det_35_dBm_L ;
  1295. uint8_t Table_Det_36_dBm_H ;
  1296. uint8_t Table_Det_36_dBm_L ;
  1297. uint8_t Table_Det_37_dBm_H ;
  1298. uint8_t Table_Det_37_dBm_L ;
  1299. uint8_t Table_Det_38_dBm_H ;
  1300. uint8_t Table_Det_38_dBm_L ;
  1301. uint8_t Table_Det_39_dBm_H ;
  1302. uint8_t Table_Det_39_dBm_L ;
  1303. uint8_t Table_Det_40_dBm_H ;
  1304. uint8_t Table_Det_40_dBm_L ;
  1305. uint8_t Table_Det_41_dBm_H ;
  1306. uint8_t Table_Det_41_dBm_L ;
  1307. uint8_t Table_Det_42_dBm_H ;
  1308. uint8_t Table_Det_42_dBm_L ;
  1309. uint8_t Table_Det_43_dBm_H ;
  1310. uint8_t Table_Det_43_dBm_L ;
  1311. uint8_t Table_Det_44_dBm_H ;
  1312. uint8_t Table_Det_44_dBm_L ;
  1313. uint8_t Table_Det_45_dBm_H ;
  1314. uint8_t Table_Det_45_dBm_L ;
  1315. uint8_t Table_Det_46_dBm_H ;
  1316. uint8_t Table_Det_46_dBm_L ;
  1317. uint8_t Table_Det_47_dBm_H ;
  1318. uint8_t Table_Det_47_dBm_L ;
  1319. uint8_t Table_Det_48_dBm_H ;
  1320. uint8_t Table_Det_48_dBm_L ;
  1321. uint8_t Table_Det_49_dBm_H ;
  1322. uint8_t Table_Det_49_dBm_L ;
  1323. uint8_t Table_Det_50_dBm_H ;
  1324. uint8_t Table_Det_50_dBm_L ;
  1325. uint8_t Table_Det_51_dBm_H ;
  1326. uint8_t Table_Det_51_dBm_L ;
  1327. uint8_t Table_Det_52_dBm_H ;
  1328. uint8_t Table_Det_52_dBm_L ;
  1329. uint8_t Table_Det_53_dBm_H ;
  1330. uint8_t Table_Det_53_dBm_L ;
  1331. uint8_t Table_Det_54_dBm_H ;
  1332. uint8_t Table_Det_54_dBm_L ;
  1333. uint8_t Table_Det_55_dBm_H ;
  1334. uint8_t Table_Det_55_dBm_L ;
  1335. uint8_t Table_Det_56_dBm_H ;
  1336. uint8_t Table_Det_56_dBm_L ;
  1337. uint8_t Table_Det_57_dBm_H ;
  1338. uint8_t Table_Det_57_dBm_L ;
  1339. uint8_t Table_Det_58_dBm_H ;
  1340. uint8_t Table_Det_58_dBm_L ;
  1341. uint8_t Table_Det_59_dBm_H ;
  1342. uint8_t Table_Det_59_dBm_L ;
  1343. uint8_t Table_Det_60_dBm_H ;
  1344. uint8_t Table_Det_60_dBm_L ;
  1345. uint8_t Table_Det_XX1_dBm_H ;
  1346. uint8_t Table_Det_XX1_dBm_L ;
  1347. uint8_t Table_Det_XX2_dBm_H ;
  1348. uint8_t Table_Det_XX2_dBm_L ;
  1349. uint8_t Table_Det_XX3_dBm_H ;
  1350. uint8_t Table_Det_XX3_dBm_L ;
  1351. uint8_t Table_Det_XX4_dBm_H ;
  1352. uint8_t Table_Det_XX4_dBm_L ;
  1353. uint8_t Table_Det_XX5_dBm_H ;
  1354. uint8_t Table_Det_XX5_dBm_L ;
  1355. uint8_t Table_Det_XX6_dBm_H ;
  1356. uint8_t Table_Det_XX6_dBm_L ;
  1357. uint8_t Table_Det_XX7_dBm_H ;
  1358. uint8_t Table_Det_XX7_dBm_L ;
  1359. uint8_t Table_Det_XX8_dBm_H ;
  1360. uint8_t Table_Det_XX8_dBm_L ;
  1361. uint8_t Table_Det_XX9_dBm_H ;
  1362. uint8_t Table_Det_XX9_dBm_L ;
  1363. uint8_t Table_Det_XX10_dBm_H ;
  1364. uint8_t Table_Det_XX10_dBm_L ;
  1365. uint8_t Table_Det_XX11_dBm_H ;
  1366. uint8_t Table_Det_XX11_dBm_L ;
  1367. uint8_t Table_Det_XX12_dBm_H ;
  1368. uint8_t Table_Det_XX12_dBm_L ;
  1369. uint8_t Table_Det_XX13_dBm_H ;
  1370. uint8_t Table_Det_XX13_dBm_L ;
  1371. uint8_t Table_Det_XX14_dBm_H ;
  1372. uint8_t Table_Det_XX14_dBm_L ;
  1373. uint8_t Table_Det_XX15_dBm_H ;
  1374. uint8_t Table_Det_XX15_dBm_L ;
  1375. uint8_t Table_Det_XX16_dBm_H ;
  1376. uint8_t Table_Det_XX16_dBm_L ;
  1377. uint8_t Table_Det_XX17_dBm_H ;
  1378. uint8_t Table_Det_XX17_dBm_L ;
  1379. uint8_t Table_Det_XX18_dBm_H ;
  1380. uint8_t Table_Det_XX18_dBm_L ;
  1381. uint8_t Table_Det_XX19_dBm_H ;
  1382. uint8_t Table_Det_XX19_dBm_L ;
  1383. uint8_t Table_Det_XX20_dBm_H ;
  1384. uint8_t Table_Det_XX20_dBm_L ;
  1385. uint8_t Table_Det_XX21_dBm_H ;
  1386. uint8_t Table_Det_XX21_dBm_L ;
  1387. uint8_t Table_Det_XX22_dBm_H ;
  1388. uint8_t Table_Det_XX22_dBm_L ;
  1389. uint8_t Table_Det_XX23_dBm_H ;
  1390. uint8_t Table_Det_XX23_dBm_L ;
  1391. uint8_t Table_Det_XX24_dBm_H ;
  1392. uint8_t Table_Det_XX24_dBm_L ;
  1393. uint8_t Table_Det_XX25_dBm_H ;
  1394. uint8_t Table_Det_XX25_dBm_L ;
  1395. uint8_t Table_Det_XX26_dBm_H ;
  1396. uint8_t Table_Det_XX26_dBm_L ;
  1397. uint8_t Table_Det_XX27_dBm_H ;
  1398. uint8_t Table_Det_XX27_dBm_L ;
  1399. uint8_t Table_Det_XX28_dBm_H ;
  1400. uint8_t Table_Det_XX28_dBm_L ;
  1401. uint8_t Table_Det_XX29_dBm_H ;
  1402. uint8_t Table_Det_XX29_dBm_L ;
  1403. uint8_t Table_Det_XX30_dBm_H ;
  1404. uint8_t Table_Det_XX30_dBm_L ;
  1405. uint8_t Table_Det_XX31_dBm_H ;
  1406. uint8_t Table_Det_XX31_dBm_L ;
  1407. uint8_t Table_Det_XX32_dBm_H ;
  1408. uint8_t Table_Det_XX32_dBm_L ;
  1409. uint8_t Table_Det_XX33_dBm_H ;
  1410. uint8_t Table_Det_XX33_dBm_L ;
  1411. int8_t Table_Ref ;
  1412. int8_t Table_Length ;
  1413. }DET_TABLEUL_st;
  1414. typedef struct{
  1415. int8_t Table_1_Temp;
  1416. int8_t Table_2_Temp;
  1417. int8_t Table_3_Temp;
  1418. int8_t Table_4_Temp;
  1419. int8_t Table_5_Temp;
  1420. int8_t Table_6_Temp;
  1421. int8_t Table_7_Temp;
  1422. int8_t Table_8_Temp;
  1423. int8_t Table_9_Temp;
  1424. int8_t Table_10_Temp;
  1425. int8_t Table_11_Temp;
  1426. int8_t Table_12_Temp;
  1427. int8_t Table_13_Temp;
  1428. int8_t Table_14_Temp;
  1429. int8_t Table_15_Temp;
  1430. int8_t Table_16_Temp;
  1431. int8_t Table_17_Temp;
  1432. int8_t Table_18_Temp;
  1433. int8_t Table_19_Temp;
  1434. int8_t Table_20_Temp;
  1435. int8_t Table_21_Temp;
  1436. int8_t Table_22_Temp;
  1437. int8_t Table_23_Temp;
  1438. int8_t Table_24_Temp;
  1439. int8_t Table_25_Temp;
  1440. int8_t Table_26_Temp;
  1441. int8_t Table_27_Temp;
  1442. int8_t Table_28_Temp;
  1443. int8_t Table_29_Temp;
  1444. int8_t Table_30_Temp;
  1445. int8_t Table_Ref;
  1446. int8_t Table_Length;
  1447. }TEMP_TABLE_st;
  1448. typedef enum{
  1449. Bluecell_DET_UL1_ADC_INDEX_H = 0,
  1450. Bluecell_DET_UL1_ADC_INDEX_L,
  1451. Bluecell_DET_UL2_ADC_INDEX_H,
  1452. Bluecell_DET_UL2_ADC_INDEX_L,
  1453. Bluecell_DET_UL3_ADC_INDEX_H,
  1454. Bluecell_DET_UL3_ADC_INDEX_L,
  1455. Bluecell_RFU_TEMP_ADC_INDEX_H,
  1456. Bluecell_RFU_TEMP_ADC_INDEX_L,
  1457. Bluecell_ADC1_MaxLength,
  1458. }Bluecell_ADC1_Index;
  1459. typedef enum{
  1460. Bluecell_DET_UL4_ADC_INDEX_H = Bluecell_ADC1_MaxLength,
  1461. Bluecell_DET_UL4_ADC_INDEX_L,
  1462. Bluecell_DET_DL1_ADC_INDEX_H,
  1463. Bluecell_DET_DL1_ADC_INDEX_L,
  1464. Bluecell_DET_DL2_ADC_INDEX_H,
  1465. Bluecell_DET_DL2_ADC_INDEX_L,
  1466. Bluecell_DET_DL3_ADC_INDEX_H,
  1467. Bluecell_DET_DL3_ADC_INDEX_L,
  1468. Bluecell_DET_DL4_ADC_INDEX_H,
  1469. Bluecell_DET_DL4_ADC_INDEX_L,
  1470. Bluecell_ADC3_MaxLength,
  1471. }Bluecell_ADC3_Index;
  1472. typedef enum{
  1473. DET_Alarm_DL1_Index = 0,
  1474. DET_Alarm_DL2_Index,
  1475. DET_Alarm_DL3_Index,
  1476. DET_Alarm_DL4_Index,
  1477. DET_Alarm_DL_Index_MAX,
  1478. }DET_Alarm_DL_I;
  1479. typedef enum{
  1480. DET_Alarm_UL1_Index = 0,
  1481. DET_Alarm_UL2_Index,
  1482. DET_Alarm_UL3_Index,
  1483. DET_Alarm_UL4_Index,
  1484. DET_Alarm_UL_Index_MAX,
  1485. }DET_Alarm_UL_I;
  1486. typedef enum{
  1487. DET_Alarm_DL1_Shutdown_Index = 0,
  1488. DET_Alarm_DL2_Shutdown_Index,
  1489. DET_Alarm_DL3_Shutdown_Index,
  1490. DET_Alarm_DL4_Shutdown_Index,
  1491. DET_Alarm_DL_Shutdown_Index_MAX,
  1492. }MBIC_Shutdown_DL_Index_t;
  1493. typedef enum{
  1494. DET_Alarm_UL1_Shutdown_Index = 0,
  1495. DET_Alarm_UL2_Shutdown_Index,
  1496. DET_Alarm_UL3_Shutdown_Index,
  1497. DET_Alarm_UL4_Shutdown_Index,
  1498. DET_Alarm_UL_Shutdown_Index_MAX,
  1499. }MBIC_Shutdown_UL_Index_t;
  1500. #define ADC1_EA Bluecell_ADC1_MaxLength /2
  1501. #define ADC3_EA Bluecell_ADC3_MaxLength /2
  1502. extern ATT_TABLE_st Att_DL1;
  1503. extern ATT_TABLE_st Att_DL2;
  1504. extern ATT_TABLE_st Att_DL3;
  1505. extern ATT_TABLE_st Att_DL4;
  1506. extern ATT_TABLE_st Att_UL1;
  1507. extern ATT_TABLE_st Att_UL2;
  1508. extern ATT_TABLE_st Att_UL3;
  1509. extern ATT_TABLE_st Att_UL4;
  1510. extern DET_TABLEDL_st Det_DL1;
  1511. extern DET_TABLEDL_st Det_DL2;
  1512. extern DET_TABLEDL_st Det_DL3;
  1513. extern DET_TABLEDL_st Det_DL4;
  1514. extern DET_TABLEUL_st Det_UL1;
  1515. extern DET_TABLEUL_st Det_UL2;
  1516. extern DET_TABLEUL_st Det_UL3;
  1517. extern DET_TABLEUL_st Det_UL4;
  1518. extern TEMP_TABLE_st Temp_DL1;
  1519. extern TEMP_TABLE_st Temp_DL2;
  1520. extern TEMP_TABLE_st Temp_DL3;
  1521. extern TEMP_TABLE_st Temp_DL4;
  1522. extern TEMP_TABLE_st Temp_UL1;
  1523. extern TEMP_TABLE_st Temp_UL2;
  1524. extern TEMP_TABLE_st Temp_UL3;
  1525. extern TEMP_TABLE_st Temp_UL4;
  1526. extern BLUESTATUS_st bluecell_Currdatastatus;
  1527. extern volatile uint32_t ALCTimerCnt;
  1528. extern volatile uint32_t AGCTimerCnt;
  1529. extern IWDG_HandleTypeDef hiwdg;
  1530. extern void Bluecell_DataInit();
  1531. extern void ALC_Function();
  1532. extern void AGC_Function();
  1533. #endif /* BLUECELL_OPERATE_H_ */