mirror of
https://github.com/apache/nuttx.git
synced 2026-10-11 08:10:21 +00: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:
parent
de5ec3be6c
commit
6ca67e4061
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue