lexus2k / lcdgfx

Driver for LCD displays running on Arduino/Avr/ESP32/Linux (including Rasperry) platforms
MIT License
391 stars 55 forks source link

'SPI_DMA_DISABLED' was not declared #81

Closed KaiJiao closed 2 years ago

KaiJiao commented 2 years ago

Describe the bug C:\Users\jiao\Documents\Arduino\libraries\lcdgfx\src\lcd_hal\esp\esp32_spi.cpp: In member function 'void EspSpi::begin()': C:\Users\jiao\Documents\Arduino\libraries\lcdgfx\src\lcd_hal\esp\esp32_spi.cpp:90:66: error: 'SPI_DMA_DISABLED' was not declared in this scope: spi_bus_initialize(m_busId ? VSPI_HOST : HSPI_HOST, &buscfg, SPI_DMA_DISABLED); // 0 -no dma

When I verify an empty code which just include the lcdgfx library in Arduino IDE, it shows this error.

Do you know how can I modify it? Thank you very much!

Kai

微信截图_20220211050236
lexus2k commented 2 years ago

Hi, just replace SPI_DMA_DISABLED with 0.

This is inconsistency in different SDK versions.

lexus2k commented 2 years ago

Le me know if it works for you.

Also it would be nice to get know the version of the tools and the board you're using.

KaiJiao commented 2 years ago

Sorry for my late reply, yes that's work for me! Thank you very much!

lexus2k commented 2 years ago

To prevent such issue in the future, I have updated the code to use 0 on the latest master branch.

CNSNGopenSourceProjects commented 2 years ago

It should be nice if to publish this library fix for Arduino IDE. The bug fix work for me. Thank you.

lexus2k commented 2 years ago

Done. v1.1.4 will be available soon from Arduino IDE.