Bluecell_operate.h 44 KB

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