Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile for ESP32S3 #1615

Open
TTXL3099 opened this issue Apr 20, 2024 · 1 comment
Open

Cannot compile for ESP32S3 #1615

TTXL3099 opened this issue Apr 20, 2024 · 1 comment

Comments

@TTXL3099
Copy link

When I tried to compile for the ESP32S3, the arduinoIDE reported an error

note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
 #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:\G\Mixly2.0\testArduino\testArduino.ino:178:26: error: 'VSPI' was not declared in this scope
  SPIClass spi = SPIClass(VSPI);
                          ^~~~
E:\G\Mixly2.0\testArduino\testArduino.ino:178:26: note: suggested alternative: 'SPI'
  SPIClass spi = SPIClass(VSPI);
                          ^~~~
                          SPI

I've already tried #1610 #1552 But still
arduinoIDE 1.8.19
ESP32 2.0.15
@coryking
Please excuse my poor English……

@huster-songtao
Copy link

To enable the hardware SPI driver, add the following line before including FastLED.h:

#define FASTLED_ALL_PINS_HARDWARE_SPI
This driver uses the VSPI bus by default (GPIO 18, 19, 23, & 5). To use the HSPI bus (GPIO 14, 12, 13, & 15) add the following line before including FastLED.h:
#define FASTLED_ESP32_SPI_BUS HSPI

* #define FASTLED_ESP32_SPI_BUS HSPI

// Conditional compilation for ESP32-S3 to utilize its flexible SPI capabilities
#if CONFIG_IDF_TARGET_ESP32S3
#pragma message "Targeting ESP32S3, which has better SPI support. Configuring for flexible pin assignment."
#undef FASTLED_ESP32_SPI_BUS
// I think we have to "fake" being FSPI... there might be a better way to do this.
// whatever the case, this "tricks" the pin assignment defines below into using DATA_PIN & CLOCK_PIN
#define FASTLED_ESP32_SPI_BUS FSPI
#else // Configuration for other ESP32 variants
#ifndef FASTLED_ESP32_SPI_BUS
#pragma message "Setting ESP32 SPI bus to VSPI by default"
#define FASTLED_ESP32_SPI_BUS VSPI
#endif
#endif

I'm also looking at solutions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants