-
Notifications
You must be signed in to change notification settings - Fork 132
Description
Hi,
Based on my review of the code in ELECHOUSE_CC1101_SRC_DRV.cpp, specifically around line 288, the library only supports classic ESP32 boards.
The SPI pins are hardcoded, which causes connection issues on newer boards such as ESP32-S2 and ESP32-S3, where SPI pin definitions are different and should be taken from the core.
Current Code (around line 297)
SCK_PIN = 18; MISO_PIN = 19; MOSI_PIN = 23; SS_PIN = 5;
Problem
These fixed pin values work only for older ESP32 modules.
ESP32-S2 and ESP32-S3 require using the SPI pin definitions provided by the Arduino core (SCK, MISO, MOSI, SS) to ensure correct hardware mapping.
Suggested Fix
Replace the hardcoded pins with the standard SPI definitions:
SCK_PIN = SCK; MISO_PIN = MISO; MOSI_PIN = MOSI; SS_PIN = SS;
Result
With this change, the CC1101 connects and works correctly on ESP32, ESP32-S2, and ESP32-S3, while keeping backward compatibility with existing boards.
Hope this helps improve multi-board support in the library.