From 6c640c8338156192c40c82165b71e07bad33b5db Mon Sep 17 00:00:00 2001 From: bmy <2583236812@qq.com> Date: Mon, 22 Apr 2024 12:45:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dcrc=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E6=96=B0=E4=B8=80=E6=AC=A1=E8=AE=A1=E7=AE=97=E5=89=8D=E6=9C=AA?= =?UTF-8?q?=E6=B8=85=E9=99=A4=E6=95=B0=E6=8D=AE=E5=AF=84=E5=AD=98=E5=99=A8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/src/by_crc16.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/project/src/by_crc16.c b/project/src/by_crc16.c index 61c69ea..72d173f 100644 --- a/project/src/by_crc16.c +++ b/project/src/by_crc16.c @@ -4,6 +4,8 @@ uint16_t by_crc16_calculate(void *pbuffer, uint32_t length) { const uint8_t *pbuffer_u8 = (uint8_t *)pbuffer; + crc_data_reset(); + for (uint32_t index = 0; index < length; index++) { (*(uint8_t *)&CRC->dt) = pbuffer_u8[index]; }