Skip to content

Commit

Permalink
Bump ESP8266Audio to 1.9.8 and remove no longer needed quirks
Browse files Browse the repository at this point in the history
  • Loading branch information
mskvortsov committed Jun 19, 2024
1 parent dfb9778 commit 791c545
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 35 deletions.
6 changes: 0 additions & 6 deletions bin/platformio-custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,6 @@ def esp32_create_combined_bin(source, target, env):
lb.env.Append(CPPDEFINES=[("QUIRK_RTTTL", 1)])
elif lb.name == "LovyanGFX":
lb.env.Append(CPPDEFINES=[("QUIRK_LOVYAN", 1)])
elif lb.name == "ESP8266Audio":
lb.env.Append(CPPDEFINES=[("QUIRK_ESP8266_AUDIO", 1)])
framework_path = env.PioPlatform().get_package_dir(
"framework-arduinoespressif32"
)
lb.env.Append(CXXFLAGS=["-I" + framework_path + "/libraries/WiFi/src"])

Import("projenv")

Expand Down
6 changes: 2 additions & 4 deletions src/platform/esp32/iram-quirk.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <esp_attr.h>
#include <esp_flash.h>
#include <esp_system.h>
#include <spi_flash_chip_driver.h>

#define IRAM_SECTION section(".iram1.stub")
Expand All @@ -24,8 +25,5 @@ extern const spi_flash_chip_t __wrap_esp_flash_chip_winbond __attribute__((IRAM_

IRAM_ATTR __attribute__((noreturn)) void __wrap_abort(void)
{
// from components/bootloader_support/src/bootloader_panic.c
esp_rom_printf("abort() was called at PC 0x%08x\r\n", (intptr_t)__builtin_return_address(0) - 3);
while (1) {
}
esp_system_abort("abort() was called");
}
26 changes: 3 additions & 23 deletions src/platform/esp32/quirks.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if QUIRK_RTTTL || QUIRK_LOVYAN
#if QUIRK_RTTTL
#define ledcSetup(ch, freq, res) \
uint32_t __freq = freq; \
uint8_t __res = res; \
Expand All @@ -7,30 +7,10 @@
#define ledcAttachPin(pin, ch) ledcAttachChannel(pin, __freq, __res, ch)
#endif

#if QUIRK_LOVYAN
#include <stdbool.h>

#include "esp_heap_caps.h"
#include "multi_heap.h"

#if QUIRK_LOVYAN // for chatter2 and m5stack-core
#include "rom/ets_sys.h"
#include "rom/gpio.h"
#include "soc/gpio_struct.h"
#include "soc/spi_periph.h"
#include "soc/spi_reg.h"

#include <stdbool.h>
#undef bool
#undef true
#undef false
#endif

#if QUIRK_ESP8266_AUDIO
#ifdef __cplusplus
#include "WiFi.h"
#endif
#include "esp_chip_info.h"
#include "soc/rtc_cntl_reg.h"
#include "soc/rtc_io_reg.h"
#define rtc_clk_apll_enable(...)
#define I2S_MCLK_MULTIPLE_DEFAULT I2S_MCLK_MULTIPLE_128
#endif
3 changes: 2 additions & 1 deletion variants/t-deck/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ build_flags = ${esp32s3_base.build_flags}

lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.9
earlephilhower/ESP8266Audio@^1.9.7
# TODO change to ESP8266Audio@^1.9.8 when this version propagates to platformio registry
https://github.com/earlephilhower/ESP8266Audio#c93201483fa2a15a36ccb6296b2b9382ddfa3000
earlephilhower/ESP8266SAM@^1.0.1
3 changes: 2 additions & 1 deletion variants/t-watch-s3/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ lib_deps = ${esp32s3_base.lib_deps}
lovyan03/LovyanGFX@^1.1.9
lewisxhe/[email protected]
adafruit/Adafruit DRV2605 Library@^1.2.2
earlephilhower/ESP8266Audio@^1.9.7
# TODO change to ESP8266Audio@^1.9.8 when this version propagates to platformio registry
https://github.com/earlephilhower/ESP8266Audio#c93201483fa2a15a36ccb6296b2b9382ddfa3000
earlephilhower/ESP8266SAM@^1.0.1

0 comments on commit 791c545

Please sign in to comment.