drivers/rpmsg: correct crc16 catalogue to CRC-16/IBM

This is the pair implementation relative to the Linux kernel

Signed-off-by: chao an <anchao.archer@bytedance.com>
This commit is contained in:
chao an
2025-04-09 18:57:06 +08:00
committed by Xiang Xiao
parent d240577543
commit 4e1e833b05
3 changed files with 5 additions and 5 deletions

View File

@@ -42,8 +42,8 @@
****************************************************************************/
#ifdef CONFIG_RPMSG_PORT_SPI_CRC
# define rpmsg_port_spi_crc16(hdr) crc16((FAR uint8_t *)&(hdr)->cmd, \
(hdr)->len - sizeof((hdr)->crc))
# define rpmsg_port_spi_crc16(hdr) crc16ibm((FAR uint8_t *)&(hdr)->cmd, \
(hdr)->len - sizeof((hdr)->crc))
#else
# define rpmsg_port_spi_crc16(hdr) 0
#endif

View File

@@ -42,8 +42,8 @@
****************************************************************************/
#ifdef CONFIG_RPMSG_PORT_SPI_CRC
# define rpmsg_port_spi_crc16(hdr) crc16((FAR uint8_t *)&(hdr)->cmd, \
(hdr)->len - sizeof((hdr)->crc))
# define rpmsg_port_spi_crc16(hdr) crc16ibm((FAR uint8_t *)&(hdr)->cmd, \
(hdr)->len - sizeof((hdr)->crc))
#else
# define rpmsg_port_spi_crc16(hdr) 0
#endif

View File

@@ -57,7 +57,7 @@
#ifdef CONFIG_RPMSG_PORT_UART_CRC
# define rpmsg_port_uart_crc16(hdr) \
crc16((FAR uint8_t *)&(hdr)->cmd, (hdr)->len - sizeof((hdr)->crc))
crc16ibm((FAR uint8_t *)&(hdr)->cmd, (hdr)->len - sizeof((hdr)->crc))
#else
# define rpmsg_port_uart_crc16(hdr) 0
#endif