From 21ea673be1fc0ad7d790bbcc8a2071c6448f8b99 Mon Sep 17 00:00:00 2001 From: Larry Bank Date: Fri, 26 Sep 2025 20:50:59 +0100 Subject: [PATCH] Added 4clr 4.2 400x300 --- src/bb_ep.inl | 42 ++++++++++++++++++++++++++++++++++++++++++ src/bb_epaper.h | 1 + 2 files changed, 43 insertions(+) diff --git a/src/bb_ep.inl b/src/bb_ep.inl index 8fe9eeb..4decfcd 100644 --- a/src/bb_ep.inl +++ b/src/bb_ep.inl @@ -997,6 +997,47 @@ const uint8_t epd35yr_init_fast[] PROGMEM = 0 }; +const uint8_t epd42yr_init_full[] PROGMEM = +{ + 0x02, 0x4d, 0x78, + 0x03, 0x00, 0x0f, 0x29, + 0x08, 0x06, 0x0d, 0x12, 0x24, 0x25, 0x12, 0x29, 0x10, // BTST + 0x02, 0x30, 0x08, + 0x02, 0x50, 0x37, + 0x05, UC8151_TRES, 0x01, 144, 0x01, 44, // resolution (400x300) + 0x02, 0xae, 0xcf, + 0x02, 0xb0, 0x13, + 0x02, 0xbd, 0x07, + 0x02, 0xbe, 0xfe, + 0x02, 0xe9, 0x01, + 0x01, 0x04, // power on + BUSY_WAIT, + 0 +}; + +const uint8_t epd42yr_init_fast[] PROGMEM = +{ + 0x02, 0x4d, 0x78, + 0x03, 0x00, 0x0f, 0x29, // PSR + 0x03, 0x01, 0x07, 0x00, // PWRR + 0x04, 0x03, 0x10, 0x54, 0x44, // POFS + 0x08, 0x06, 0x0f, 0x0a, 0x2f, 0x25, 0x22, 0x2e, 0x21, // BTST_P + 0x02, 0x50, 0x37, // CDI + 0x05, UC8151_TRES, 0x01, 144, 0x01, 44, // resolution (400x300) + 0x02, 0xe3, 0x22, + 0x02, 0xb6, 0x6f, + 0x02, 0xb4, 0xd0, + 0x02, 0xe9, 0x01, + 0x02, 0x30, 0x08, + 0x01, 0x04, // power on + BUSY_WAIT, + 0x02, 0xe0, 0x02, + 0x02, 0xe6, 0x5a, + 0x02, 0xa5, 0x00, + BUSY_WAIT, + 0 +}; + const uint8_t epd266yr_init_full[] PROGMEM = { 0x02, 0x4d, 0x78, @@ -2616,6 +2657,7 @@ const EPD_PANEL panelDefs[] PROGMEM = { {800, 480, 0, epd397yr_init_full, epd397yr_init_fast, NULL, BBEP_4COLOR, BBEP_CHIP_UC81xx, u8Colors_4clr_v2}, // EP397YR_800x480 {200, 200, 0, epd154yr_init_full, epd154yr_init_fast, NULL, BBEP_4COLOR, BBEP_CHIP_UC81xx, u8Colors_4clr_v2}, // EP154YR_200x200 {184, 360, 0, epd266yr_init_full, epd266yr_init_fast, NULL, BBEP_4COLOR, BBEP_CHIP_UC81xx, u8Colors_4clr_v2}, // EP266YR2_184x360 + {400, 300, 0, epd42yr_init_full, epd42yr_init_fast, NULL, BBEP_4COLOR, BBEP_CHIP_UC81xx, u8Colors_4clr_v2}, // EP42YR_400x300 }; // // Set the e-paper panel type diff --git a/src/bb_epaper.h b/src/bb_epaper.h index 9eaf448..e811867 100644 --- a/src/bb_epaper.h +++ b/src/bb_epaper.h @@ -192,6 +192,7 @@ enum { EP397YR_800x480, // GDEM0397F81 EP154YR_200x200, // GDEM0154F51H EP266YR2_184x360, // GDEY0266F52H + EP42YR_400x300, // GDEM042F52 EP_PANEL_COUNT }; #ifdef FUTURE