mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-09-13 14:10:23 +00:00
nxscope/nxscope_pser.c: use xmodem crc16 directly
use crc16xmodem directly to avoid using confusing crc16() Signed-off-by: raiden00pl <raiden00@railab.me>
This commit is contained in:
parent
70f28553c6
commit
ac12971ac9
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue