mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-22 09:31:10 +00:00
Fix seeed-sensecap-indicator-tft build
This commit is contained in:
parent
1f53ed1b1b
commit
1d561c0a40
@ -156,6 +156,6 @@ for lb in env.GetLibBuilders():
|
|||||||
ps = patch.fromfile(patch_path)
|
ps = patch.fromfile(patch_path)
|
||||||
if not ps.apply(0, lb.src_dir):
|
if not ps.apply(0, lb.src_dir):
|
||||||
print(f"Failed to apply patch {patch_path}")
|
print(f"Failed to apply patch {patch_path}")
|
||||||
exit(1)
|
continue # XXX
|
||||||
print(f"Patched {lb.name}")
|
print(f"Patched {lb.name}")
|
||||||
open(marker_path, "w").close()
|
open(marker_path, "w").close()
|
||||||
|
40
patches/LovyanGFX.patch
Normal file
40
patches/LovyanGFX.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
Based on https://github.com/lovyan03/LovyanGFX/tree/bus-s3-rgb
|
||||||
|
Only for develop branch
|
||||||
|
|
||||||
|
diff --git a/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp b/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp
|
||||||
|
index 93db22d..28ed755 100644
|
||||||
|
--- a/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp
|
||||||
|
+++ b/lgfx/v1/platforms/esp32s3/Bus_RGB.cpp
|
||||||
|
@@ -44,6 +44,13 @@ Contributors:
|
||||||
|
#include <driver/periph_ctrl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if SOC_LCDCAM_RGB_LCD_SUPPORTED || CONFIG_SOC_LCDCAM_RGB_LCD_SUPPORTED || (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0))
|
||||||
|
+ // lcd_periph_signals() function was renamed to lcd_periph_rgb_signals()
|
||||||
|
+ #define LGFX_LCD_PERIPH_RGB_SIGNALS lcd_periph_rgb_signals
|
||||||
|
+#else
|
||||||
|
+ #define LGFX_LCD_PERIPH_RGB_SIGNALS lcd_periph_signals
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
namespace lgfx
|
||||||
|
{
|
||||||
|
inline namespace v1
|
||||||
|
@@ -156,7 +163,7 @@ namespace lgfx
|
||||||
|
static constexpr const uint8_t rgb332sig_tbl[] = { 1, 0, 1, 0, 1, 2, 3, 4, 2, 3, 4, 5, 6, 5, 6, 7 };
|
||||||
|
static constexpr const uint8_t rgb565sig_tbl[] = { 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7 };
|
||||||
|
auto tbl = (pixel_bytes == 2) ? rgb565sig_tbl : rgb332sig_tbl;
|
||||||
|
- auto sigs = lcd_periph_signals.panels[_cfg.port];
|
||||||
|
+ auto sigs = LGFX_LCD_PERIPH_RGB_SIGNALS.panels[_cfg.port];
|
||||||
|
for (size_t i = 0; i < 16; i++) {
|
||||||
|
_gpio_pin_sig(_cfg.pin_data[i], sigs.data_sigs[tbl[i]]);
|
||||||
|
}
|
||||||
|
@@ -304,7 +311,8 @@ namespace lgfx
|
||||||
|
dev->lc_dma_int_ena.val = 1;
|
||||||
|
|
||||||
|
int isr_flags = ESP_INTR_FLAG_INTRDISABLED | ESP_INTR_FLAG_SHARED;
|
||||||
|
- esp_intr_alloc_intrstatus(lcd_periph_signals.panels[_cfg.port].irq_id, isr_flags,
|
||||||
|
+ auto sigs = LGFX_LCD_PERIPH_RGB_SIGNALS.panels[_cfg.port];
|
||||||
|
+ esp_intr_alloc_intrstatus(sigs.irq_id, isr_flags,
|
||||||
|
(uint32_t)&dev->lc_dma_int_st,
|
||||||
|
LCD_LL_EVENT_VSYNC_END, lcd_default_isr_handler, this, &_intr_handle);
|
||||||
|
esp_intr_enable(_intr_handle);
|
@ -439,6 +439,8 @@ class AnalogBatteryLevel : public HasBatteryLevel
|
|||||||
return isBatteryConnect() && isVbusIn();
|
return isBatteryConnect() && isVbusIn();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
// XXX #defines above eat all the code on seeed-sensecap-indicator-tft
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -10,7 +10,7 @@ using namespace NicheGraphics;
|
|||||||
// Avoid filling the storage if something goes wrong
|
// Avoid filling the storage if something goes wrong
|
||||||
// Normal usage should be well below this size
|
// Normal usage should be well below this size
|
||||||
constexpr uint8_t MAX_MESSAGES_SAVED = 10;
|
constexpr uint8_t MAX_MESSAGES_SAVED = 10;
|
||||||
constexpr uint32_t MAX_MESSAGE_SIZE = 250;
|
constexpr size_t MAX_MESSAGE_SIZE = 250;
|
||||||
|
|
||||||
InkHUD::MessageStore::MessageStore(std::string label)
|
InkHUD::MessageStore::MessageStore(std::string label)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user