mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +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);
|
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",
|
rpmsgerr("crc check fail received: %u calculated: %u\n",
|
||||||
rpspi->rxhdr->crc, crc);
|
rpspi->rxhdr->crc, crc);
|
||||||
|
|||||||
Reference in New Issue
Block a user