mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 04:52:02 +08:00
drivers/rpmsg_port_spi: check crc value only when crc is enabled
Allow one side enables crc check while the other side not enabled. Signed-off-by: liaoao <liaoao@xiaomi.com>
This commit is contained in:
@@ -384,7 +384,7 @@ static void rpmsg_port_spi_complete_handler(FAR void *arg)
|
||||
{
|
||||
uint16_t crc = rpmsg_port_spi_crc16(rpspi->rxhdr);
|
||||
|
||||
if (rpspi->rxhdr->crc != crc)
|
||||
if (crc != 0 && rpspi->rxhdr->crc != crc)
|
||||
{
|
||||
rpmsgerr("crc check fail received: %u calculated: %u\n",
|
||||
rpspi->rxhdr->crc, crc);
|
||||
|
||||
Reference in New Issue
Block a user