generated from hulk/gd32e23x_template
Compare commits
No commits in common. "a02b3581c7ffcdc5b90b017608d754f7e7314d3c" and "2a0e0b40b64f3c7266c51f016acce57714de2060" have entirely different histories.
a02b3581c7
...
2a0e0b40b6
@ -9,8 +9,6 @@
|
|||||||
|
|
||||||
// #define DEBUG_VERBOES
|
// #define DEBUG_VERBOES
|
||||||
|
|
||||||
#define DEBUG_VOFA_TOOL
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
#define RCU_GPIO_I2C RCU_GPIOF
|
#define RCU_GPIO_I2C RCU_GPIOF
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
#define LDC1612_CONVERSION_TIME_CH0 0x0546 //0536
|
#define LDC1612_CONVERSION_TIME_CH0 0x0546 //0536
|
||||||
#define LDC1612_DRIVE_CURRENT 0x8800 //A000
|
#define LDC1612_DRIVE_CURRENT 0x9000 //A000
|
||||||
#define LDC1612_MUX_CONFIG 0x020C // no auto scan and filter bandwidth 3.3MHz
|
#define LDC1612_MUX_CONFIG 0x020C // no auto scan and filter bandwidth 3.3MHz
|
||||||
#define LDC1612_SENSOR_CONFIG 0x1601
|
#define LDC1612_SENSOR_CONFIG 0x1601
|
||||||
#define LDC1612_ERROR_CONFIG 0x0000
|
#define LDC1612_ERROR_CONFIG 0x0000
|
||||||
|
@ -131,14 +131,6 @@ void eddy_current_value_report(void) {
|
|||||||
package_data[2] = (eddy_current_value_uint32 >> 8) & 0xFF;
|
package_data[2] = (eddy_current_value_uint32 >> 8) & 0xFF;
|
||||||
package_data[3] = eddy_current_value_uint32 & 0xFF;
|
package_data[3] = eddy_current_value_uint32 & 0xFF;
|
||||||
|
|
||||||
#ifdef DEBUG_VOFA_TOOL
|
|
||||||
printf("%d\n", eddy_current_value_uint32);
|
|
||||||
#else
|
|
||||||
package_data[0] = (eddy_current_value_uint32 >> 24) & 0xFF;
|
|
||||||
package_data[1] = (eddy_current_value_uint32 >> 16) & 0xFF;
|
|
||||||
package_data[2] = (eddy_current_value_uint32 >> 8) & 0xFF;
|
|
||||||
package_data[3] = eddy_current_value_uint32 & 0xFF;
|
|
||||||
|
|
||||||
uint8_t combined_data[7];
|
uint8_t combined_data[7];
|
||||||
memcpy(combined_data, package_header, 3);
|
memcpy(combined_data, package_header, 3);
|
||||||
memcpy(combined_data + 3, package_data, 4);
|
memcpy(combined_data + 3, package_data, 4);
|
||||||
@ -146,7 +138,6 @@ void eddy_current_value_report(void) {
|
|||||||
printf("%c%c%c", package_header[0], package_header[1], package_header[2]);
|
printf("%c%c%c", package_header[0], package_header[1], package_header[2]);
|
||||||
printf("%c%c%c%c", package_data[0], package_data[1], package_data[2], package_data[3]);
|
printf("%c%c%c%c", package_data[0], package_data[1], package_data[2], package_data[3]);
|
||||||
printf("%c", calculate_crc(combined_data, 8));
|
printf("%c", calculate_crc(combined_data, 8));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tempture_value_report(void) {
|
void tempture_value_report(void) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user