| 
									
										
										
										
											2024-09-28 14:24:04 +08:00
										 |  |  | /****************************************************************************
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT | 
					
						
							|  |  |  | be copied by any method or incorporated into another program without | 
					
						
							|  |  |  | the express written consent of Aerospace C.Power. This Information or any portion | 
					
						
							|  |  |  | thereof remains the property of Aerospace C.Power. The Information contained herein | 
					
						
							|  |  |  | is believed to be accurate and Aerospace C.Power assumes no responsibility or | 
					
						
							|  |  |  | liability for its use in any way and conveys no license or title under | 
					
						
							|  |  |  | any patent or copyright and makes no representation or warranty that this | 
					
						
							|  |  |  | Information is free from patent or copyright infringement. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ****************************************************************************/ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifndef IOT_BOARD_INFO_H
 | 
					
						
							|  |  |  | #define IOT_BOARD_INFO_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "iot_board_api.h"
 | 
					
						
							|  |  |  | #include "iot_version.h"
 | 
					
						
							|  |  |  | #include "iot_config_api.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | extern "C" { | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* [NOTE]:the newly defined hardware version number needs to be added to
 | 
					
						
							|  |  |  |  * iot_hardware_version_check. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /************************ distribution network project ************************/ | 
					
						
							|  |  |  | /* define the hardware version number of the old version of PW CCO module,
 | 
					
						
							|  |  |  |  * the module has stopped production. The definition here is only for | 
					
						
							|  |  |  |  * compatibility consideration | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #define HW_VERSION_DEFAULT              0x00000000  //00.00.00.00
 | 
					
						
							|  |  |  | #define HW_VERSION_INVALID              0xFFFFFFFF  //255.255.255.255
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define HW_VERSION_CCO_PW_V1            0x4B0B0204  //75.11.02.04
 | 
					
						
							|  |  |  | #define HW_VERSION_CCO_PW_V2            0x4B0C0104  //75.12.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_CCO_PW_V3            0x4B0D0104  //75.13.01.04
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* define sta and 3ps(PW, has tsfm load sending function) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_PW_LOAD_V1_0     0x4F0A0104  //79.10.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_STA_PW_LOAD_V2_0         0x4F140104  //79.20.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_STA_PW_LOAD_V3_0         0x4F1E010A  //79.30.01.10
 | 
					
						
							|  |  |  | #define HW_VERSION_IIC_PW_LOAD_V1_0         0x530A0104  //83.10.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_3PS_PW_LOAD_V1_0         0x540A0104  //84.10.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_3PS_PW_LOAD_V2_0         0x541E010A  //84.30.01.10
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* the old version of BRMT hardware has been abandoned, but the modules that
 | 
					
						
							|  |  |  |  * have been shipped need to be supported. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_I3C_V1          0x480A0104  //72.10.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_I3C_V1_3        0x480D0304  //72.13.03.04
 | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_I3C_V1_5        0x480F0104  //72.15.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_I3C_V2_0        0x48140104  //72.20.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_I3C_V2_2        0x48160104  //72.22.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_I3C_V2_3        0x48170104  //72.23.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_I3C_V2_4        0x48180104  //72.24.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_I3C_V2_5        0x48190104  //72.25.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_I3C_V2_5_2      0x48190105  //72.25.01.05
 | 
					
						
							|  |  |  | /* miniaturized I3C, the small load transmitting circuit is 2A constant
 | 
					
						
							|  |  |  |  * resistance. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_TLOAD_RZC_V1_1          0x48290101  //72.41.01.01
 | 
					
						
							|  |  |  | /* I3C, the small load transmitting circuit is 2A constant resistance */ | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_TLOAD_RZC_V1_0          0x48380105  //72.56.01.05
 | 
					
						
							|  |  |  | /* miniaturized I3C, the small load transmitting circuit is 400mA constant
 | 
					
						
							|  |  |  |  * current. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_TLOAD_400MA_RZC_V1_1    0x48290105  //72.41.01.05
 | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_TLOAD_RPA_V1_0          0x48380106  //72.56.01.06
 | 
					
						
							|  |  |  | /* define BRMT I3C class B V1.0 hardware version,
 | 
					
						
							|  |  |  |  * the hardware is changed from 72.23.01.04 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_I3C_B_V1_0      0x48500104  //72.80.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_BRMT_I3C_B_V1_1      0x48510104  //72.81.01.04
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* Hardware identification code of old version of TFMT */ | 
					
						
							|  |  |  | #define HW_VERSION_TFMT_I3C_V1_2        0x470C0104  //71.12.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_TFMT_I3C_V1_3        0x470D0104  //71.13.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_TFMT_I3C_V1_5        0x470F0100  //71.15.01.00
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* define BRK I3C V2 hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_BRK_I3C_V2           0x4D140104  //77.20.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_BRK_I3C_V2_1         0x4D150104  //77.21.01.04
 | 
					
						
							|  |  |  | /* define 630A-BRK I3C V2 hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_BRK_630A_I3C_V1      0x500A0104  //80.10.01.04
 | 
					
						
							|  |  |  | /* define Non-electric control BRK hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_BRK_NECTL_V1         0x510A0104  //81.10.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_BRK_NECTL_PA_V1      0x510A010C  //81.10.01.12
 | 
					
						
							|  |  |  | #define HW_VERSION_BRK_NECTL_TLAOD_RZC_V1   0x550A0104  //85.10.01.04
 | 
					
						
							|  |  |  | #define HW_VERSION_BRK_NECTL_TLOAD_RPA_V1   0x550A010C  //85.10.01.12
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* define BSRM hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_BSRM_V1              0x560A0100  //86.10.1.0
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* hardware version code of Zhengtai measurement switch module */ | 
					
						
							|  |  |  | #define HW_VERSION_BRKSTA_V1_0          0x590A0100  //89.10.1.0
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**************************** state grid project ******************************/ | 
					
						
							|  |  |  | /* sta specially supplied to gansu, uses software for in-situ detection */ | 
					
						
							|  |  |  | #define HW_VERSION_GS_NO_IPD_STA        0x01030101  //01.03.01.01(old naming rules)
 | 
					
						
							|  |  |  | /* 3ps/cco specially supplied to gansu, uses software for in-situ detection */ | 
					
						
							|  |  |  | #define HW_VERSION_GS_NO_IPD_STA_3P     0x01020101  //01.02.01.01(old naming rules)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* The hardware version number of 6 pass zero detection GPIO version 1. */ | 
					
						
							|  |  |  | #define HW_VERSION_CCO_6_ZC_V1          0x330A0100  //51.10.01.00
 | 
					
						
							|  |  |  | /* The hardware version number of 6 pass zero detection GPIO version 2. */ | 
					
						
							|  |  |  | #define HW_VERSION_CCO_6_ZC_V2          0x200C0801  //32.12.08.01
 | 
					
						
							|  |  |  | /* define cco (ntb and 3 zc) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_CCO_3_ZC_V1          0x1E320802  //30.50.08.02
 | 
					
						
							|  |  |  | /* define the hardware version number of new CCO V1 version of USB (FT232) */ | 
					
						
							|  |  |  | #define HW_VERSION_CCO_USB_V1           0x1F0A0100  //31.10.01.00
 | 
					
						
							|  |  |  | /* define the hardware version number of new CCO V2 version of USB (STM32) */ | 
					
						
							|  |  |  | #define HW_VERSION_CCO_USB_V2           0x1F140200  //31.20.02.00
 | 
					
						
							|  |  |  | /* define the hardware version number of new CCO V3 version of USB (GD32) */ | 
					
						
							|  |  |  | #define HW_VERSION_CCO_USB_V3           0x1F140201  //31.20.02.01
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* dual mode cco version 1 */ | 
					
						
							|  |  |  | #define HW_VERSION_CCO_DM_V1            0x0D0A0200  //13.10.02.00
 | 
					
						
							|  |  |  | /* define hx oversea hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_CCO_DM_V2            0x0D0A080B  //13.10.08.11
 | 
					
						
							|  |  |  | /* define hx and kx oversea hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_CCO_DM_V3            0x0D0A080C  //13.10.08.12
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* define iic (psram) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_IIC_PSRAM            0x3D0A0108  //61.10.01.08
 | 
					
						
							|  |  |  | /* define iic (extern flash) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_IIC_FLASH_EXT        0x3E140200  //62.20.02.00
 | 
					
						
							|  |  |  | /* define iic (ntb and extern flash) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_IIC_ZC_V1_FLASH_EXT  0x3E140908  //62.20.09.08
 | 
					
						
							|  |  |  | /* define MT iic (extern flash) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_IIC_MT_FLASH_EXT     0x3E140909  //62.20.09.09
 | 
					
						
							|  |  |  | /* define iic (load for zhejiang) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_IIC_LOAD_V1          0x3F0A0909  //63.10.09.09
 | 
					
						
							|  |  |  | /* dual mode(plc + rf) iic (load) version 1 */ | 
					
						
							|  |  |  | #define HW_VERSION_IIC_DM_LOAD_V1       0x0D0A041D  //13.10.04.29
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* define sta and 3ps (extern flash) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_FLASH_EXT    0x290A0100  //41.10.01.00
 | 
					
						
							|  |  |  | /* define sta and 3ps (ntb tsfm for LiaoNing) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_ZC_V1        0x290A0909  //41.10.09.09
 | 
					
						
							|  |  |  | /* define sta and 3ps (load for zhejiang) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_LOAD_V1      0x2A0A0909  //42.10.09.09
 | 
					
						
							|  |  |  | /* define sta and 3ps (load for nw 21) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_LOAD_V2      0x540E0201  //84.14.02.01
 | 
					
						
							|  |  |  | /* define sta (pw zc for beijing) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_ZC_V2        0x29140200  //41.20.02.00
 | 
					
						
							|  |  |  | /* define sta and 3ps (ntb nw21) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_ZC_V3        0x28330101  //40.51.01.01
 | 
					
						
							|  |  |  | /* define sta and 3ps (ntb tsfm and extern flash) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_ZC_V1_FLASH_EXT  0x290A0908  //41.10.09.08
 | 
					
						
							|  |  |  | /* define sta and 3ps (ntb tsfm and load zhejiang) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_ZC_V1_LOAD_V1    0x2A0A0908  //42.10.09.08
 | 
					
						
							|  |  |  | /* define sta and 3ps (SW overseas) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_SW_OVERSEAS  0x2A0A0907  //42.10.09.07
 | 
					
						
							|  |  |  | /* define sta and 3ps (SX overseas) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_SX_OVERSEAS  0x2A0A0906  //42.10.09.06
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* dual mode sta and 3ps version 1 */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_DM_V1        0x0D0A0109  //13.10.01.09
 | 
					
						
							|  |  |  | /* dual mode sta and 3ps version 2, for htzd */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_DM_V2        0x0D0A020B  //13.10.02.11
 | 
					
						
							|  |  |  | /* dual mode sta and 3ps version 3, for sumsung oversea */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_DM_V3        0x0D0A020C  //13.10.02.12
 | 
					
						
							|  |  |  | /* dual mode sta version 4, for hx oversea */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_DM_V4         0x0D0A020D  //13.10.02.13
 | 
					
						
							|  |  |  | /* dual mode sta and 3ps version 4, for hx oversea */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_DM_V4     0x0D0A020E  //13.10.02.14
 | 
					
						
							|  |  |  | /* dual mode sta version 5, for hx oversea kx ver */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_DM_V5         0x0D0A020F  //13.10.02.15
 | 
					
						
							|  |  |  | /* dual mode sta and 3ps (load) version 1 */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_DM_LOAD_V1   0x0D0A011D  //13.10.1.29
 | 
					
						
							|  |  |  | /* dual mode sta and 3ps (extern flash) version 1 */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_DM_FLASH_EXT_V1   0x0D0F0109  //13.15.1.9
 | 
					
						
							|  |  |  | /* dual mode sta and 3ps (load and extern flash) version 2 */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_3PS_DM_LOAD_FLASH_EXT_V2   0x0D0F010D  //13.15.1.13
 | 
					
						
							|  |  |  | /* define sta(load for tongke nw 21) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_LOAD_V3           0x0D28010B  //13.40.01.11
 | 
					
						
							|  |  |  | /* define 3ps (load and extern flash for tongke nw 21) hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_3PS_LOAD_FLASH_EXT_V3 0x0D28020D  //13.40.02.13
 | 
					
						
							|  |  |  | /* dual mode spg 3ps (extern flash) version 1, for southern power grid version */ | 
					
						
							|  |  |  | #define HW_VERSION_3PS_SPG_DM_FLASH_EXT_V1   0x0D0A0210  //13.10.02.16
 | 
					
						
							|  |  |  | /* dual mode xvji bsrm version 1 */ | 
					
						
							|  |  |  | #define HW_VERSION_BSRM_DM_V1           0x0D0A010A  //13.10.01.10
 | 
					
						
							|  |  |  | /* define sta03 run in cco03 for CKQ version*/ | 
					
						
							|  |  |  | #define HW_VERSION_STA_CKQ_DM_V1        0x0D0A010C  //13.10.01.12
 | 
					
						
							|  |  |  | /* dual mode spg sta(extern flash) version 1, for southern power grid version */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_SPG_DM_FLASH_EXT_V1        0x0D0A010D  //13.10.01.13
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* define dt cco dm hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_DT_CCO_DM_V1         0x0D0A083D  //13.10.08.61
 | 
					
						
							|  |  |  | /* define dt 3ps dm hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_DT_3PS_DM_V1         0x0D0A023D  //13.10.02.61
 | 
					
						
							|  |  |  | /* define dt 3ps dm (load) hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_DT_3PS_DM_LOAD_V1    0x0D0A023E  //13.10.02.62
 | 
					
						
							|  |  |  | /* define dt sta03 dm hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_DT_STA_DM_V1         0x0D0A013D  //13.10.01.61
 | 
					
						
							|  |  |  | /* define dt sta03 dm (load) hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_DT_STA_DM_LOAD_V1    0x0D0A013E  //13.10.01.62
 | 
					
						
							|  |  |  | /* define dt iic dm hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_DT_IIC_DM_V1         0x0D0B043D  //13.11.04.61
 | 
					
						
							|  |  |  | /* define dt iic dm (load) hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_DT_IIC_DM_LOAD_V1    0x0D0B043E  //13.11.04.62
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* define yp 3ps dm hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_YP_3PS_DM_V1         0x0D0A0247  //13.10.02.71
 | 
					
						
							|  |  |  | /* define yp sta03 dm hardware version */ | 
					
						
							|  |  |  | #define HW_VERSION_YP_STA_DM_V1         0x0D0A0147  //13.10.01.71
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*************************** mask subid chip **********************************/ | 
					
						
							|  |  |  | /* define qj coated chip hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_QJ_MASKCHIP_V1       0x0D0A0801  //13.10.08.01
 | 
					
						
							|  |  |  | /* define qj sta (extern flash) version*/ | 
					
						
							|  |  |  | #define HW_VERSION_QJ_STA_DM_FLASH_EXT_V1 0x0D0A0115 //13.10.01.21
 | 
					
						
							|  |  |  | /* define qj 3ps dm hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_STA_QJ_3PS_DM_V1     0x0D0A0215   //13.10.02.21
 | 
					
						
							|  |  |  | /* define qj spg sta dm hardware version1,for southern power grid version */ | 
					
						
							|  |  |  | #define HW_VERSION_QJ_STA_SPG_DM_V1     0x0D0A0116   //13.10.01.22
 | 
					
						
							|  |  |  | /* define qj spg 3ps dm hardware version1,for southern power grid version */ | 
					
						
							|  |  |  | #define HW_VERSION_QJ_3PS_SPG_DM_V1    0x0D0A0216   //13.10.02.22
 | 
					
						
							|  |  |  | /* define flx coated chip hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_FLX_MASKCHIP_V1      0x0D0A0802  //13.10.08.02
 | 
					
						
							|  |  |  | /* define flx 3ps dm hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_STA_FLX_3PS_DM_V0    0x0D0C021E  //13.12.02.30
 | 
					
						
							|  |  |  | /* define flx 3ps dm hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_STA_FLX_3PS_DM_V1    0x0D0A021F  //13.10.02.31
 | 
					
						
							|  |  |  | /* define spe coated chip hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_SPE_MASKCHIP_V1      0x0D0A0803  //13.10.08.03
 | 
					
						
							|  |  |  | /* define gx coated chip hardware version*/ | 
					
						
							|  |  |  | #define HW_VERSION_GX_MASKCHIP_V1       0x0D0A0804  //13.10.08.04
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*************************** iot project **************************************/ | 
					
						
							|  |  |  | /* iot ledc module, stamps package, 22 pins, old version */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT22P_CCO_STA_V1_0  0x640A0100  //100.10.01.00
 | 
					
						
							|  |  |  | /* iot ledc module, goldenfinger package, 17 pins, old version */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT17P_CCO_V1_0      0x650A0100  //101.10.01.00
 | 
					
						
							|  |  |  | #define HW_VERSION_IOT17P_STA_V1_0      0x650A010A  //101.10.01.10
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* iot ledc module, stamps package, yonglin */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_Y001S            0x640B0100  // 100.11.1.00
 | 
					
						
							|  |  |  | /* iot ledc module, stamps package, yonglin, kl3 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_Y001S_KL3        0x640B011E  // 100.11.1.30
 | 
					
						
							|  |  |  | /* iot ledc module, goldenfinger package, yonglin and ouzitong */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_Q111N_ISC        0x65140100  // 101.20.1.00
 | 
					
						
							|  |  |  | /* iot ledc module, goldenfinger package, yonglin and ouzitong, kl3 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_Q111N_ISC_KL3    0x6514011E  // 101.20.1.30
 | 
					
						
							|  |  |  | /* iot ledc module, stamps package, ouzitong */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_Q111N_ISF        0x660A0100  // 102.10.1.00
 | 
					
						
							|  |  |  | /* iot ledc module, stamps package, ouzitong, kl3 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_Q111N_ISF_KL3    0x660A011E  // 102.10.1.30
 | 
					
						
							|  |  |  | /* iot ledc module, stamps package, ouzitong */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_Q111N_H          0x670A0100  // 103.10.1.00
 | 
					
						
							|  |  |  | /* iot ledc module, stamps package, ouzitong, kl3 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_Q111N_H_KL3      0x670A011E  // 103.10.1.30
 | 
					
						
							|  |  |  | /* iot ledc module, stamps package, ouzitong */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_Q111N_HS         0x680A0100  // 104.10.1.00
 | 
					
						
							|  |  |  | /* iot ledc module, stamps package, ouzitong, kl3 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_Q111N_HS_KL3     0x680A011E  // 104.10.1.30
 | 
					
						
							|  |  |  | /* iot ledc module, goldenfinger package, huawei and ouzitong */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_Q111N_ISG        0x690A0100  // 105.10.1.00
 | 
					
						
							|  |  |  | /* iot ledc module, goldenfinger package, huawei and ouzitong, kl3 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_Q111N_ISG_KL3    0x690A011E  // 105.10.1.30
 | 
					
						
							|  |  |  | /* iot ledc module, customization(BOARD_SI301X_30P), siqi */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_CUS_SI301X       0x6B0A0100  // 107.10.1.00
 | 
					
						
							|  |  |  | /* iot ledc module, customization(BOARD_SI303X_30P), siqi kl3 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_CUS_SI303X_KL3   0x6B0A011E  // 107.10.1.30
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* iot module, version 2.0, with psram */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_LEDC_V2_0_P      0x6A0A0100  // 106.10.1.00
 | 
					
						
							|  |  |  | /* iot module, version 2.0, with psram, kl3 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_LEDC_V2_0_P_KL3  0x6A0A011E  // 106.10.1.30
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* iot module, version 2.0, without psram */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_LEDC_V2_0        0x6A0A0108  // 106.10.1.08
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* iot collector module, jingyi */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_LEDC_V3_0_JY     0x6C0A0100  // 108.10.1.00
 | 
					
						
							|  |  |  | /* iot collector module, jingyi kl3 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_LEDC_V3_0_JY_KL3 0x6C0A011E  // 108.10.1.30
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* iot concentrator module, version 2.0 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_CCTT_V2_0        0x5D0B0100  //93.11.01.00
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* D2D module, version 1.0 */ | 
					
						
							|  |  |  | #define HW_VERSION_D2D_V1_0             0x6E0A0100  //110.10.01.00
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* iot concentrator module, version 3.0 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_CCTT_V3_0        0x720A0100  //114.10.01.00
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* iot concentrator module, version 2.5 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_CCTT_V2_5        0x750A0100  //117.10.01.00
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* iot concentrator module, version 3.5 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_CCTT_V3_5        0x760A0100  //118.10.01.00
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* iot solar mppt sta, version 1.0 */ | 
					
						
							|  |  |  | #define HW_VERSION_IOT_MPPT_V1_0        0x630A0100  //99.10.01.00
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* hw ver:              SPM_STA_RSD_EI11_V1.0
 | 
					
						
							|  |  |  |  * hw ver num:          97.10.01.00 | 
					
						
							|  |  |  |  * application scene:   external junction box | 
					
						
							|  |  |  |  * main functions:      rsd; current, voltage, temperature acquisition; | 
					
						
							|  |  |  |  *                      isolation self-check; overload break; | 
					
						
							|  |  |  |  *                      no boot with underpower; power on with no output default. | 
					
						
							|  |  |  |  * release date:        2021-12-09 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #define HW_VERSION_PV_STA_RSD_EI11_V1_0 0x610A0100
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* hw ver:              SPM_STA_RSD_EI12_V1.0
 | 
					
						
							|  |  |  |  * hw ver num:          96.10.01.00 | 
					
						
							|  |  |  |  * application scene:   external junction box (one with two) | 
					
						
							|  |  |  |  * main functions:      rsd; current, voltage, temperature acquisition; | 
					
						
							|  |  |  |  *                      isolation self-check; overload break; | 
					
						
							|  |  |  |  *                      no boot with underpower; power on with no output default. | 
					
						
							|  |  |  |  * release date: | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | #define HW_VERSION_PV_STA_RSD_EI12_V1_0 0x600A0100
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-29 19:28:39 +08:00
										 |  |  | /* dual mode sta version 7, for Indonesia oversea */ | 
					
						
							|  |  |  | #define HW_VERSION_STA_DM_V7         0x0D0A0113  //13.10.1.19
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-28 14:24:04 +08:00
										 |  |  | /* board id should not change and keep same as xxx_OEM.ini */ | 
					
						
							|  |  |  | typedef enum board_id_t { | 
					
						
							|  |  |  |     BOARD_WQRDCCO01 = 1, | 
					
						
							|  |  |  |     BOARD_WQRDSTA01 = 2, | 
					
						
							|  |  |  |     BOARD_WQRDIIC01 = 3, | 
					
						
							|  |  |  |     BOARD_HTZDCCO01 = 4, | 
					
						
							|  |  |  |     BOARD_HTZDSTA01 = 5, | 
					
						
							|  |  |  |     BOARD_HTZDIIC01 = 6, | 
					
						
							|  |  |  |     BOARD_JSMTCCO01 = 7, | 
					
						
							|  |  |  |     BOARD_JSMTSTA01 = 8, | 
					
						
							|  |  |  |     BOARD_JSMTIIC01 = 9, | 
					
						
							|  |  |  |     BOARD_GLDQCCO01 = 10, | 
					
						
							|  |  |  |     BOARD_GLDQSTA01 = 11, | 
					
						
							|  |  |  |     BOARD_GLDQIIC01 = 12, | 
					
						
							|  |  |  |     BOARD_KL2CCO02  = 13, | 
					
						
							|  |  |  |     BOARD_WQRDSTA02 = 14, | 
					
						
							|  |  |  |     BOARD_DMPLSTA01 = 15,   /* Device manage platform with ADC module. Ver:01 */ | 
					
						
							|  |  |  |     BOARD_KL2AI02   = 16, | 
					
						
							|  |  |  |     BOARD_LEDCSTA01 = 17,   /* LED controller */ | 
					
						
							|  |  |  |     BOARD_GPRSCCO01 = 18,   /* UPLINK : ETH / GPRS(N11 CHIP) / UART */ | 
					
						
							|  |  |  |     BOARD_HTZDSTA02 = 19, | 
					
						
							|  |  |  |     BOARD_TIDECCO01 = 20,   /* tide MPLC */ | 
					
						
							|  |  |  |     BOARD_TIDESTA01 = 21,   /* tide MODEM */ | 
					
						
							|  |  |  |     BOARD_TIDEBRG01 = 22,   /* tide BRIGE */ | 
					
						
							|  |  |  |     BOARD_CPLTCCO02 = 23,   /* Charge plartform CCO. */ | 
					
						
							|  |  |  |     BOARD_CPLTSTA02 = 24,   /* Charge plartform STA. */ | 
					
						
							|  |  |  |     BOARD_LEDCCCO01 = 25, | 
					
						
							|  |  |  |     BOARD_BRMTCCO01 = 26, | 
					
						
							|  |  |  |     BOARD_BRMTSTA01 = 27, | 
					
						
							|  |  |  |     BOARD_BRMTI3C02 = 28, | 
					
						
							|  |  |  |     BOARD_IICCCO01  = 29,   /* IIC CCO board */ | 
					
						
							|  |  |  |     BOARD_BRKI3C02  = 30,   /* JR breaker STA. */ | 
					
						
							|  |  |  |     BOARD_TFMTI3C02 = 31,   /* transformer monitor */ | 
					
						
							|  |  |  |     BOARD_FLXCCO01  = 32, | 
					
						
							|  |  |  |     BOARD_FLXSTA01  = 33, | 
					
						
							|  |  |  |     BOARD_FLXIIC01  = 34, | 
					
						
							|  |  |  |     BOARD_FLX3PS01  = 35, | 
					
						
							|  |  |  |     BOARD_SOLRSTA01 = 36,   /* solar sta project, cco same as BOARD_HTZDCCO01 */ | 
					
						
							|  |  |  |     BOARD_SOLRADC01 = 37,   /* solar current detect project */ | 
					
						
							|  |  |  |     BOARD_SOLRADC02 = 38,   /* Current collect for photovoltatic project. */ | 
					
						
							|  |  |  |     BOARD_SOLRBRM02 = 39,   /* Branch idenfication for photovoltatic project. */ | 
					
						
							|  |  |  |     BOARD_BSRM02    = 40, | 
					
						
							|  |  |  |     BOARD_STAMP01   = 41,   /* iot module, stamps package, 22 pins */ | 
					
						
							|  |  |  |     BOARD_GOLDFINGER01 = 42,/* iot module, goldenfinger package, 17 pins */ | 
					
						
							|  |  |  |     BOARD_BRKSTA02  = 43,   /* Breaker STA, branch idenfication inside. */ | 
					
						
							|  |  |  |     BOARD_HTZDSTA03 = 44, | 
					
						
							|  |  |  |     BOARD_HTZDCCO03 = 45, | 
					
						
							|  |  |  |     BOARD_SI301X_30P = 46,  /* iot module, SI301X, 30 pins */ | 
					
						
							|  |  |  |     BOARD_LEDC3P001  = 47,  /* iot module ledc3.0 */ | 
					
						
							|  |  |  |     BOARD_EVB3031   = 48,   /* kl3 evb, chip 3031(k48, 6*6, 2m flash) */ | 
					
						
							|  |  |  |     BOARD_EVB3201   = 49,   /* kl3 evb, chip 3201(k76, 9*9, 4m flash, 8m psram) */ | 
					
						
							|  |  |  |     BOARD_EVB3211   = 50,   /* kl3 evb, chip 3211(k76, 9*9, 4m flash) */ | 
					
						
							|  |  |  |     BOARD_HTZD3PS03 = 51,   /* kl3 htzd 3-phase sta */ | 
					
						
							|  |  |  |     BOARD_FPGASTA03 = 52,   /* kl3 FPGA sta */ | 
					
						
							|  |  |  |     BOARD_FPGACCO03 = 53,   /* kl3 FPGA cco */ | 
					
						
							|  |  |  |     BOARD_LEDCSTA03 = 54,   /* kl3 LED controller */ | 
					
						
							|  |  |  |     BOARD_GOLDFINGER03 = 55,/* kl3 iot module, goldenfinger package, 17 pins */ | 
					
						
							|  |  |  |     BOARD_HTZDIIC03 = 56,   /* kl3 htzd iic */ | 
					
						
							|  |  |  |     BOARD_STAMP03   = 57,   /* kl3 iot module, stamps package, 22 pins */ | 
					
						
							|  |  |  |     BOARD_SI303X_30P = 58,  /* kl3 iot module, upgrade form BOARD_SI301X_30P */ | 
					
						
							|  |  |  |     BOARD_LEDC3P003  = 59,  /* kl3 iot module, ledc3.0 */ | 
					
						
							|  |  |  |     BOARD_SOLRSTA03 = 60,   /* kl3 iot module, solar sta project */ | 
					
						
							|  |  |  |     BOARD_QJSTA03   = 61,   /* kl3 QJ sta */ | 
					
						
							|  |  |  |     BOARD_QJ3PS03   = 62,   /* kl3 QJ 3-phase sta */ | 
					
						
							|  |  |  |     BOARD_QJCCO03   = 63,   /* kl3 QJ cco */ | 
					
						
							|  |  |  |     BOARD_EVB5580D  = 64,   /* kl3 QJ evb, chip 5580D(k76, 9*9, 4m flash, 8m psram) */ | 
					
						
							|  |  |  |     BOARD_EVB5582D  = 65,   /* kl3 QJ evb, chip 5582D(k76, 9*9, 4m flash) */ | 
					
						
							|  |  |  |     BOARD_EVB6710   = 66,   /* kl3 FLX evb, chip 6710(k76, 9*9, 4m flash, 8m psram) */ | 
					
						
							|  |  |  |     BOARD_EVB6711   = 67,   /* kl3 FLX evb, chip 6711(k76, 9*9, 4m flash) */ | 
					
						
							|  |  |  |     BOARD_FLXCCO03  = 68,   /* kl3 FLX cco */ | 
					
						
							|  |  |  |     BOARD_FLXSTA03  = 69,   /* kl3 FLX sta */ | 
					
						
							|  |  |  |     BOARD_FLXIIC03  = 70,   /* kl3 FLX iic */ | 
					
						
							|  |  |  |     BOARD_FLX3PS03  = 71,   /* kl3 FLX 3-phase sta */ | 
					
						
							|  |  |  |     BOARD_QJIIC03   = 72,   /* kl3 QJ IIC */ | 
					
						
							|  |  |  |     BOARD_HTZDCKB03 = 73,   /* kl3 htzd ckb */ | 
					
						
							|  |  |  |     BOARD_SPEIIC03  = 74,   /* kl3 SPE IIC */ | 
					
						
							|  |  |  |     BOARD_SPESTA03  = 75,   /* kl3 SPE STA */ | 
					
						
							|  |  |  |     BOARD_SPE3PS03  = 76,   /* kl3 SPE 3PS */ | 
					
						
							|  |  |  |     BOARD_SPECCO03  = 77,   /* kl3 SPE CCO */ | 
					
						
							|  |  |  |     BOARD_D2DCCO01  = 78,   /* kl1 d2d cco with eth driver */ | 
					
						
							|  |  |  |     BOARD_D2DSTA01  = 79,   /* kl1 d2d sta with eth driver */ | 
					
						
							|  |  |  |     BOARD_GXSTA03   = 80,   /* KL3 GX sta */ | 
					
						
							|  |  |  |     BOARD_GX3PS03   = 81,   /* KL3 GX 3-phase sta */ | 
					
						
							|  |  |  |     BOARD_GXCCO03   = 82,   /* KL3 GX cco */ | 
					
						
							|  |  |  |     BOARD_GXIIC03   = 83,   /* KL3 GX iic */ | 
					
						
							|  |  |  |     BOARD_EVB5202   = 84,   /* kl3 evb, chip 5202(k76, 9*9, 4m flash, 8m psram) */ | 
					
						
							|  |  |  |     BOARD_MICROCCTT01 = 85, /* k1l micro cctt 01 */ | 
					
						
							|  |  |  |     BOARD_FLXCKB03 = 86,    /* kl3 flx ckb */ | 
					
						
							|  |  |  |     BOARD_GXCKB03 = 87,     /* kl3 gx ckb */ | 
					
						
							|  |  |  |     BOARD_QJCKB03 = 88,     /* kl3 qj ckb */ | 
					
						
							|  |  |  |     BOARD_SPECKB03 = 89,    /* kl3 spe ckb */ | 
					
						
							|  |  |  |     BOARD_HTZDBSRM03 = 90,  /* kl3 htzd bsrm */ | 
					
						
							|  |  |  |     BOARD_DTCCO03   = 91,   /* KL3 DT cco */ | 
					
						
							|  |  |  |     BOARD_DT3PS03   = 92,   /* KL3 DT 3-phase sta */ | 
					
						
							|  |  |  |     BOARD_DTSTA03   = 93,   /* KL3 DT sta */ | 
					
						
							|  |  |  |     BOARD_BRMTI3C03 = 94,   /* KL3 ⅢC */ | 
					
						
							|  |  |  |     BOARD_DTIIC03   = 95,   /* KL3 DT iic */ | 
					
						
							|  |  |  |     BOARD_SOLRMPPT01 = 96,  /* solar mppt sta project */ | 
					
						
							|  |  |  |     BOARD_EVB3201RFIN = 97, /* KL3 RF in CCO */ | 
					
						
							|  |  |  |     BOARD_EVB3211RFIN = 98, /* KL3 RF in STA */ | 
					
						
							|  |  |  |     BOARD_HTZDPT03   = 99,  /* KL3 HTZD PT board */ | 
					
						
							|  |  |  |     BOARD_YPSTA03    = 100, /* KL3 YP sta */ | 
					
						
							|  |  |  |     BOARD_YP3PS03    = 101, /* KL3 YP 3-phase sta */ | 
					
						
							|  |  |  |     BOARD_YPCCO03    = 102, /* KL3 YP cco */ | 
					
						
							|  |  |  |     BOARD_YPCKB03    = 103, /* KL3 YP ckb */ | 
					
						
							|  |  |  |     BOARD_DTCKB03    = 104, /* KL3 DT ckb */ | 
					
						
							|  |  |  |     BOARD_HTR01      = 105, /* kl1 iot module, 14 pins */ | 
					
						
							|  |  |  |     BOARD_YPIIC03    = 106, /* kl3 yp iic */ | 
					
						
							|  |  |  | } board_id_t; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | typedef struct _chip_info { | 
					
						
							|  |  |  |     /* fw start address on the chip */ | 
					
						
							|  |  |  |     uint32_t fw_start_addr; | 
					
						
							|  |  |  |     /* chip magic number */ | 
					
						
							|  |  |  |     uint16_t magic_no; | 
					
						
							|  |  |  |     /* chip name */ | 
					
						
							|  |  |  |     uint8_t name[IOT_CHIP_NAME_BUFFER_MIN_LEN]; | 
					
						
							|  |  |  |     /* chip name length */ | 
					
						
							|  |  |  |     uint8_t name_len; | 
					
						
							|  |  |  | } chip_info_t; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | typedef struct _board_info_t { | 
					
						
							|  |  |  |     uint32_t    board_id; | 
					
						
							|  |  |  |     uint32_t    hw_ver; | 
					
						
							|  |  |  |     uint8_t     pin_num; | 
					
						
							|  |  |  |     void        *pin; | 
					
						
							|  |  |  |     chip_info_t chip_info; | 
					
						
							|  |  |  | } board_info_t; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | typedef struct board_status_t{ | 
					
						
							|  |  |  |     uint32_t rst_pwr_cnt; | 
					
						
							|  |  |  |     uint32_t rst_wdt_cnt; | 
					
						
							|  |  |  |     uint32_t rst_soft_cnt; | 
					
						
							|  |  |  |     uint8_t rst_reason; | 
					
						
							|  |  |  |     uint8_t rst_soft_reason; | 
					
						
							|  |  |  | }board_status; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void iot_board_cfg_init(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void iot_board_cfg_dump(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief   iot_board_reset_get_and_set  - get the reason of system reset and | 
					
						
							|  |  |  |  *              set default reset reason. call early in fw startup. | 
					
						
							|  |  |  |  * @param   NULL | 
					
						
							|  |  |  |  * @return  NULL | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | void iot_board_reset_get_and_set(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief   iot_board_reset_check  - check the reason of systrm reset | 
					
						
							|  |  |  |  * @param   NULL | 
					
						
							|  |  |  |  * @return  NULL | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | void iot_board_reset_check(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief   iot_board_soft_reset_mark  - set mark when soft reset occurs | 
					
						
							|  |  |  |  * @param   NULL | 
					
						
							|  |  |  |  * @return  NULL | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | void iot_board_soft_reset_mark(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief   load user build info from board config | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | void iot_board_load_user_build_info(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief   save user build info to board config | 
					
						
							|  |  |  |  * @param   info: build info to be saved | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | void iot_board_save_user_build_info(iot_build_info_t *info); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief   save user vendor id to board config | 
					
						
							|  |  |  |  * @param   vendor_id: vendor id to be saved | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | void iot_board_save_user_vendor_id(uint16_t vendor_id); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief   save user passcode to board config | 
					
						
							|  |  |  |  * @param   passcode: passcode to be saved | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | void iot_board_set_user_passcode(uint16_t passcode); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief   bond/unbond debug uart pin | 
					
						
							|  |  |  |  * @param   enable: | 
					
						
							|  |  |  |  *             true -- bond uart pin; | 
					
						
							|  |  |  |  *             false -- unbond uart pin; | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | void iot_board_debug_uart_pin_bond(bool_t enable); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief   if the port is rs485 uart | 
					
						
							|  |  |  |  * @param   enable: | 
					
						
							|  |  |  |  *             true -- is rs485 uart; | 
					
						
							|  |  |  |  *             false -- is not rs485 uart; | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | bool_t iot_board_check_uart_is_rs485(uint8_t port); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief  Get cert test uart port. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | uint8_t iot_board_get_cert_test_uart(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief  Get number of external UART port. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | uint8_t iot_board_get_external_uart_port_num(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief  Get number of virtual UART port. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | uint8_t iot_board_get_virtual_uart_port_num(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief  Get number of DMA UART port. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | uint8_t iot_board_get_dma_uart_port_num(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief  Get number of UART port on KL chip. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | uint8_t iot_board_get_onchip_uart_port_num(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief  Get number of interkernel communication UART port. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | uint8_t iot_board_get_interkernel_communication_uart_port_num(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief iot_board_hw_version_reload: reload the hw version hex info. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | void iot_board_hw_version_reload(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief iot_board_uart_tx_pin_set: save uart tx pin. | 
					
						
							|  |  |  |  * @param port:                 uart port | 
					
						
							|  |  |  |  * @param pin:                  TX GPIO | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | void iot_board_uart_tx_pin_set(uint8_t port, uint8_t pin); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief iot_board_uart_tx_pin_get: get uart tx pin. | 
					
						
							|  |  |  |  * @param port:                 uart port | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @return                      TX GPIO | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | uint8_t iot_board_uart_tx_pin_get(uint8_t port); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief iot_board_uart_rx_pin_set: save uart rx pin. | 
					
						
							|  |  |  |  * @param port:                 uart port | 
					
						
							|  |  |  |  * @param pin:                  RX GPIO | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | void iot_board_uart_rx_pin_set(uint8_t port, uint8_t pin); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief iot_board_uart_rx_pin_get: get uart rx pin. | 
					
						
							|  |  |  |  * @param port:                 uart port | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @return                      RX GPIO | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | uint8_t iot_board_uart_rx_pin_get(uint8_t port); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief   check if this board is 5v power in or not. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @return  true  - this board is 5v power in. | 
					
						
							|  |  |  |  *          false - this board is not 5v power in. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | bool_t iot_board_is_5v_power_in(void); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /**
 | 
					
						
							|  |  |  |  * @brief   check if this board is an overseas band. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @return  true  - this board is 5v power in. | 
					
						
							|  |  |  |  *          false - this board is not 5v power in. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | bool_t iot_board_is_overseas_rf_band(void); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-29 15:47:01 +08:00
										 |  |  | void write_hw_version(uint32_t hw_ver); | 
					
						
							| 
									
										
										
										
											2024-09-28 14:24:04 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | #ifdef __cplusplus
 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | #endif
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif /* IOT_BOARD_INFO_H */
 |