xiaoxiang781216 commented on code in PR #11340: URL: https://github.com/apache/nuttx/pull/11340#discussion_r1418880475
########## arch/xtensa/src/esp32s3/esp32s3_spiflash_mtd.c: ########## @@ -194,9 +367,20 @@ static int esp32s3_erase(struct mtd_dev_s *dev, off_t startblock, return ret; } +#ifdef CONFIG_ESP32S3_SPI_FLASH_SUPPORT_PSRAM_STACK + if (stack_is_psram()) + { + ret = esp32s3_async_op(SPIFLASH_OP_CODE_ERASE, offset, NULL, nbytes); + } + else + { + ret = spi_flash_erase_range(offset, nbytes); + } +#else ret = spi_flash_erase_range(offset, nbytes); Review Comment: let's change ALL to: ``` #ifdef CONFIG_ESP32S3_SPI_FLASH_SUPPORT_PSRAM_STACK if (stack_is_psram()) { ret = esp32s3_async_op(SPIFLASH_OP_CODE_ERASE, offset, NULL, nbytes); } else #endif { ret = spi_flash_erase_range(offset, nbytes); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org