Skip to content

Commit 1d561c0

Browse files
committed
Fix seeed-sensecap-indicator-tft build
1 parent 1f53ed1 commit 1d561c0

File tree

4 files changed

+44
-2
lines changed

4 files changed

+44
-2
lines changed

bin/platformio-custom.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,6 @@ def esp32_create_combined_bin(source, target, env):
156156
ps = patch.fromfile(patch_path)
157157
if not ps.apply(0, lb.src_dir):
158158
print(f"Failed to apply patch {patch_path}")
159-
exit(1)
159+
continue # XXX
160160
print(f"Patched {lb.name}")
161161
open(marker_path, "w").close()

patches/LovyanGFX.patch

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Based on https://github.com/lovyan03/LovyanGFX/tree/bus-s3-rgb
2+
Only for develop branch
3+
4+
diff --git a/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp b/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp
5+
index 93db22d..28ed755 100644
6+
--- a/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp
7+
+++ b/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp
8+
@@ -44,6 +44,13 @@ Contributors:
9+
#include <driver/periph_ctrl.h>
10+
#endif
11+
12+
+#if SOC_LCDCAM_RGB_LCD_SUPPORTED || CONFIG_SOC_LCDCAM_RGB_LCD_SUPPORTED || (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0))
13+
+ // lcd_periph_signals() function was renamed to lcd_periph_rgb_signals()
14+
+ #define LGFX_LCD_PERIPH_RGB_SIGNALS lcd_periph_rgb_signals
15+
+#else
16+
+ #define LGFX_LCD_PERIPH_RGB_SIGNALS lcd_periph_signals
17+
+#endif
18+
+
19+
namespace lgfx
20+
{
21+
inline namespace v1
22+
@@ -156,7 +163,7 @@ namespace lgfx
23+
static constexpr const uint8_t rgb332sig_tbl[] = { 1, 0, 1, 0, 1, 2, 3, 4, 2, 3, 4, 5, 6, 5, 6, 7 };
24+
static constexpr const uint8_t rgb565sig_tbl[] = { 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7 };
25+
auto tbl = (pixel_bytes == 2) ? rgb565sig_tbl : rgb332sig_tbl;
26+
- auto sigs = lcd_periph_signals.panels[_cfg.port];
27+
+ auto sigs = LGFX_LCD_PERIPH_RGB_SIGNALS.panels[_cfg.port];
28+
for (size_t i = 0; i < 16; i++) {
29+
_gpio_pin_sig(_cfg.pin_data[i], sigs.data_sigs[tbl[i]]);
30+
}
31+
@@ -304,7 +311,8 @@ namespace lgfx
32+
dev->lc_dma_int_ena.val = 1;
33+
34+
int isr_flags = ESP_INTR_FLAG_INTRDISABLED | ESP_INTR_FLAG_SHARED;
35+
- esp_intr_alloc_intrstatus(lcd_periph_signals.panels[_cfg.port].irq_id, isr_flags,
36+
+ auto sigs = LGFX_LCD_PERIPH_RGB_SIGNALS.panels[_cfg.port];
37+
+ esp_intr_alloc_intrstatus(sigs.irq_id, isr_flags,
38+
(uint32_t)&dev->lc_dma_int_st,
39+
LCD_LL_EVENT_VSYNC_END, lcd_default_isr_handler, this, &_intr_handle);
40+
esp_intr_enable(_intr_handle);

src/Power.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ class AnalogBatteryLevel : public HasBatteryLevel
439439
return isBatteryConnect() && isVbusIn();
440440
#endif
441441
#endif
442+
// XXX #defines above eat all the code on seeed-sensecap-indicator-tft
443+
return false;
442444
}
443445

444446
private:

src/graphics/niche/InkHUD/MessageStore.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using namespace NicheGraphics;
1010
// Avoid filling the storage if something goes wrong
1111
// Normal usage should be well below this size
1212
constexpr uint8_t MAX_MESSAGES_SAVED = 10;
13-
constexpr uint32_t MAX_MESSAGE_SIZE = 250;
13+
constexpr size_t MAX_MESSAGE_SIZE = 250;
1414

1515
InkHUD::MessageStore::MessageStore(std::string label)
1616
{

0 commit comments

Comments
 (0)