mirror of
https://github.com/apache/nuttx.git
synced 2026-10-10 07:40:27 +00:00
The CS, MOSI and MISO pins can be set to -1 in Kconfig when the board does not use them, and esp32s3_spi_init() skips a pin when it is negative. The pins are stored as uint8_t in esp32s3_spi_config_s, so -1 becomes 255, every "pin >= 0" check is always true, and 255 is passed to esp_gpiowrite() and esp_configgpio(), which trips their DEBUGASSERT. Store these three pins as int8_t so -1 is kept and the existing checks work. Fixes apache/nuttx#20186 Assisted-by: Grok Bot Signed-off-by: Zhaoqi Xu <lzy00419@outlook.com> |
||
|---|---|---|
| .. | ||
| include | ||
| src | ||
| CMakeLists.txt | ||
| Kconfig | ||