generated from hulk/gd32e23x_template
	设置喂狗时间为1S,并添加M3指令为复位指令,但是可能无效。修改了数据获取方式,从一直持续获取改为每次申请获取。
This commit is contained in:
		| @@ -28,7 +28,7 @@ | ||||
|  | ||||
| /******************************************************************************/ | ||||
|  | ||||
| #define I2C_TIME_OUT    (uint16_t)(10000) | ||||
| #define I2C_TIME_OUT    (uint16_t)(5000) | ||||
| #define I2C_OK          1 | ||||
| #define I2C_FAIL        0 | ||||
| #define I2C_END         1 | ||||
|   | ||||
| @@ -43,12 +43,13 @@ | ||||
|  | ||||
| /******************************************************************************/ | ||||
|  | ||||
| #define LDC1612_CONVERSION_TIME_CH0        0X0546  //0536 | ||||
| #define LDC1612_DRIVE_CURRENT              0X9000  //A000 | ||||
| #define LDC1612_MUX_CONFIG                 0X020C  // no auto scan and filter bandwidth 3.3MHz | ||||
| #define LDC1612_SENSOR_CONFIG              0X1601 | ||||
| #define LDC1612_CONVERSION_TIME_CH0        0x0546  //0536 | ||||
| #define LDC1612_DRIVE_CURRENT              0x9000  //A000 | ||||
| #define LDC1612_MUX_CONFIG                 0x020C  // no auto scan and filter bandwidth 3.3MHz | ||||
| #define LDC1612_SENSOR_CONFIG              0x1601 | ||||
| #define LDC1612_ERROR_CONFIG               0x0000 | ||||
| #define LC_STABILIZE_TIME_CH0              0X001E //30 | ||||
| #define LC_STABILIZE_TIME_CH0              0x001E //30 | ||||
| #define LDC1612_RESET_DEV                  0x8000 //[15:0] 0b1000 0000 0000 0000 | ||||
|  | ||||
| /******************************************************************************/ | ||||
|  | ||||
|   | ||||
| @@ -39,4 +39,6 @@ OF SUCH DAMAGE. | ||||
|  | ||||
| void watchdog_init(void); | ||||
|  | ||||
| void reset_mcu(void); | ||||
|  | ||||
| #endif /* MAIN_H */ | ||||
|   | ||||
| @@ -13,6 +13,9 @@ | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <sys/types.h> | ||||
| #include "i2c.h" | ||||
| #include "ldc1612.h" | ||||
| #include "tmp112.h" | ||||
|  | ||||
| /******************************************************************************/ | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user