解决EW写流水号数组越界的bug

解决0x20指令只会解析第一个槽参数的bug
    ew写延时添加crc8
This commit is contained in:
ranchuan
2023-12-25 18:46:51 +08:00
parent 5c2648d33c
commit a6ba0a1818
6 changed files with 33 additions and 19 deletions

View File

@@ -1233,8 +1233,9 @@ void JQ_Test_WriteSN(void)
uint8_t uc_ack;
uint8_t uc_otpAddr = 20;
uint8_t uc_writeCount = 4;
// 缓存开大一点防止数据越界
typedef union{
uint8_t arr[4];
uint8_t arr[6];
uint32_t data;
}temp_def;
temp_def temp={0};
@@ -1295,8 +1296,9 @@ void JQ_Test_ReadSN(void)
uint8_t uc_ack;
uint8_t uc_otpAddr = 20;
uint8_t uc_writeCount = 4;
// 缓存开大一点防止数据越界
typedef union{
uint8_t arr[4];
uint8_t arr[6];
uint32_t data;
}temp_def;
temp_def temp={0};
@@ -1347,8 +1349,9 @@ void JQ_Test_WriteDelay(void)
uint8_t uc_ack;
uint8_t uc_otpAddr = 15;
uint8_t uc_writeCount = 2;
// 缓存开大一点防止数据越界
typedef union{
uint8_t arr[2];
uint8_t arr[4];
uint16_t data;
}temp_def;
temp_def temp={0};