配置温度检测相关设置,在温度范围内才可以给充电盒电池充电。 #define TCFG_TEMPERATURE_ENABLE ENABLE_THIS_MOUDLE #define TCFG_CHARGE_TEMP_IO IO_PORTB_01
#define TCFG_CHARGE_TEMP_AD_CH ADC_CH_PB1 #define TCFG_CHARGE_EXTERN_UP_ENABLE DISABLE_THIS_MOUDLE #define TCFG_RES_UP 100 #define CHARGE_TEMP_ABNORMAL_LOW (330)//温度异常的低值 33k #define CHARGE_TEMP_NORMAL_LOW (250)//温度正常的低值 25k #define CHARGE_TEMP_NORMAL_HIGH (53)//温度正常的低值 5.3k #define CHARGE_TEMP_ABNORMAL_HIGH (43)//温度异常的低值 4.3k #define CHARGE_TEMP_AVG_COUNTS (100)//取 100 次平均值
12-10
422
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-08
12-22
200
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-29
491
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)