generated from hulk/gd32f4xx_template_cmake_vscode
Add M1 single-shot temp query command; NTC trimmed-mean filter
This commit is contained in:
+3
-2
@@ -27,7 +27,7 @@
|
||||
|
||||
/* >>>>>>>>>>>>>>>>>>>>[COMMAND DEBUG]<<<<<<<<<<<<<<<<<<<< */
|
||||
|
||||
#define COM_DEBUG CFG_ENABLE // CFG_DISABLE: Command debug off; CFG_ENABLE: Command debug on(调试期开启)
|
||||
#define COM_DEBUG CFG_DISABLE // CFG_DISABLE: Command debug off; CFG_ENABLE: Command debug on
|
||||
/* 命令协议框架已移植(Src/command.c,数据口 RS485),业务命令待定义 */
|
||||
|
||||
/* >>>>>>>>>>>>>>>>>>>>[DEBUG ASSERTIONS DEFINE]<<<<<<<<<<<<<<<<<<<< */
|
||||
@@ -82,7 +82,8 @@
|
||||
#define NTC_ADC ADC0
|
||||
#define NTC_ADC_CHANNEL ADC_CHANNEL_15
|
||||
#define NTC_SAMPLETIME ADC_SAMPLETIME_480 /* 长采样时间(高阻 NTC 分压源) */
|
||||
#define NTC_SAMPLE_COUNT 16U /* 单次测温的采样次数(均值降噪) */
|
||||
#define NTC_SAMPLE_COUNT 16U /* 单次测温的采样次数 */
|
||||
#define NTC_TRIM_COUNT 2U /* 修剪均值:每端去掉的最大/最小样本数(抗毛刺) */
|
||||
#define NTC_VREF 3.3f /* ADC 参考电压 V */
|
||||
#define NTC_ADC_MAX 4095.0f /* 12bit ADC 满量程 */
|
||||
#define NTC_R_PULL 10000.0f /* 上拉电阻(硬件) */
|
||||
|
||||
Reference in New Issue
Block a user