esp32: Add support for ESP32-C2 (aka ESP8684).

Includes:
esp32/esp32c2: Adapt to target chip ESP32C2.
esp32/esp32c2: Fix heap size is too small to enable Bluetooth.

Signed-off-by: TianShuangKe <qinyun575@gmail.com>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
TianShuang Ke
2024-06-27 22:36:18 +08:00
committed by Angus Gratton
parent 88cb6bc818
commit ca9916968c
20 changed files with 128 additions and 18 deletions

View File

@@ -25,7 +25,7 @@ elif "rp2" in sys.platform:
spi_instances = ((0, Pin(18), Pin(19), Pin(16)),)
elif "esp32" in sys.platform:
impl = str(sys.implementation)
if "ESP32C3" in impl or "ESP32C6" in impl:
if any(soc in impl for soc in ("ESP32C2", "ESP32C3", "ESP32C6")):
spi_instances = ((1, Pin(4), Pin(5), Pin(6)),)
else:
spi_instances = ((1, Pin(18), Pin(19), Pin(21)), (2, Pin(18), Pin(19), Pin(21)))