board_cfg.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /*********************************************************************************************************
  2. * Module : board_cfg
  3. * Abstract : controller board expecil configuration !!!!
  4. * Version : 1.0.0
  5. * Author : Leopul(COPYRIGHT 2025 ~ 2027 Leopul. All rights reserved.)
  6. * Complete : 2025-02-16
  7. * Content : None
  8. * Note : None
  9. *********************************************************************************************************/
  10. #ifndef __BOARD_CFG_H_
  11. #define __BOARD_CFG_H_
  12. #define OPEN_WATCH_DOG 0
  13. #define OPEN_NOT_READ_EN 0
  14. #define POWER_DC 0
  15. #define POWER_AC 1
  16. #define POWER_AC_3_3 4
  17. #define POWER_AC_3_1 2
  18. #define POWER_AC_3_2 3
  19. #define INPUT_PT_NONE 0 /* detect module count */
  20. #define INPUT_PT_1 1
  21. #define INPUT_PT_2 2
  22. #define INPUT_PT_3 3
  23. #define ZERO_LINE_CTRL_NO 0
  24. #define ZERO_LINE_CTRL_YES 1
  25. #define OUTPUT_CTRL_NO 0 /* */
  26. #define OUTPUT_CTRL_YES 1
  27. #define DEIVECE(elec_type,input_pt,ctrl_zero_flag,zero_count,ctrl_output_flag,relay_count) ((elec_type << 12)\
  28. |(input_pt << 10)\
  29. |(ctrl_zero_flag << 9)\
  30. |(zero_count << 7)\
  31. |(ctrl_output_flag << 6)\
  32. |relay_count)
  33. #define PT_SUB_COUNT_3 3
  34. #define PT_SUB_COUNT_4 4
  35. #define PRJ_8_NEW 0
  36. #define PRJ_3_4 0
  37. #define PRJ_3_2 0
  38. #define PRJ_DC_8 0
  39. #define PRJ_6_NEW 1
  40. #define PRJ_3_NEW 0
  41. #define PRJ_5_NEW 0
  42. #define PRJ_4_SELF_LOCK 0
  43. #define PRJ_4_BASE 0
  44. #define PRJ_1_BASE 0
  45. #define PRJ_1_SELF_LOCK 0
  46. #define PRJ_1_ALL_MON 0
  47. #if PRJ_8
  48. #define POWER_TYPE (POWER_AC)
  49. #define INPUT_PT_NUM (INPUT_PT_2)
  50. #define ZERO_CONTRL (ZERO_LINE_CTRL_NO)
  51. #define ZERO_CTRL_NUM (ZERO_LINE_NONE)
  52. #define OUTPUT_CONTRL (OUTPUT_CTRL_YES)
  53. #define RelaySlaveChaNum 8
  54. #define RELAY_REMENBER 1
  55. #define SURPPORT_2_PT 0
  56. #define SUPPORT_ALL_ON_OFF 0
  57. #define PT_SUB_COUNT (PT_SUB_COUNT_4)
  58. #define ACSingCurrid 1
  59. #elif PRJ_6_NEW
  60. #define RelaySlaveChaNum 6
  61. #define ACSingCurrid 1
  62. #define SURPPORT_2_PT 1
  63. #define PT_SUB_COUNT (PT_SUB_COUNT_3)
  64. #define SUPPORT_DETECTION 1
  65. #define SUPPORT_RELAY_REMENBER 1
  66. #elif PRJ_8_NEW
  67. #define RelaySlaveChaNum 8
  68. #define ACSingCurrid 1
  69. #define SURPPORT_2_PT 1
  70. #define PT_SUB_COUNT (PT_SUB_COUNT_4)
  71. #define SUPPORT_DETECTION 1
  72. #define SUPPORT_RELAY_REMENBER 1
  73. #elif PRJ_3_NEW
  74. #define RelaySlaveChaNum 3
  75. #define ACSingCurrid 2
  76. #define SURPPORT_2_PT 0
  77. #define PT_SUB_COUNT (RelaySlaveChaNum)
  78. #define SUPPORT_DETECTION 1
  79. #define SUPPORT_RELAY_REMENBER 1
  80. #define SUPPORT_4_ON_FLASH 1
  81. #define SUPPORT_ALL_ON_OFF 1
  82. #elif PRJ_5_NEW
  83. #define RelaySlaveChaNum 5
  84. #define ACSingCurrid 1
  85. #define SURPPORT_2_PT 0
  86. #define PT_SUB_COUNT (RelaySlaveChaNum)
  87. #define SUPPORT_DETECTION 1
  88. #define SUPPORT_RELAY_REMENBER 1
  89. #elif PRJ_4_SELF_LOCK
  90. #define RelaySlaveChaNum 4
  91. #define ACSingCurrid 2
  92. #define SURPPORT_2_PT 0
  93. #define PT_SUB_COUNT (RelaySlaveChaNum)
  94. #define SUPPORT_DETECTION 1
  95. #define SUPPORT_RELAY_REMENBER 1
  96. #define SUPPORT_SELF_LOCK 1
  97. #elif PRJ_4_BASE
  98. #define RelaySlaveChaNum 4
  99. #define ACSingCurrid 2
  100. #define SURPPORT_2_PT 0
  101. #define PT_SUB_COUNT (RelaySlaveChaNum)
  102. #define SUPPORT_DETECTION 1
  103. #define SUPPORT_RELAY_REMENBER 1
  104. #define SUPPORT_ALL_ON_OFF 1
  105. #elif PRJ_1_BASE
  106. #define RelaySlaveChaNum 1
  107. #define ACSingCurrid 2
  108. #define SURPPORT_2_PT 0
  109. #define PT_SUB_COUNT (RelaySlaveChaNum)
  110. #define SUPPORT_DETECTION 1
  111. #define SUPPORT_RELAY_REMENBER 1
  112. #elif PRJ_1_SELF_LOCK
  113. #define RelaySlaveChaNum 1
  114. #define ACSingCurrid 2
  115. #define SURPPORT_2_PT 0
  116. #define PT_SUB_COUNT (RelaySlaveChaNum)
  117. #define SUPPORT_DETECTION 1
  118. #define SUPPORT_RELAY_REMENBER 1
  119. #define SUPPORT_SELF_LOCK 1
  120. #elif PRJ_1_ALL_MON
  121. #define RelaySlaveChaNum 1
  122. #define ACSingCurrid 2
  123. #define SURPPORT_2_PT 0
  124. #define PT_SUB_COUNT (RelaySlaveChaNum)
  125. #define SUPPORT_MON 1
  126. #endif
  127. #endif