Skip to content

Commit ac12971

Browse files
raiden00planchao
authored andcommitted
nxscope/nxscope_pser.c: use xmodem crc16 directly
use crc16xmodem directly to avoid using confusing crc16() Signed-off-by: raiden00pl <[email protected]>
1 parent 70f2855 commit ac12971

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

logging/nxscope/nxscope_pser.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static int nxscope_frame_get(FAR struct nxscope_proto_s *p,
184184

185185
/* Verify crc16 for the whole frame */
186186

187-
crc = crc16(&buff[i], hdr->len);
187+
crc = crc16xmodem(&buff[i], hdr->len);
188188
if (crc != 0)
189189
{
190190
_err("ERROR: invalid crc16 %d\n", crc);
@@ -238,7 +238,7 @@ static int nxscope_frame_final(FAR struct nxscope_proto_s *p,
238238
* final xor value = 0x0000
239239
*/
240240

241-
crc = crc16(buff, *len);
241+
crc = crc16xmodem(buff, *len);
242242

243243
#ifdef CONFIG_ENDIAN_BIG
244244
buff[(*len)++] = (crc >> 0) & 0xff;

0 commit comments

Comments
 (0)