cfg.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  1. #ifndef __CONFIG_Hx__
  2. #define __CONFIG_Hx__
  3. #define VERSION "V1.3.1"
  4. /////////////customer demannd//////////////////////
  5. //#define PRJ_XIAN_AC_I1_O1_P4
  6. //#define PRJ_XIAN_AC_I1_O1_P8
  7. //#define PRJ_USASL_AC_I3_O1
  8. //#define PRJ_USASL_AC_I3_O3
  9. //#define PRJ_ITK_AC_I1_O1
  10. //#define PRJ_ITK_AC_I3_O1
  11. //#define PRJ_STSC_I3_O3
  12. //#define PRJ_STSC_I3_O1_OLED
  13. //#define PRJ_LITECH_AC_I1_O1
  14. //#define PRJ_LITECH_AC_I3_O1
  15. //#define PRJ_INSPUR_DC_I_DC_O
  16. //#define PRJ_INSPUR_DC_I_DC_O_NEW_96
  17. //#define PRJ_ANDERSON_AC_I3_O3
  18. //#define PRJ_HYPERTEC_AC_I3_O1
  19. //#define PRJ_SG_I3_O3
  20. //#define PRJ_TEST
  21. //#define PRJ_TEST_AC_I1_O1
  22. //#define PRJ_TEST_AC_I3_O1
  23. //#define PRJ_GOWONE_125A_AC_I3_O1
  24. //#define PRJ_Malaysia_AC_I3_O1
  25. //#define PRJ_TEST_AC_I3_O3
  26. //#define PRJ_ESOUTH_DC_I1_O4_RGB5
  27. //#define PRJ_CHANGCHUN_AC_I1_O1_OLED
  28. //#define PRJ_TIDA_AC_I3_O1
  29. //#define PRJ_INST2302_DC_OLED
  30. //#define PRJ_INST2106_AC_I1_O1_OLED
  31. //#define PRJ_YST_AC_I1_O1
  32. //#define PRJ_YUNNAN_AC_I1_O1
  33. //#define PRJ_BYD_UPS_AC_I1_O1
  34. //#define PRJ_DUALWIRES_AC_I3_O2
  35. //#define PRJ_2405_AC_I1_O1_OLED
  36. //#define PRJ_IP_AC_I3_O3
  37. //#define PRJ_IP_AC_I3_O1
  38. //#define PRJ_IP_AC_I1_O1
  39. //#define PRJ_IP_YUNNAN_AC_I1_O1
  40. //#define PRJ_IP_CHONGQING_AC_I1_O1
  41. //#define PRJ_IP_AOSENS_AC_I1_O1
  42. //#define PRJ_IP_AOSENS_DC_I_O
  43. #define PRJ_IP_DEBIAO_AC_I3_O1
  44. #define USE_MAIL
  45. #define MAIL_SEND_BUILTIN
  46. #define CHIP_T113i 0
  47. #define CHIP_T113s 1
  48. #define USE_MQTT
  49. #define MQTT_SERVER_BUILTIN
  50. //#define GNSS_ENABLE //EC200N-CN, 不支持gnss
  51. #define USE_BOARD_UPGRADE
  52. #if (CHIP_TYPE == CHIP_T113s)
  53. #define USE_WATCHDOG
  54. #endif
  55. #if (defined PRJ_XIAN_AC_I1_O1_P4) || (defined PRJ_XIAN_AC_I1_O1_P8) //GOM037
  56. #define LANGUAGE 0 //chinese
  57. #define SMPLE_TIME 30 //ms
  58. #define SAVE_TIME 60000 //ms
  59. #define CASCADE_CNT 0
  60. #define PHASE_GROUP 8
  61. #ifdef PRJ_XIAN_AC_I1_O1_P4
  62. //#define GOM037PDU_GC20_04K_125H //ac_in1_out1_40a_p4_5ch_nologo_cn
  63. #define CHANNEL_DELAY 5
  64. #else
  65. //#define GOM037_PDU_GC10_08K_80H //ac_in1_out1_40a_p8_5ch_nologo_cn
  66. #define CHANNEL_DELAY 8
  67. #endif
  68. #define PROD_POWER_TYPE 0
  69. #define IN_INDEX_MAP {3,2,0,1}
  70. #elif (defined PRJ_TIDA_AC_I3_O1)
  71. #define LANGUAGE 0 //english
  72. #define SMPLE_TIME 30 //ms
  73. #define SAVE_TIME 60000 //ms
  74. #define CASCADE_CNT 0
  75. #define PHASE_GROUP 8
  76. #define CHANNEL_DELAY 8
  77. #define PROD_POWER_TYPE 5
  78. #define USE_BEEP 1
  79. #define USE_LED 1
  80. #define BRD_MAX 6
  81. #elif (defined PRJ_USASL_AC_I3_O1) || (defined PRJ_USASL_AC_I3_O3)
  82. #define LANGUAGE 1 //english
  83. #define SMPLE_TIME 30 //ms
  84. #define SAVE_TIME 60000 //ms
  85. #define CASCADE_CNT 0
  86. #define PHASE_GROUP 8
  87. #define CHANNEL_DELAY 8
  88. //#define PDU_GC40_03K_125H //ac_in3_out3_40a_p8_12ch_nologo_en
  89. //#define PDU_GC60_04K_125H //ac_in3_out1_40a_p4_24ch_nologo_en
  90. #ifdef PRJ_USASL_AC_I3_O1
  91. #define PROD_POWER_TYPE 5
  92. #else
  93. #define PROD_POWER_TYPE 3
  94. #endif
  95. #elif (defined PRJ_ITK_AC_I1_O1) || (defined PRJ_ITK_AC_I3_O1)
  96. #define LANGUAGE 2 //russia
  97. #define SMPLE_TIME 30 //ms
  98. #define SAVE_TIME 60000 //ms
  99. #define CASCADE_CNT 0
  100. #define PHASE_GROUP 8
  101. #define CHANNEL_DELAY 8
  102. #define USE_LOGO_ITK
  103. #ifdef PRJ_ITK_AC_I1_O1
  104. #define PROD_POWER_TYPE 0
  105. #else
  106. #define PROD_POWER_TYPE 5
  107. #endif
  108. #elif (defined PRJ_LITECH_AC_I1_O1) || (defined PRJ_LITECH_AC_I3_O1)
  109. #define LANGUAGE 1 //english
  110. #define SMPLE_TIME 30 //ms
  111. #define SAVE_TIME 60000 //ms
  112. #define CASCADE_CNT 0
  113. #define USE_LOGO_LITECH
  114. #ifdef PRJ_LITECH_AC_I1_O1
  115. #define PHASE_GROUP 8
  116. #define CHANNEL_DELAY 8
  117. #define PROD_POWER_TYPE 0
  118. #else
  119. #define PHASE_GROUP 6
  120. #define CHANNEL_DELAY 6
  121. #define PROD_POWER_TYPE 5
  122. #endif
  123. #elif defined PRJ_STSC_I3_O3
  124. #define LANGUAGE 1 //english
  125. #define SMPLE_TIME 30 //ms
  126. #define SAVE_TIME 60000 //ms
  127. #define CASCADE_CNT 0
  128. #define PHASE_GROUP 8
  129. #define CHANNEL_DELAY 8
  130. #define PROD_POWER_TYPE 3
  131. #define NORTH_USER_SPECILS //north user specification
  132. #elif defined PRJ_STSC_I3_O1_OLED
  133. #define LANGUAGE 0 //english
  134. #define SMPLE_TIME 30 //ms
  135. #define SAVE_TIME 60000 //ms
  136. #define CASCADE_CNT 0
  137. #define PHASE_GROUP 8
  138. #define CHANNEL_DELAY 8
  139. #define PROD_POWER_TYPE 5
  140. #define USE_UI
  141. #define USE_BEEP
  142. #elif defined PRJ_ANDERSON_AC_I3_O3
  143. #define LANGUAGE 1 //english
  144. #define SMPLE_TIME 30 //ms
  145. #define SAVE_TIME 60000 //ms
  146. #define CASCADE_CNT 0
  147. #define PHASE_GROUP 8
  148. #define CHANNEL_DELAY 8
  149. #define USE_NF_CTRL
  150. #define PROD_POWER_TYPE 3
  151. #elif defined PRJ_HYPERTEC_AC_I3_O1
  152. //ac_in3_out1_36ch_nologo_en_hypertec
  153. #define LANGUAGE 1 //english
  154. #define SMPLE_TIME 30 //ms
  155. #define SAVE_TIME 60000 //ms
  156. #define CASCADE_CNT 0
  157. #define PHASE_GROUP 6
  158. #define CHANNEL_DELAY 6
  159. #define USE_LOGO_HYPERTEC
  160. #define PROD_POWER_TYPE 5
  161. #elif defined PRJ_INSPUR_DC_I_DC_O
  162. #define LANGUAGE 0 //chinese
  163. #define SMPLE_TIME 30 //ms
  164. #define SAVE_TIME 60000 //ms
  165. #define CASCADE_CNT 0
  166. #define PHASE_GROUP 6
  167. #define CHANNEL_DELAY 6
  168. #define PROD_POWER_TYPE 1
  169. #elif defined PRJ_INSPUR_DC_I_DC_O_NEW_96
  170. #define LANGUAGE 0 //chinese
  171. #define SMPLE_TIME 30 //ms
  172. #define SAVE_TIME 600000 //ms
  173. #define CASCADE_CNT 0
  174. #define PHASE_GROUP 24
  175. #define CHANNEL_DELAY 24
  176. #define PROD_POWER_TYPE 1
  177. #define USE_WATCHDOG
  178. #define BRD_MAX 15
  179. #elif defined PRJ_SG_I3_O3
  180. #define LANGUAGE 0 //chinese
  181. #define SMPLE_TIME 30 //ms
  182. #define SAVE_TIME 60000 //ms
  183. #define CASCADE_CNT 0
  184. #define PHASE_GROUP 6
  185. #define CHANNEL_DELAY 6
  186. #define PROD_POWER_TYPE 3
  187. #elif defined PRJ_TEST
  188. #define LANGUAGE 0 //chinese
  189. #define SMPLE_TIME 30 //ms
  190. #define SAVE_TIME 60000 //ms
  191. #define CASCADE_CNT 0
  192. #define PHASE_GROUP 8
  193. #define CHANNEL_DELAY 8
  194. #define PROD_POWER_TYPE 5
  195. #elif defined PRJ_TEST_AC_I1_O1
  196. #define LANGUAGE 0 //chinese
  197. #define SMPLE_TIME 30 //ms
  198. #define SAVE_TIME 60000 //ms
  199. #define CASCADE_CNT 0
  200. #define PHASE_GROUP 8
  201. #define CHANNEL_DELAY 8
  202. #define PROD_POWER_TYPE 0
  203. //#define IN_INDEX_MAP {2,3,1,0}
  204. #elif defined PRJ_2405_AC_I1_O1_OLED
  205. #define LANGUAGE 0 //chinese
  206. #define SMPLE_TIME 30 //ms
  207. #define SAVE_TIME 60000 //ms
  208. #define CASCADE_CNT 0
  209. #define PHASE_GROUP 4
  210. #define CHANNEL_DELAY 4
  211. #define PROD_POWER_TYPE 0
  212. #define BRD_MAX 3
  213. #define USE_UI
  214. #elif defined PRJ_CHANGCHUN_AC_I1_O1_OLED
  215. #define LANGUAGE 0 //chinese
  216. #define SMPLE_TIME 30 //ms
  217. #define SAVE_TIME 60000 //ms
  218. #define CASCADE_CNT 0
  219. #define PHASE_GROUP 9
  220. #define CHANNEL_DELAY 9
  221. #define PROD_POWER_TYPE 0
  222. #define BRD_MAX 5
  223. #define ROTATE 180
  224. #define USE_UI
  225. #define USE_WATCHDOG
  226. #define USE_BEEP 1
  227. #define USE_LED 1
  228. #define FLIP_TIME 5
  229. #elif defined PRJ_TEST_AC_I3_O1
  230. #define LANGUAGE 0 //chinese
  231. #define SMPLE_TIME 30 //ms
  232. #define SAVE_TIME 60000 //ms
  233. #define CASCADE_CNT 0
  234. #define PHASE_GROUP 8
  235. #define CHANNEL_DELAY 8
  236. #define PROD_POWER_TYPE 5
  237. #elif defined PRJ_TEST_AC_I3_O3
  238. #define LANGUAGE 0 //chinese
  239. #define SMPLE_TIME 30 //ms
  240. #define SAVE_TIME 60000 //ms
  241. #define CASCADE_CNT 0
  242. #define PHASE_GROUP 8
  243. #define CHANNEL_DELAY 8
  244. #define PROD_POWER_TYPE 3
  245. #define BRD_MAX 2
  246. #define MONWAY 1
  247. #elif defined PRJ_GOWONE_125A_AC_I3_O1
  248. #define LANGUAGE 1 // //english
  249. #define SMPLE_TIME 30 // ms
  250. #define SAVE_TIME 60000 // ms
  251. #define CASCADE_CNT 0
  252. #define PHASE_GROUP 12
  253. #define CHANNEL_DELAY 12
  254. #define PROD_POWER_TYPE 5
  255. #define USE_WATCHDOG
  256. #define USE_LOGO_GOWONE
  257. #define USE_BEEP 1
  258. #define USE_LED 1
  259. #define BRD_MAX 10
  260. #define SENSOR_ACCESS_NONE
  261. #elif defined PRJ_Malaysia_AC_I3_O1
  262. #define LANGUAGE 1 // //english
  263. #define SMPLE_TIME 30 // ms
  264. #define SAVE_TIME 60000 // ms
  265. #define CASCADE_CNT 0
  266. #define PHASE_GROUP 10
  267. #define CHANNEL_DELAY 10
  268. #define PROD_POWER_TYPE 5
  269. #define USE_WATCHDOG
  270. #define USE_LOGO_LITECH
  271. #define NEW_GPIO
  272. #define USE_BEEP 1
  273. #define USE_LED 1
  274. #define BRD_MAX 8
  275. #elif defined PRJ_IP_AC_I3_O3
  276. #define LANGUAGE 0
  277. #define SMPLE_TIME 30 //ms
  278. #define SAVE_TIME 60000 //ms
  279. #define CASCADE_CNT 0
  280. #define PHASE_GROUP 8
  281. #define CHANNEL_DELAY 8
  282. #define PROD_POWER_TYPE 3
  283. #define NOT_USE_CONTROL
  284. #elif defined PRJ_INST2302_DC_OLED
  285. #define LANGUAGE 0 //chinese
  286. #define SMPLE_TIME 30 //ms
  287. #define SAVE_TIME 60000 //ms
  288. #define CASCADE_CNT 0
  289. #define PHASE_GROUP 8
  290. #define CHANNEL_DELAY 8
  291. #define PROD_POWER_TYPE 1
  292. #define USE_UI
  293. #define USE_SCREEN_LED
  294. //#define USE_SCREEN_LCD
  295. #elif defined PRJ_INST2106_AC_I1_O1_OLED
  296. #define LANGUAGE 0 //chinese
  297. #define SMPLE_TIME 30 //ms
  298. #define SAVE_TIME 60000 //ms
  299. #define CASCADE_CNT 0
  300. #define PHASE_GROUP 8
  301. #define CHANNEL_DELAY 8
  302. #define PROD_POWER_TYPE 0
  303. #define USE_UI
  304. #define ROTATE 180
  305. #define FLIP_TIME 3
  306. #elif defined PRJ_ESOUTH_DC_I1_O4_RGB5
  307. #define LANGUAGE 0 //chinese
  308. #define SMPLE_TIME 30 //ms
  309. #define SAVE_TIME 60000 //ms
  310. #define CASCADE_CNT 0
  311. #define PHASE_GROUP 8
  312. #define CHANNEL_DELAY 8
  313. #define PROD_POWER_TYPE 1
  314. #define SCREEN_RGB
  315. #define USE_WATCHDOG
  316. #define BRD_MAX 10
  317. //#define USE_SMART_DETECTION_CTRL 1
  318. #define NEW_GPIO
  319. #elif defined PRJ_YST_AC_I1_O1
  320. #define LANGUAGE 0 //chinese
  321. #define SMPLE_TIME 30 //ms
  322. #define SAVE_TIME 60000 //ms
  323. #define CASCADE_CNT 0
  324. #define PHASE_GROUP 6
  325. #define CHANNEL_DELAY 6
  326. #define PROD_POWER_TYPE 0
  327. #define USE_BEEP 1
  328. #define USE_LED 1
  329. #define USE_BREAKER_ALARM
  330. #elif defined PRJ_YUNNAN_AC_I1_O1
  331. #define LANGUAGE 0 //chinese
  332. #define SMPLE_TIME 30 //ms
  333. #define SAVE_TIME 60000 //ms
  334. #define CASCADE_CNT 0
  335. #define PHASE_GROUP 8
  336. #define CHANNEL_DELAY 8
  337. #define PROD_POWER_TYPE 0
  338. #define USE_BREAKER_ALARM
  339. #define USE_BEEP 1
  340. #define USE_LED 1
  341. #define USE_Cellular
  342. #define BRD_MAX 5
  343. #elif defined PRJ_BYD_UPS_AC_I1_O1
  344. #define LANGUAGE 0 //chinese
  345. #define SMPLE_TIME 30 //ms
  346. #define SAVE_TIME 60000 //ms
  347. #define CASCADE_CNT 0
  348. #define PHASE_GROUP 6
  349. #define CHANNEL_DELAY 6
  350. #define PROD_POWER_TYPE 0
  351. #define USE_BREAKER_ALARM
  352. #define USE_BEEP 1
  353. #define USE_LED 1
  354. #define BRD_MAX 5
  355. #elif defined PRJ_DUALWIRES_AC_I3_O2
  356. #define LANGUAGE 0 //chinese
  357. #define SMPLE_TIME 30 //ms
  358. #define SAVE_TIME 60000 //ms
  359. #define CASCADE_CNT 0
  360. #define PHASE_GROUP 8
  361. #define CHANNEL_DELAY 8
  362. #define PROD_POWER_TYPE 6
  363. #define BRD_MAX 12
  364. #elif (defined PRJ_IP_AC_I3_O1)
  365. #define LANGUAGE 0
  366. #define SMPLE_TIME 30 //ms
  367. #define SAVE_TIME 60000 //ms
  368. #define CASCADE_CNT 0
  369. #define PHASE_GROUP 8
  370. #define CHANNEL_DELAY 8
  371. #define PROD_POWER_TYPE 5
  372. #define USE_BEEP 1
  373. //#define NOT_USE_CONTROL
  374. #elif (defined PRJ_IP_AC_I1_O1)
  375. #define LANGUAGE 0
  376. #define SMPLE_TIME 30 //ms
  377. #define SAVE_TIME 60000 //ms
  378. #define CASCADE_CNT 0
  379. #define PHASE_GROUP 8
  380. #define CHANNEL_DELAY 8
  381. #define PROD_POWER_TYPE 0
  382. #define USE_BEEP 1
  383. #define USE_LED 1
  384. #elif (defined PRJ_IP_YUNNAN_AC_I1_O1)
  385. #define LANGUAGE 0
  386. #define SMPLE_TIME 30 //ms
  387. #define SAVE_TIME 60000 //ms
  388. #define CASCADE_CNT 0
  389. #define PHASE_GROUP 8
  390. #define CHANNEL_DELAY 8
  391. #define PROD_POWER_TYPE 0
  392. #define USE_BEEP 1
  393. #define USE_LED 1
  394. #define BRD_MAX 1
  395. #define USE_Cellular
  396. #elif (defined PRJ_IP_CHONGQING_AC_I1_O1)
  397. #define LANGUAGE 0
  398. #define SMPLE_TIME 30 //ms
  399. #define SAVE_TIME 60000 //ms
  400. #define CASCADE_CNT 0
  401. #define PHASE_GROUP 8
  402. #define CHANNEL_DELAY 8
  403. #define PROD_POWER_TYPE 0
  404. #define USE_BEEP 1
  405. #define USE_LED 1
  406. #define BRD_MAX 1
  407. #elif (defined PRJ_IP_AOSENS_AC_I1_O1)
  408. #define LANGUAGE 1
  409. #define SMPLE_TIME 30 //ms
  410. #define SAVE_TIME 60000 //ms
  411. #define CASCADE_CNT 0
  412. #define PHASE_GROUP 8
  413. #define CHANNEL_DELAY 8
  414. #define PROD_POWER_TYPE 0
  415. #define USE_BEEP 1
  416. #define USE_LED 1
  417. #define BRD_MAX 1
  418. #define NOT_USE_CONTROL
  419. #elif (defined PRJ_IP_AOSENS_DC_I_O)
  420. #define LANGUAGE 0
  421. #define SMPLE_TIME 30 //ms
  422. #define SAVE_TIME 60000 //ms
  423. #define CASCADE_CNT 0
  424. #define PHASE_GROUP 8
  425. #define CHANNEL_DELAY 8
  426. #define PROD_POWER_TYPE 1
  427. #define USE_BEEP 1
  428. #define USE_LED 1
  429. #define BRD_MAX 1
  430. #elif (defined PRJ_IP_DEBIAO_AC_I3_O1)
  431. #define LANGUAGE 1
  432. #define SMPLE_TIME 30 //ms
  433. #define SAVE_TIME 60000 //ms
  434. #define CASCADE_CNT 0
  435. #define PHASE_GROUP 4
  436. #define CHANNEL_DELAY 8
  437. #define PROD_POWER_TYPE 5
  438. #define USE_BEEP 1
  439. #define BRD_MAX 3
  440. #define USE_LED 1
  441. #else
  442. #error define a PRJ_XXXX please!
  443. #endif
  444. #endif