This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 6ca67e406160bfa7bb373b4a4a87a004b8bef9f5 Author: liaoao <[email protected]> AuthorDate: Tue Feb 25 19:13:51 2025 +0800 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 <[email protected]> --- drivers/rpmsg/rpmsg_port_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rpmsg/rpmsg_port_spi.c b/drivers/rpmsg/rpmsg_port_spi.c index ad74cbcb475..db227192aa8 100644 --- a/drivers/rpmsg/rpmsg_port_spi.c +++ b/drivers/rpmsg/rpmsg_port_spi.c @@ -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);
