From 729baa450c61012c52e1a3963f6436d22aec41a9 Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Fri, 26 Jul 2024 16:48:20 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E9=97=AE?= =?utf8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../factorytest_service/factorytest_protocol.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c b/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c index 81a20fa43..7b1c96197 100644 --- a/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c +++ b/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c @@ -2,7 +2,7 @@ * @Author: penglei 1624952103@qq.com * @Date: 2024-06-17 14:31:08 * @LastEditors: penglei 1624952103@qq.com - * @LastEditTime: 2024-07-24 09:39:01 + * @LastEditTime: 2024-07-26 16:46:54 * @FilePath: /FD230/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c * @Description: * @@ -85,22 +85,6 @@ static uint32_t aging_time = 0; static uint8_t pwr_button_result = 0; static uint8_t func_button_result = 1; - -static int CRC16_XMODEM(uint8_t *bytes,uint16_t length) { - int crc = 0x0000; // initial value - int polynomial = 0x1021; - for (int index = 0; index < length; index++) { - uint8_t b = bytes[index]; - for (int i = 0; i < 8; i++) { - uint8_t bit = ((b >> (7 - i) & 1) == 1); - uint8_t c15 = ((crc >> 15 & 1) == 1); - crc <<= 1; - if (c15 ^ bit) crc ^= polynomial; - } - } - crc &= 0xffff; - return crc; -} errcode_t factorytest_protocol_replymsg(uint8_t mode, uint8_t submode,uint8_t testitem, uint8_t *input_data,uint16_t input_len) { -- 2.17.1