mirror of
https://github.com/apache/nuttx.git
synced 2025-12-16 09:45:18 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user