Skip to content

Commit 5377fa2

Browse files
authored
Merge branch 'moononournation:master' into master
2 parents 030a8ee + cf00665 commit 5377fa2

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

examples/PDQgraphicstest/Arduino_GFX_dev_device.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
// #define XIAO_ESP32C3_ROUND_DISPLAY
4949
// #define XIAO_ESP32S3_ROUND_DISPLAY
5050
// #define WAVESHARE_ESP32_S3_LCD_2_8
51+
// #define WAVESHARE_ESP32_C6_LCD_1_47
5152
// #define WAVESHARE_RP2040_LCD_0_96
5253
// #define WZ8048C050 // or called "Elecrow Wizee-ESP32"
5354
// #define ZX2D10GE10R_V4848
@@ -684,6 +685,12 @@ Arduino_RGB_Display *gfx = new Arduino_RGB_Display(
684685
Arduino_DataBus *bus = new Arduino_HWSPI(41 /* DC */, 42 /* CS */, 40 /* SCK */, 45 /* MOSI */, 46 /* MISO */);
685686
Arduino_GFX *gfx = new Arduino_ST7789(bus, 39 /* RST */, 0 /* rotation */, true /* IPS */);
686687

688+
#elif defined(WAVESHARE_ESP32_C6_LCD_1_47)
689+
#define GFX_DEV_DEVICE WAVESHARE_ESP32_C6_LCD_1_47
690+
#define GFX_BL 22
691+
Arduino_DataBus *bus = new Arduino_HWSPI(15 /* DC */, 14 /* CS */, 7 /* SCK */, 6 /* MOSI */, 5 /* MISO */);
692+
Arduino_GFX *gfx = new Arduino_ST7789(bus, 21 /* RST */, 0 /* rotation */, true /* IPS */, 172 /* width */, 320 /* height */, 34 /* col offset 1 */, 0 /* row offset 1 */, 34 /* col offset 2 */, 0 /* row offset 2 */);
693+
687694
#elif defined(WAVESHARE_RP2040_LCD_0_96)
688695
#define GFX_DEV_DEVICE WAVESHARE_RP2040_LCD_0_96
689696
#define GFX_BL 25

src/Arduino_DataBus.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ void Arduino_DataBus::writeYCbCrPixels(uint8_t *yData, uint8_t *cbData, uint8_t
197197
pxB = CB2B16[pxCb];
198198

199199
pxY = Y2I16[*yData++];
200-
_data16.value = CLIPRBE[pxY + pxCr] | CLIPGBE[pxY + pxG] | CLIPBBE[pxY + pxB];
200+
_data16.value = CLIPRBE[pxY + pxR] | CLIPGBE[pxY + pxG] | CLIPBBE[pxY + pxB];
201201
write(_data16.lsb);
202202
write(_data16.msb);
203203
pxY = Y2I16[*yData++];
204-
_data16.value = CLIPRBE[pxY + pxCr] | CLIPGBE[pxY + pxG] | CLIPBBE[pxY + pxB];
204+
_data16.value = CLIPRBE[pxY + pxR] | CLIPGBE[pxY + pxG] | CLIPBBE[pxY + pxB];
205205
write(_data16.lsb);
206206
write(_data16.msb);
207207
}

src/databus/Arduino_ESP32RGBPanel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ uint16_t *Arduino_ESP32RGBPanel::getFrameBuffer(int16_t w, int16_t h)
7272
#else
7373
.bits_per_pixel = 16,
7474
.num_fbs = 1,
75-
.bounce_buffer_size_px = 40 * w,
75+
.bounce_buffer_size_px = (size_t)(w * 40),
7676
#endif
7777
.sram_trans_align = 8,
7878
.psram_trans_align = 64,

src/display/Arduino_RGB_Display.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ void Arduino_RGB_Display::drawYCbCrBitmap(int16_t x, int16_t y, uint8_t *yData,
518518
}
519519
else
520520
{
521-
int cols = w >> 1;
522521
int rows = h >> 1;
523522

524523
uint16_t *dest = _framebuffer;

0 commit comments

Comments
 (0)