From a4a2d5ff7d46a7643f632e437d727f3facb2b4b5 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 21 Jan 2021 13:50:52 +0900 Subject: [PATCH] esp32_dma_init: Fix a dubious assertion Requiring the size to be a multiple of 3 is a very strange restriction. It doesn't even work with the default value of SPI_SLAVE_BUFSIZE. I guess it was a typo. --- arch/xtensa/src/esp32/esp32_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/src/esp32/esp32_dma.c b/arch/xtensa/src/esp32/esp32_dma.c index 1b7a1a40acf..c085753b9af 100644 --- a/arch/xtensa/src/esp32/esp32_dma.c +++ b/arch/xtensa/src/esp32/esp32_dma.c @@ -69,7 +69,7 @@ uint32_t esp32_dma_init(struct esp32_dmadesc_s *dmadesc, uint32_t num, DEBUGASSERT(pbuf && len); if (isrx) { - DEBUGASSERT((len % 3) == 0); + DEBUGASSERT((len & 3) == 0); } for (i = 0; i < num; i++)