Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/M5UnitPoEP4HDMI.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class M5UnitPoEP4HDMI : public M5GFX
uint16_t dsi_ldo_voltage_mv = 2500;

uint32_t i2c_freq = 100000;
lgfx::color_depth_t output_depth = lgfx::rgb888_3Byte;
lgfx::color_depth_t output_depth = lgfx::rgb888_nonswapped;
};

M5UnitPoEP4HDMI(void) : M5UnitPoEP4HDMI(config_t{}) {}
Expand Down
6 changes: 6 additions & 0 deletions src/lgfx/v1/misc/colortype.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ namespace lgfx
switch (dst_depth) {
case argb8888_4Byte: return color_convert<bgra8888_t, rgb332_t>;
case rgb888_3Byte : return color_convert<bgr888_t , rgb332_t>;
case rgb888_nonswapped: return color_convert<rgb888_t, rgb332_t>;
case rgb666_3Byte : return color_convert<bgr666_t , rgb332_t>;
case rgb565_2Byte : return color_convert<swap565_t , rgb332_t>;
case rgb332_1Byte : return no_convert;
Expand All @@ -724,6 +725,7 @@ namespace lgfx
switch (dst_depth) {
case argb8888_4Byte: return color_convert<bgra8888_t, rgb888_t>;
case rgb888_3Byte : return getSwap24;
case rgb888_nonswapped: return no_convert;
case rgb666_3Byte : return color_convert<bgr666_t , rgb888_t>;
case rgb565_2Byte : return color_convert<swap565_t , rgb888_t>;
case rgb332_1Byte : return color_convert<rgb332_t , rgb888_t>;
Expand All @@ -735,6 +737,7 @@ namespace lgfx
switch (dst_depth) {
case argb8888_4Byte: return getSwap32;
case rgb888_3Byte : return color_convert<bgr888_t , rgb888_t>;
case rgb888_nonswapped: return no_convert;
case rgb666_3Byte : return color_convert<bgr666_t , rgb888_t>;
case rgb565_2Byte : return color_convert<swap565_t, rgb888_t>;
case rgb332_1Byte : return color_convert<rgb332_t , rgb888_t>;
Expand All @@ -746,6 +749,7 @@ namespace lgfx
switch (dst_depth) {
case argb8888_4Byte: return color_convert<bgra8888_t, bgr888_t>;
case rgb888_3Byte : return no_convert;
case rgb888_nonswapped: return color_convert<rgb888_t, bgr888_t>;
case rgb666_3Byte : return color_convert<bgr666_t , bgr888_t>;
case rgb565_2Byte : return color_convert<swap565_t , bgr888_t>;
case rgb332_1Byte : return color_convert<rgb332_t , bgr888_t>;
Expand All @@ -757,6 +761,7 @@ namespace lgfx
switch (dst_depth) {
case argb8888_4Byte: return color_convert<bgra8888_t, rgb565_t>;
case rgb888_3Byte : return color_convert<bgr888_t , rgb565_t>;
case rgb888_nonswapped: return color_convert<rgb888_t, rgb565_t>;
case rgb666_3Byte : return color_convert<bgr666_t , rgb565_t>;
case rgb565_2Byte : return getSwap16;
case rgb332_1Byte : return color_convert<rgb332_t , rgb565_t>;
Expand Down Expand Up @@ -842,6 +847,7 @@ namespace lgfx
switch (depth_) {
case argb8888_4Byte: revert_rgb888 = color_convert<rgb888_t, bgra8888_t >; break;
case rgb888_3Byte: revert_rgb888 = color_convert<rgb888_t, bgr888_t >; break;
case rgb888_nonswapped: revert_rgb888 = no_convert; break;
case rgb666_3Byte: revert_rgb888 = color_convert<rgb888_t, bgr666_t >; break;
case rgb565_2Byte: revert_rgb888 = color_convert<rgb888_t, swap565_t >; break;
case rgb332_1Byte: revert_rgb888 = color_convert<rgb888_t, rgb332_t >; break;
Expand Down
3 changes: 3 additions & 0 deletions src/lgfx/v1/misc/pixelcopy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ namespace lgfx
return (dst_depth == rgb565_2Byte) ? copy_rgb_affine<swap565_t, TSrc>
: (dst_depth == rgb332_1Byte) ? copy_rgb_affine<rgb332_t , TSrc>
: (dst_depth == rgb888_3Byte) ? copy_rgb_affine<bgr888_t, TSrc>
: (dst_depth == rgb888_nonswapped) ? copy_rgb_affine<rgb888_t, TSrc>
: (dst_depth == rgb666_3Byte) ? (std::is_same<bgr666_t, TSrc>::value
? copy_rgb_affine<bgr888_t, bgr888_t>
: copy_rgb_affine<bgr666_t, TSrc>)
Expand All @@ -123,6 +124,7 @@ namespace lgfx
: (src_depth == rgb332_1Byte) ? copy_rgb_affine<TDst, rgb332_t >
: (src_depth == grayscale_8bit) ? copy_rgb_affine<TDst, grayscale_t>
: (src_depth == rgb565_nonswapped) ? copy_rgb_affine<TDst, rgb565_t >
: (src_depth == rgb888_nonswapped) ? copy_rgb_affine<TDst, rgb888_t >
: (src_depth == rgb888_3Byte) ? copy_rgb_affine<TDst, bgr888_t >
: (std::is_same<bgr666_t, TDst>::value)
? copy_rgb_affine<bgr888_t, bgr888_t>
Expand All @@ -135,6 +137,7 @@ namespace lgfx
return (dst_depth == rgb565_2Byte) ? copy_palette_affine<swap565_t, TPalette>
: (dst_depth == rgb332_1Byte) ? copy_palette_affine<rgb332_t , TPalette>
: (dst_depth == rgb888_3Byte) ? copy_palette_affine<bgr888_t , TPalette>
: (dst_depth == rgb888_nonswapped) ? copy_palette_affine<rgb888_t, TPalette>
: (dst_depth == rgb666_3Byte) ? copy_palette_affine<bgr666_t , TPalette>
: (dst_depth == grayscale_8bit) ? copy_palette_affine<grayscale_t, TPalette>
: (dst_depth == rgb565_nonswapped) ? copy_palette_affine<rgb565_t, TPalette>
Expand Down
3 changes: 1 addition & 2 deletions src/lgfx/v1/platforms/esp32p4/Panel_LT8912B.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ namespace lgfx
uint8_t lane_num = 2;
bool use_draw_bitmap = false;

color_depth_t output_depth = rgb888_3Byte;
color_depth_t output_depth = rgb888_nonswapped;
};

Panel_LT8912B(void) { _cfg.bus_shared = false; }
Expand All @@ -97,7 +97,6 @@ namespace lgfx
void display(uint_fast16_t x, uint_fast16_t y, uint_fast16_t w, uint_fast16_t h) override;

color_depth_t setColorDepth(color_depth_t depth) override;

void setSleep(bool flg_sleep) override;
void setPowerSave(bool flg_idle) override { setSleep(flg_idle); }

Expand Down
Loading