Bluecell_operate.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. #include <stdio.h>
  2. #include "main.h"
  3. #include "Bluecell_operate.h"
  4. extern volatile uint32_t LedTimerCnt;
  5. uint8_t Alarm_Status[MAX_ALARM_Len] = {0,};
  6. uint8_t ResultData[1024] = {0,};
  7. void Boot_LED_Toggle(void){
  8. if(LedTimerCnt > 500){
  9. HAL_GPIO_TogglePin(GPIOG,GPIO_PIN_14);
  10. LedTimerCnt = 0;
  11. // printf("LED OF OFF\r\n");
  12. }
  13. }
  14. uint8_t* MBIC_HeaderDataSetting(uint8_t* data){
  15. ResultData[MBIC_PREAMBLE_0] = MBIC_PREAMBLE0;
  16. ResultData[MBIC_PREAMBLE_1] = MBIC_PREAMBLE1;
  17. ResultData[MBIC_PREAMBLE_2] = MBIC_PREAMBLE2;
  18. ResultData[MBIC_PREAMBLE_3] = MBIC_PREAMBLE3;
  19. ResultData[MBIC_SUBUID_0] = MBIC_SUBUID0;
  20. ResultData[MBIC_SUBUID_1] = MBIC_SUBUID1;
  21. ResultData[MBIC_RCODE_0] = data[MBIC_RCODE_0];
  22. ResultData[MBIC_TRID_0] = data[MBIC_TRID_0];
  23. ResultData[MBIC_TRID_1] = data[MBIC_TRID_1];
  24. ResultData[MBIC_SEQSUM_0] = data[MBIC_SEQSUM_0];
  25. ResultData[MBIC_TTL_0] = data[MBIC_TTL_0];
  26. ResultData[MBIC_TIME_0] = data[MBIC_TIME_0];
  27. ResultData[MBIC_TIME_1] = data[MBIC_TIME_1];
  28. ResultData[MBIC_TIME_2] = data[MBIC_TIME_2];
  29. ResultData[MBIC_TIME_3] = data[MBIC_TIME_3];
  30. ResultData[MBIC_TIME_4] = data[MBIC_TIME_4];
  31. ResultData[MBIC_TIME_5] = data[MBIC_TIME_5];
  32. return ResultData;
  33. }
  34. typedef enum{
  35. BLUECELL_DL_PATH1 = 0x01,
  36. BLUECELL_UL_PATH1,
  37. BLUECELL_DL_PATH2,
  38. BLUECELL_UL_PATH2,
  39. BLUECELL_DL_PATH3,
  40. BLUECELL_UL_PATH3,
  41. BLUECELL_DL_PATH4,
  42. BLUECELL_UL_PATH4,
  43. };
  44. bool Bluecell_Operate(uint8_t* data){
  45. uint8_t datatype = 0;
  46. switch(datatype){
  47. case BLUECELL_DL_PATH1:
  48. break;
  49. case BLUECELL_UL_PATH1:
  50. break;
  51. case BLUECELL_DL_PATH2:
  52. break;
  53. case BLUECELL_UL_PATH2:
  54. break;
  55. case BLUECELL_DL_PATH3:
  56. break;
  57. case BLUECELL_UL_PATH3:
  58. break;
  59. case BLUECELL_DL_PATH4:
  60. break;
  61. case BLUECELL_UL_PATH4:
  62. break;
  63. }
  64. return true;
  65. }
  66. bool MBIC_Operate(uint8_t* data){
  67. uint16_t datatype = 0;
  68. switch(datatype){
  69. case Alarm_Bit_List:
  70. // 알림 비트
  71. Uart1_Data_Send(&Alarm_Status[0],MAX_ALARM_Len);
  72. break;
  73. case Alarm_Mask:
  74. break;
  75. case Alarm_Test_Mode:
  76. break;
  77. case Alarm_Test_Dummy:
  78. break;
  79. case CPU_Version:
  80. break;
  81. case ModuleINFORMATION_null1:
  82. break;
  83. case CPU_Current_Bank:
  84. break;
  85. case CPU_Bank_Select_Reboot_by:
  86. break;
  87. case CPU_Bank1_Image_Version:
  88. break;
  89. case CPU_Bank1_Image_BuildTime:
  90. break;
  91. case CPU_Bank1_Image_Name:
  92. break;
  93. case CPU_Bank2_Image_Version:
  94. break;
  95. case CPU_Bank2_Image_BuildTime:
  96. break;
  97. case CPU_Bank2_Image_Name:
  98. break;
  99. case SW_Reset:
  100. break;
  101. case Factory_Set_Initialization:
  102. break;
  103. case Temperature:
  104. break;
  105. case Temperature_Offset:
  106. break;
  107. case Temp_High_Threshold:
  108. break;
  109. case Temp_High_Threshold_Default:
  110. break;
  111. case Temp_High_Alarm:
  112. break;
  113. case LED_TEST:
  114. break;
  115. case Node:
  116. break;
  117. case Type:
  118. break;
  119. case PCB_Version:
  120. break;
  121. case Serial_Number:
  122. break;
  123. case Manufacture:
  124. break;
  125. case Manufacture_Date:
  126. break;
  127. case ENVIRONMENT_INVENTORY_null1:
  128. printf("Function : %s .... Line : %d\r\n",__func__,__LINE__);
  129. break;
  130. case Freq_ID:
  131. break;
  132. case Carrier_ID:
  133. break;
  134. case Carrier_ON_OFF:
  135. break;
  136. }
  137. return true;
  138. }