Public Access
Fix PlatformIO build; document ESPHome component and ring-buffer driver
- el512_panel.cpp: esp_cpu_get_cycle_count() exists only in ESP-IDF 5; use cpu_hal_get_cycle_count() on 4.4 (Arduino 2.x), which broke both PlatformIO environments. - README: ring-buffer refresh, tear-free status, D1 mini ESP32, new layout (components/el512, esphome/, home_assistant/), ESPHome setup, Still Alive paths, and the Wi-Fi blanking findings with wiring advice. - docs/README: ring, lookup table, double buffer, health counters; tear-free and memory items done; Wi-Fi blanking and boot blanking as open items. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f3212ea969
commit
6d5e5315f0
3 files changed
+128
-33
No files matched your search
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <driver/gpio.h>
|
||||
#include <esp_attr.h>
|
||||
#include <esp_cpu.h>
|
||||
#include <esp_idf_version.h>
|
||||
#include <esp_heap_caps.h>
|
||||
#include <esp_intr_alloc.h>
|
||||
#include <esp_rom_gpio.h>
|
||||
@@ -19,6 +19,14 @@
|
||||
#else
|
||||
#include <driver/periph_ctrl.h>
|
||||
#endif
|
||||
// CPU cycle counter: ESP-IDF 5 (ESPHome) and 4.4 (Arduino 2.x / PlatformIO).
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
|
||||
#include <esp_cpu.h>
|
||||
#define EL512_CYCLES() esp_cpu_get_cycle_count()
|
||||
#else
|
||||
#include <hal/cpu_hal.h>
|
||||
#define EL512_CYCLES() cpu_hal_get_cycle_count()
|
||||
#endif
|
||||
#if __has_include(<esp32/rom/lldesc.h>)
|
||||
#include <esp32/rom/lldesc.h>
|
||||
#else
|
||||
@@ -227,7 +235,7 @@ void IRAM_ATTR EL512Panel::fillChunk(uint16_t chunk) {
|
||||
|
||||
void IRAM_ATTR EL512Panel::isr(void* arg) {
|
||||
auto* self = static_cast<EL512Panel*>(arg);
|
||||
const uint32_t now = esp_cpu_get_cycle_count();
|
||||
const uint32_t now = EL512_CYCLES();
|
||||
if (self->_lastIsrCycle != 0 && now - self->_lastIsrCycle > self->_maxGap) self->_maxGap = now - self->_lastIsrCycle;
|
||||
self->_lastIsrCycle = now;
|
||||
self->_refills = self->_refills + 1;
|
||||
|
||||
Reference in new issue
Block a user