Skip to content

Commit

Permalink
Add ESP32C3
Browse files Browse the repository at this point in the history
  • Loading branch information
fvanroie committed Jul 12, 2023
1 parent 7b10553 commit 7c35ef7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sys/svc/hasp_http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ ESP8266WebServer webServer(80);
#include <detail/mimetable.h>
WebServer webServer(80);

#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3)
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3)
extern const uint8_t EDIT_HTM_GZ_START[] asm("_binary_data_static_edit_htm_gz_start");
extern const uint8_t EDIT_HTM_GZ_END[] asm("_binary_data_static_edit_htm_gz_end");
extern const uint8_t STYLE_CSS_GZ_START[] asm("_binary_data_static_style_css_gz_start");
Expand Down Expand Up @@ -2310,7 +2310,7 @@ static inline int handleFirmwareFile(String path)
path = path.substring(7);
}

#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3)
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3)
if(path == F("/edit.htm")) {
return http_send_static_gzip_file(EDIT_HTM_GZ_START, EDIT_HTM_GZ_END, contentType);
// } else if(path == F("/hasp.htm")) { // 39 kB
Expand Down
22 changes: 22 additions & 0 deletions user_setups/esp32c3/_esp32c3.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
; -- Platform specific build flags
[esp32c3]
extends = esp32
board_build.mcu = esp32c3
board_build.f_cpu = 160000000

ps_ram =
-DBOARD_HAS_PSRAM
-D HASP_USE_FREETYPE=1
-D LV_USE_FREETYPE=1
no_ps_ram =
-D HASP_USE_FREETYPE=1
-D LV_USE_FREETYPE=1

; -- The Arduino ESP32 v2.0.2 with 3 available flash sizes:
[arduino_esp32c3_v2]
extends = esp32c3
framework = arduino
;platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.01.01/platform-espressif32.zip
platform = https://github.com/tasmota/platform-espressif32/releases/download/2023.06.04/platform-espressif32.zip
;platform = espressif32@5.3.0

0 comments on commit 7c35ef7

Please sign in to comment.