From ac12971ac9b8d7d8f24c1fd3e24774150eeb92e1 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Thu, 10 Apr 2025 09:45:17 +0200 Subject: [PATCH] nxscope/nxscope_pser.c: use xmodem crc16 directly use crc16xmodem directly to avoid using confusing crc16() Signed-off-by: raiden00pl --- logging/nxscope/nxscope_pser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logging/nxscope/nxscope_pser.c b/logging/nxscope/nxscope_pser.c index 95bbb60d8..89c2c74c2 100644 --- a/logging/nxscope/nxscope_pser.c +++ b/logging/nxscope/nxscope_pser.c @@ -184,7 +184,7 @@ static int nxscope_frame_get(FAR struct nxscope_proto_s *p, /* Verify crc16 for the whole frame */ - crc = crc16(&buff[i], hdr->len); + crc = crc16xmodem(&buff[i], hdr->len); if (crc != 0) { _err("ERROR: invalid crc16 %d\n", crc); @@ -238,7 +238,7 @@ static int nxscope_frame_final(FAR struct nxscope_proto_s *p, * final xor value = 0x0000 */ - crc = crc16(buff, *len); + crc = crc16xmodem(buff, *len); #ifdef CONFIG_ENDIAN_BIG buff[(*len)++] = (crc >> 0) & 0xff;