添加 HARD_VERSION 宏,根据硬件版本不同来确定power参数
This commit is contained in:
@@ -14,6 +14,38 @@
|
||||
#include "stm32f10x_tim.h"
|
||||
#include "stm32f10x_dac.h"
|
||||
#include "stm32f10x_i2c.h"
|
||||
|
||||
|
||||
|
||||
// 设置硬件版本
|
||||
#define HARD_VERSION 2
|
||||
|
||||
|
||||
#if HARD_VERSION==1
|
||||
// 电压倍数,旧板子21 新板子11
|
||||
#define V_PARAM_1 21
|
||||
// 参数2 旧板子143 新板子178
|
||||
#define V_PARAM_2 143
|
||||
// 电阻放大倍数 旧板子16 新板子79.7
|
||||
#define RES_MULTIPLE 16
|
||||
|
||||
#elif HARD_VERSION==2
|
||||
// 电压倍数,旧板子21 新板子11
|
||||
#define V_PARAM_1 11
|
||||
// 参数2 旧板子143 新板子178
|
||||
#define V_PARAM_2 178
|
||||
// 电阻放大倍数 旧板子16 新板子79.7
|
||||
#define RES_MULTIPLE 79.7
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define UNUSED(X) (void)X
|
||||
|
||||
#define SoftVersion 0x000D
|
||||
|
Reference in New Issue
Block a user