diff --git a/ch32v/epaper_demo/User/main.c b/ch32v/epaper_demo/User/main.c index cfa915b..32898ff 100644 --- a/ch32v/epaper_demo/User/main.c +++ b/ch32v/epaper_demo/User/main.c @@ -20,7 +20,7 @@ int main(void) SystemCoreClockUpdate(); Delay_Init(); - bbepSetPanelType(&bbep, EPD295_128x296); + bbepSetPanelType(&bbep, EP295_128x296); bbepInitIO(&bbep, PIN_DC, PIN_RST, PIN_BUSY, PIN_CS, -1, -1, 8000000); bbepWakeUp(&bbep); bbepSendCMDSequence(&bbep, bbep.pInitFull); diff --git a/esp_idf/mini_epaper_s3/main/ulp/main.c b/esp_idf/mini_epaper_s3/main/ulp/main.c index 5480e28..cd65b68 100644 --- a/esp_idf/mini_epaper_s3/main/ulp/main.c +++ b/esp_idf/mini_epaper_s3/main/ulp/main.c @@ -45,7 +45,7 @@ bool gpio_level_previous = false; int main (void) { - bbepSetPanelType(&bbep, EPD102_80x128); + bbepSetPanelType(&bbep, EP102_80x128); bbepInitIO(&bbep, PIN_DC, PIN_RST, PIN_BUSY, PIN_CS, PIN_MOSI, PIN_SCK, 0); bbepWakeUp(&bbep); bbepSendCMDSequence(&bbep, bbep.pInitFull); diff --git a/examples/atmega_clock/atmega_clock.ino b/examples/atmega_clock/atmega_clock.ino index 2313853..6f534ec 100644 --- a/examples/atmega_clock/atmega_clock.ino +++ b/examples/atmega_clock/atmega_clock.ino @@ -11,8 +11,8 @@ #include "Roboto_Black_38.h" #include "Roboto_Black_78.h" #include -BBEPAPER bbep(EPD295_128x296); -//BBEPAPER bbep(EPD42B_400x300); +BBEPAPER bbep(EP295_128x296); +//BBEPAPER bbep(EP42B_400x300); static int iRunCount = 0; static int iSec, iMin, iHour, iWDay, iMDay, iMon; int iSleepTime; // number of microseconds to sleep in each wakeup phase diff --git a/examples/badger2040_life/badger2040_life.ino b/examples/badger2040_life/badger2040_life.ino index fc80501..f618e46 100644 --- a/examples/badger2040_life/badger2040_life.ino +++ b/examples/badger2040_life/badger2040_life.ino @@ -5,7 +5,7 @@ // #include -BBEPAPER bbep(EPD29_128x296); +BBEPAPER bbep(EP29_128x296); #define BADGER_CS 17 #define BADGER_BUSY 26 #define BADGER_RES 21 diff --git a/examples/epd_panel_tester/Roboto_Thin_48.h b/examples/epd_panel_tester/Roboto_Thin_48.h new file mode 100644 index 0000000..a1e58f8 --- /dev/null +++ b/examples/epd_panel_tester/Roboto_Thin_48.h @@ -0,0 +1,424 @@ +// Created with image_to_c +// https://github.com/bitbank2/image_to_c +// +// Roboto_Thin_48 +// Data size = 6593 bytes +// +// for non-Arduino builds... +#ifndef PROGMEM +#define PROGMEM +#endif +const uint8_t Roboto_Thin_48[] PROGMEM = { + 0xff,0xbb,0x20,0x00,0x7e,0x00,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x16, + 0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x05,0x12,0x43,0x00,0x07,0x00,0xbe,0xff, + 0x24,0x00,0x0c,0x18,0x13,0x00,0x07,0x00,0xba,0xff,0x2d,0x00,0x33,0x33,0x43,0x00, + 0x02,0x00,0xbe,0xff,0x79,0x00,0x29,0x33,0x56,0x00,0x05,0x00,0xb5,0xff,0xe7,0x00, + 0x3c,0x46,0x45,0x00,0x05,0x00,0xbd,0xff,0x5e,0x01,0x32,0x39,0x45,0x00,0x05,0x00, + 0xbd,0xff,0xdc,0x01,0x03,0x10,0x13,0x00,0x06,0x00,0xba,0xff,0xe5,0x01,0x14,0x1c, + 0x61,0x00,0x07,0x00,0xb6,0xff,0x27,0x02,0x14,0x1d,0x61,0x00,0x01,0x00,0xb6,0xff, + 0x6c,0x02,0x25,0x27,0x25,0x00,0x01,0x00,0xbe,0xff,0xaa,0x02,0x2e,0x35,0x30,0x00, + 0x03,0x00,0xca,0xff,0xca,0x02,0x07,0x12,0x13,0x00,0x04,0x00,0xfa,0xff,0xd8,0x02, + 0x16,0x1c,0x02,0x00,0x03,0x00,0xe1,0xff,0xd9,0x02,0x05,0x14,0x05,0x00,0x07,0x00, + 0xfc,0xff,0xdf,0x02,0x1f,0x24,0x49,0x00,0x02,0x00,0xbe,0xff,0x13,0x03,0x28,0x33, + 0x45,0x00,0x06,0x00,0xbd,0xff,0x62,0x03,0x16,0x33,0x43,0x00,0x08,0x00,0xbe,0xff, + 0x8b,0x03,0x2a,0x33,0x44,0x00,0x05,0x00,0xbd,0xff,0xd7,0x03,0x2a,0x33,0x45,0x00, + 0x04,0x00,0xbd,0xff,0x37,0x04,0x2f,0x33,0x43,0x00,0x03,0x00,0xbe,0xff,0x7c,0x04, + 0x27,0x33,0x44,0x00,0x08,0x00,0xbe,0xff,0xc9,0x04,0x28,0x33,0x45,0x00,0x06,0x00, + 0xbd,0xff,0x29,0x05,0x2b,0x33,0x43,0x00,0x03,0x00,0xbe,0xff,0x5a,0x05,0x2b,0x33, + 0x45,0x00,0x04,0x00,0xbd,0xff,0xcc,0x05,0x28,0x33,0x45,0x00,0x05,0x00,0xbd,0xff, + 0x2b,0x06,0x05,0x11,0x31,0x00,0x06,0x00,0xd0,0xff,0x40,0x06,0x07,0x11,0x3d,0x00, + 0x04,0x00,0xd0,0xff,0x5c,0x06,0x26,0x30,0x24,0x00,0x04,0x00,0xd0,0xff,0x9a,0x06, + 0x27,0x34,0x15,0x00,0x06,0x00,0xd8,0xff,0xa2,0x06,0x26,0x30,0x24,0x00,0x05,0x00, + 0xd0,0xff,0xdf,0x06,0x21,0x29,0x44,0x00,0x04,0x00,0xbd,0xff,0x1c,0x07,0x4d,0x57, + 0x56,0x00,0x05,0x00,0xc0,0xff,0xd0,0x07,0x36,0x38,0x43,0x00,0x01,0x00,0xbe,0xff, + 0x1e,0x08,0x2b,0x39,0x43,0x00,0x09,0x00,0xbe,0xff,0x61,0x08,0x30,0x3d,0x45,0x00, + 0x07,0x00,0xbd,0xff,0xb4,0x08,0x2e,0x3e,0x43,0x00,0x09,0x00,0xbe,0xff,0xee,0x08, + 0x29,0x36,0x43,0x00,0x09,0x00,0xbe,0xff,0x05,0x09,0x2a,0x36,0x43,0x00,0x09,0x00, + 0xbe,0xff,0x1b,0x09,0x31,0x41,0x45,0x00,0x08,0x00,0xbd,0xff,0x71,0x09,0x30,0x42, + 0x43,0x00,0x09,0x00,0xbe,0xff,0x8e,0x09,0x03,0x19,0x43,0x00,0x0b,0x00,0xbe,0xff, + 0x97,0x09,0x27,0x34,0x44,0x00,0x04,0x00,0xbe,0xff,0xc8,0x09,0x2f,0x3c,0x43,0x00, + 0x09,0x00,0xbe,0xff,0x12,0x0a,0x25,0x31,0x43,0x00,0x09,0x00,0xbe,0xff,0x26,0x0a, + 0x3f,0x51,0x43,0x00,0x09,0x00,0xbe,0xff,0x7d,0x0a,0x30,0x43,0x43,0x00,0x09,0x00, + 0xbe,0xff,0xbe,0x0a,0x33,0x3f,0x45,0x00,0x06,0x00,0xbd,0xff,0x18,0x0b,0x2a,0x38, + 0x43,0x00,0x09,0x00,0xbe,0xff,0x47,0x0b,0x33,0x3f,0x50,0x00,0x06,0x00,0xbd,0xff, + 0xad,0x0b,0x2e,0x3e,0x43,0x00,0x09,0x00,0xbe,0xff,0xeb,0x0b,0x2f,0x38,0x45,0x00, + 0x05,0x00,0xbd,0xff,0x56,0x0c,0x34,0x38,0x43,0x00,0x02,0x00,0xbe,0xff,0x7a,0x0c, + 0x2d,0x3f,0x44,0x00,0x09,0x00,0xbe,0xff,0xae,0x0c,0x35,0x38,0x43,0x00,0x02,0x00, + 0xbe,0xff,0xfa,0x0c,0x4f,0x55,0x43,0x00,0x03,0x00,0xbe,0xff,0x74,0x0d,0x34,0x38, + 0x43,0x00,0x02,0x00,0xbe,0xff,0xd7,0x0d,0x35,0x38,0x43,0x00,0x01,0x00,0xbe,0xff, + 0x1d,0x0e,0x30,0x38,0x43,0x00,0x04,0x00,0xbe,0xff,0x58,0x0e,0x0d,0x14,0x5a,0x00, + 0x08,0x00,0xb5,0xff,0x71,0x0e,0x1e,0x24,0x49,0x00,0x03,0x00,0xbe,0xff,0xa6,0x0e, + 0x0d,0x14,0x5a,0x00,0x00,0x00,0xb5,0xff,0xc9,0x0e,0x1e,0x27,0x21,0x00,0x04,0x00, + 0xbe,0xff,0xf2,0x0e,0x27,0x27,0x02,0x00,0x00,0x00,0x01,0x00,0xf3,0x0e,0x0c,0x19, + 0x0c,0x00,0x07,0x00,0xbb,0xff,0x00,0x0f,0x27,0x32,0x34,0x00,0x04,0x00,0xce,0xff, + 0x56,0x0f,0x26,0x33,0x48,0x00,0x08,0x00,0xba,0xff,0x9b,0x0f,0x26,0x30,0x34,0x00, + 0x05,0x00,0xce,0xff,0xdd,0x0f,0x26,0x33,0x48,0x00,0x05,0x00,0xba,0xff,0x2b,0x10, + 0x28,0x2f,0x34,0x00,0x04,0x00,0xce,0xff,0x70,0x10,0x1c,0x1e,0x47,0x00,0x03,0x00, + 0xba,0xff,0xa1,0x10,0x26,0x34,0x47,0x00,0x06,0x00,0xce,0xff,0x00,0x11,0x24,0x33, + 0x47,0x00,0x08,0x00,0xba,0xff,0x2f,0x11,0x05,0x13,0x44,0x00,0x07,0x00,0xbd,0xff, + 0x53,0x11,0x13,0x14,0x58,0x00,0xf9,0xff,0xbd,0xff,0x87,0x11,0x24,0x2c,0x47,0x00, + 0x08,0x00,0xba,0xff,0xc6,0x11,0x03,0x13,0x47,0x00,0x08,0x00,0xba,0xff,0xcf,0x11, + 0x46,0x54,0x33,0x00,0x07,0x00,0xce,0xff,0x18,0x12,0x24,0x33,0x33,0x00,0x08,0x00, + 0xce,0xff,0x43,0x12,0x2c,0x34,0x34,0x00,0x04,0x00,0xce,0xff,0x8f,0x12,0x26,0x33, + 0x46,0x00,0x08,0x00,0xce,0xff,0xd4,0x12,0x26,0x33,0x46,0x00,0x05,0x00,0xce,0xff, + 0x23,0x13,0x16,0x1f,0x33,0x00,0x08,0x00,0xce,0xff,0x3d,0x13,0x24,0x2f,0x34,0x00, + 0x05,0x00,0xce,0xff,0x8b,0x13,0x18,0x1e,0x40,0x00,0x02,0x00,0xc2,0xff,0xb6,0x13, + 0x24,0x33,0x33,0x00,0x08,0x00,0xcf,0xff,0xdf,0x13,0x29,0x2d,0x32,0x00,0x02,0x00, + 0xcf,0xff,0x19,0x14,0x3f,0x47,0x32,0x00,0x04,0x00,0xcf,0xff,0x76,0x14,0x27,0x2d, + 0x32,0x00,0x03,0x00,0xcf,0xff,0xc0,0x14,0x29,0x2d,0x46,0x00,0x02,0x00,0xcf,0xff, + 0x0b,0x15,0x27,0x2d,0x32,0x00,0x04,0x00,0xcf,0xff,0x39,0x15,0x1b,0x1e,0x5d,0x00, + 0x03,0x00,0xb8,0xff,0x81,0x15,0x03,0x13,0x4f,0x00,0x08,0x00,0xbe,0xff,0x8b,0x15, + 0x1b,0x1e,0x5d,0x00,0x00,0x00,0xb8,0xff,0xd8,0x15,0x32,0x41,0x0f,0x00,0x07,0x00, + 0xdd,0xff,0x42,0x20,0x21,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc7,0xff,0xff, + 0xff,0xc8,0x5c,0x5e,0x40,0x54,0x23,0xdf,0xff,0xff,0xff,0xfa,0xff,0xff,0xea,0x28, + 0x54,0xad,0x02,0xb3,0x7f,0xd7,0xf5,0xaf,0xff,0xaf,0x5f,0xfa,0xd7,0xfe,0xbd,0x7f, + 0xeb,0x5f,0xfa,0xf5,0xe5,0x97,0xf9,0x91,0x66,0x45,0x7a,0xf5,0xff,0xf5,0xaf,0xeb, + 0xff,0x5f,0xff,0x5a,0xfe,0xbf,0xf5,0xff,0xad,0x7f,0xeb,0xff,0x5f,0xd6,0xbf,0xaf, + 0xf1,0x13,0xa0,0x46,0x50,0x61,0x5a,0x25,0x4b,0x7f,0xd7,0xfe,0xbf,0xad,0x7f,0xfd, + 0x7f,0xeb,0xfa,0xd7,0xf5,0xff,0xaf,0xff,0xad,0x7f,0x58,0x28,0x50,0xad,0x9f,0xff, + 0xff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c,0x43,0x90,0x27, + 0xbe,0xde,0xde,0xde,0xfd,0xed,0xef,0xde,0xfd,0xef,0xde,0xfd,0xfe,0xfd,0xef,0xdf, + 0xef,0xfd,0xfe,0xff,0xdf,0xfe,0xff,0xdf,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xaf, + 0xff,0xeb,0xf5,0xff,0xfe,0xb5,0xff,0xeb,0x5f,0xeb,0x5f,0xd2,0xfe,0xb5,0xfd,0x2f, + 0xd2,0xeb,0x5d,0x2f,0xd2,0xd2,0xd2,0xd7,0x4b,0x4a,0x21,0x41,0x10,0x98,0x28,0x48, + 0xa9,0x4f,0xff,0xff,0xff,0xff,0xff,0x90,0x9c,0xc7,0x2e,0x0f,0x09,0x88,0x78,0x25, + 0x20,0x40,0xf0,0x82,0xc1,0x83,0xc1,0x02,0xc1,0x87,0x84,0x0b,0x06,0x22,0x16,0x0c, + 0x16,0x0c,0x2d,0x74,0x08,0x85,0xfb,0x7a,0x4d,0xe9,0x7d,0x37,0xab,0x7a,0x4d,0xe9, + 0x5f,0xbe,0x93,0x7a,0x4d,0xe9,0x5f,0xb7,0xa4,0xd6,0xd5,0x40,0x28,0x58,0xa9,0x8f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf1,0x33,0x0a,0x50,0xb1,0x53, + 0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x20,0x9f,0xff,0xff, + 0xff,0xf5,0xaf,0xe9,0x7e,0x94,0x54,0x11,0x11,0x80,0xc0,0x20,0x28,0x45,0xe4,0x05, + 0x40,0x28,0xe6,0x97,0xf5,0xaf,0xe9,0x7f,0x5a,0xff,0x5a,0xf5,0xaf,0xf5,0xaf,0xe9, + 0x7f,0x5a,0xff,0x5a,0xfe,0x97,0xf5,0xaf,0xe9,0x7f,0x5a,0xff,0x5a,0xfe,0x97,0xf5, + 0xaf,0xf5,0xaf,0x5a,0xff,0x5a,0xfe,0x97,0xf5,0xaf,0xf5,0xaf,0xe9,0x7f,0x5a,0xfe, + 0x97,0xf5,0xaf,0xf5,0x1c,0x28,0x3c,0xe4,0xa1,0x04,0x0f,0x08,0xb4,0x90,0xf0,0x81, + 0x06,0x1e,0x90,0x6f,0x41,0x37,0xd3,0xea,0xde,0x93,0x7d,0x3e,0xb7,0xd3,0xeb,0x7d, + 0x3e,0xb7,0xff,0x4f,0xfc,0x77,0xff,0x4f,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff, + 0xeb,0xff,0xff,0xfe,0xd7,0xfe,0x08,0x85,0x57,0xfd,0xaf,0xfb,0xd7,0x6b,0xbf,0xda, + 0x5b,0xfd,0xa5,0xb6,0x96,0xdf,0xd8,0x4b,0x6d,0x2c,0x30,0xc2,0x5b,0x0c,0x20,0xb0, + 0xc4,0x2c,0x18,0x28,0x28,0xa6,0x16,0x0b,0x04,0x08,0x85,0x42,0x05,0xc1,0x02,0xe0, + 0x81,0x70,0x81,0x62,0x16,0x0b,0x0b,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x28,0x3c,0xe5, + 0x2f,0x04,0x0f,0x08,0xb4,0x90,0xf0,0x82,0x06,0x1e,0x82,0x0d,0xe8,0x20,0xde,0x93, + 0x7a,0x4d,0xe9,0x7e,0xde,0x97,0xd3,0xeb,0x7f,0xf5,0xfb,0xc7,0xff,0xfc,0x12,0xff, + 0xf5,0xaf,0x5a,0xfe,0x97,0x5a,0xe9,0x7e,0x96,0x97,0x5a,0xe9,0x69,0x69,0x75,0xae, + 0x96,0x96,0x96,0x96,0x97,0xe9,0x69,0x69,0x69,0x69,0x6b,0xd6,0x96,0x96,0x96,0x96, + 0xba,0x5d,0x69,0x69,0x69,0x69,0x73,0x51,0xb8,0x28,0x44,0xe5,0x2b,0x39,0xa8,0xe1, + 0x17,0x12,0x1e,0x81,0x19,0x09,0x84,0x13,0x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60,0xf4,0x08,0x1b,0xc2,0x08,0x30,0xf4,0x10, + 0x6f,0x49,0xbd,0x26,0xf4,0x9b,0xe9,0xf5,0xbe,0x9b,0xd7,0xf7,0xea,0xfe,0x3f,0xff, + 0xc1,0x10,0xaf,0xfe,0xbb,0x5d,0xfe,0xeb,0xd7,0x6d,0x2d,0xb5,0xdb,0x4b,0x6d,0x2d, + 0x86,0x10,0x5b,0x0c,0x25,0x86,0x0c,0x10,0x58,0x62,0x16,0x74,0x0c,0x80,0x28,0x3c, + 0xe4,0xa1,0x04,0x74,0x0c,0x84,0x5a,0x48,0x7a,0x08,0x1b,0xc2,0x08,0x30,0xf4,0x9b, + 0xd2,0x6f,0x49,0xfa,0x6f,0x49,0xbe,0x9f,0x5b,0xeb,0xd5,0xfe,0xfa,0x78,0xfe,0xd7, + 0xef,0xff,0xff,0xfe,0xfa,0x82,0x21,0x5e,0xfe,0xb7,0xf6,0x81,0x05,0xb6,0xbf,0x4b, + 0xb6,0x97,0x6d,0x2e,0xda,0x5d,0xb0,0x92,0xd8,0x61,0x2e,0x18,0x30,0x41,0x76,0x21, + 0x56,0x0c,0x17,0x8f,0xaf,0xf5,0xaf,0xf5,0xaf,0x5a,0xe9,0x7e,0x96,0x96,0x96,0x96, + 0x96,0x12,0xc2,0x58,0x20,0xb3,0xa0,0x46,0x72,0x4c,0xd1,0xc9,0x5c,0x20,0x28,0x45, + 0xe4,0x05,0x63,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf9,0x0b,0x8b,0xc8, + 0x0a,0x80,0x20,0x68,0x69,0xff,0x6b,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xfc,0x91,0xff,0xff,0xff,0xff,0xad,0x7f,0x4b,0xf4,0xa2,0xa0,0x88,0x8c,0x28,0x93, + 0x0b,0x08,0x2c,0x20,0xb0,0x41,0x61,0x05,0x84,0x16,0x10,0x58,0x40,0xb0,0x41,0x61, + 0x05,0x84,0x16,0x10,0x58,0x20,0xb0,0x82,0xc2,0x05,0x84,0x14,0x42,0xe4,0x04,0x3c, + 0x30,0xf0,0xc1,0xe1,0x87,0x83,0x0f,0x0c,0x3c,0x30,0xf0,0xc3,0xc3,0x0f,0x06,0x0f, + 0x0c,0x3c,0x30,0xf0,0xc3,0xc1,0x87,0x86,0x1e,0x18,0x70,0xe0,0xca,0x28,0xff,0xff, + 0xff,0xff,0x34,0xe6,0x2a,0x98,0x39,0x02,0x0f,0x0c,0x3c,0x30,0x78,0x61,0xe1,0x87, + 0x86,0x1e,0x18,0x3c,0x18,0x78,0x61,0xe1,0x87,0x86,0x1e,0x18,0x3c,0x30,0xf0,0xc3, + 0xc3,0x0f,0x06,0xfc,0x25,0x84,0x16,0x08,0x2c,0x20,0xb0,0x81,0x61,0x05,0x84,0x16, + 0x10,0x58,0x41,0x60,0x81,0x61,0x05,0x84,0x16,0x10,0x58,0x41,0x61,0x02,0x88,0x50, + 0xa0,0x28,0x34,0xe4,0xa5,0x04,0x1e,0x11,0x69,0x01,0xe1,0x02,0x06,0xf4,0x13,0x0f, + 0x49,0xf4,0x9b,0xe9,0xbd,0x5f,0xab,0xd7,0xe9,0xff,0x8e,0xff,0x05,0xff,0xf5,0xff, + 0xaf,0x5a,0xf5,0xae,0x96,0x96,0xba,0x5a,0x5a,0x5a,0x5a,0x5a,0x0b,0xad,0x74,0xba, + 0xd7,0xfa,0xfd,0x7f,0xff,0x1f,0xff,0xff,0xff,0x31,0xcf,0x4f,0xff,0x6a,0x28,0x44, + 0x71,0xc8,0x27,0x3a,0x63,0x04,0x71,0x23,0x41,0xe1,0x17,0x17,0x07,0x84,0x08,0x18, + 0x78,0x41,0x06,0xf4,0x10,0x61,0xe1,0x26,0xf4,0x10,0x6f,0x49,0xbd,0x26,0xf4,0x9b, + 0xd2,0x7d,0x2b,0xd2,0x6f,0xa7,0xd2,0xbd,0x27,0xfb,0xd2,0x7d,0x4e,0x70,0x45,0xf4, + 0x08,0x3f,0x50,0x89,0x78,0x6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0x37,0x06,0xf6,0x1e,0xfb,0x7b,0x7b,0xf7, + 0xfb,0xff,0x7f,0xff,0xff,0xd7,0xeb,0xfa,0x5d,0x6b,0xa5,0x84,0xb0,0x96,0x65,0xbc, + 0x41,0x43,0x95,0xb2,0x0f,0x06,0xf0,0xc3,0xdb,0xc3,0x7b,0x7f,0xb7,0xbf,0x7b,0xff, + 0x7f,0xff,0xfe,0xbf,0x5f,0xeb,0x5d,0x2f,0xd2,0xc2,0x5a,0x58,0x41,0x66,0x63,0xc4, + 0x14,0xed,0xaa,0x28,0x4c,0xe5,0xa5,0x39,0xe9,0xe1,0x17,0x14,0x1e,0x10,0x23,0x23, + 0x74,0x10,0x6f,0x41,0x06,0xf4,0x9b,0xd2,0x6f,0x49,0xbd,0x26,0xfa,0x7d,0x6f,0x49, + 0xbf,0xf4,0x9f,0xef,0xaf,0x5f,0xdf,0xaf,0xec,0x60,0xfd,0x7f,0xff,0xff,0xff,0xff, + 0xdf,0x82,0x82,0x21,0x5f,0xae,0xff,0xf7,0x5e,0xff,0xad,0xb5,0xfa,0xdb,0x5d,0xfe, + 0xd2,0xdb,0x4b,0x6d,0x2d,0xb4,0xb6,0xd2,0xd8,0x61,0x2d,0x86,0x12,0xc3,0x06,0x08, + 0x2c,0x31,0x0b,0x3a,0x65,0xc0,0x3b,0x0c,0x1d,0xc5,0x0a,0xd5,0x07,0x83,0x0f,0x06, + 0xf0,0xc3,0xdb,0xdb,0xc3,0x7b,0x7b,0x7f,0xb7,0xb7,0xfb,0x7f,0xbf,0x7f,0xbf,0x7f, + 0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xfa,0xff,0xad,0x7f,0xad,0x7f,0x4b,0xf4,0xb4, + 0xbf,0x4b,0x4b,0x4b,0x09,0x69,0x61,0x05,0x84,0xb3,0x2b,0xe2,0x0a,0x76,0x18,0x00, + 0xca,0xed,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3c,0x86,0x65,0x76,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xfe,0x6a,0x7c,0xca,0xed,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x3c,0xa5,0xe5,0x76,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x28,0x50,0xe5, + 0xb3,0x3a,0x09,0xe1,0x17,0x14,0x1e,0x10,0x23,0x23,0x74,0x08,0x37,0x84,0x83,0x0f, + 0x41,0x37,0xa4,0xde,0x93,0xf4,0xde,0xad,0xe9,0x7d,0x37,0xaf,0xd3,0xeb,0x7d,0x7e, + 0xfa,0xfd,0x0f,0xfc,0x7f,0xf5,0xff,0xff,0xf9,0xd8,0x5f,0xcd,0x63,0xef,0xff,0x82, + 0x21,0x5f,0xff,0xbf,0xf7,0xf7,0xdf,0xdf,0x7f,0x7d,0xfd,0xf6,0xfb,0x7d,0xb4,0xb6, + 0xc2,0x5b,0x69,0x6c,0x30,0x41,0x61,0x86,0x09,0x6c,0xbc,0xb0,0x58,0x31,0x05,0x83, + 0x39,0x8c,0x00,0x2b,0xab,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x8e,0x57,0x57,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x28,0x93,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0f,0xfa,0xf8, + 0x22,0x15,0xfa,0xf7,0xfd,0x6e,0xbd,0xa5,0xfe,0xda,0x5b,0x69,0x6d,0xa5,0xda,0x58, + 0x61,0x84,0xb6,0x0c,0x12,0xc3,0x10,0xb3,0x9c,0x54,0x2b,0x98,0x21,0xa5,0xa5,0xa5, + 0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5, + 0xa5,0xa5,0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+ 0xdb,0x4b,0x6d,0x2d,0xb4,0xb6,0x18,0x4b,0x61,0x84,0x16,0x19,0x79,0x4b,0x06,0x2f, + 0x06,0x62,0xe3,0xc5,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xa8,0x3b, + 0x6a,0x9d,0xf4,0x4a,0xd8,0x07,0x83,0x78,0x30,0xf6,0xf0,0xde,0xdf,0x7b,0xed,0xfe, + 0xfd,0xfe,0xff,0xff,0xff,0xff,0xaf,0xf5,0xaf,0x5a,0xf5,0xa5,0xa5,0xa5,0x84,0xb0, + 0x96,0x08,0x28,0x82,0xa9,0x5a,0xfd,0xbf,0xdb,0xdb,0xfd,0xbe,0xf7,0xdb,0xfd,0xbe, + 0xf7,0xdb,0xfd,0xbd,0xbf,0xdb,0xfd,0xbd,0xbf,0xdb,0xfd,0xbd,0xbe,0x28,0x48,0xe5, + 0xa7,0x39,0xc9,0xe0,0x8b,0xcb,0x0f,0x08,0xb5,0x20,0xf4,0x10,0x30,0xf4,0x13,0x7a, + 0x41,0xbd,0x26,0xf4,0x9b,0xd2,0xfd,0xbe,0x9f,0x5b,0xe9,0xfe,0xff,0xff,0xdf,0xfe, + 0xff,0x1f,0xdb,0xef,0x6f,0x6f,0x6f,0x61,0xed,0xec,0x1e,0x18,0x78,0x67,0x25,0xa8, + 0x30,0x78,0x33,0x94,0x9c,0x18,0x3c,0xed,0x11,0x83,0x0f,0x06,0x1e,0x18,0x78,0x6f, + 0x0d,0xed,0xed,0xed,0xef,0xb7,0xfb,0xf6,0x1f,0xff,0x7f,0x04,0x42,0xbd,0xd7,0xae, + 0xdd,0x7a,0xed,0xa5,0xb6,0xbb,0x0d,0x2d,0xb4,0xb6,0x18,0x41,0x61,0x86,0x12,0xc3, + 0x2f,0x30,0x2c,0x18,0x82,0xce,0x91,0x90,0xca,0x19,0x2a,0x77,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x2a,0xa7,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xda,0xfe,0x08,0x85,0x57,0x6b,0xf5,0xb6,0xbf,0xed,0xa5,0xb6,0x97,0x6b,0xb6,0x96, + 0xda,0x5b,0x0c,0x20,0xb0,0xc3,0x09,0x61,0x83,0x04,0x16,0x18,0x85,0x9d,0x12,0xe0, + 0x2a,0xc2,0xd2,0xf8,0x22,0x16,0x97,0xfb,0xd7,0x6b,0xfe,0xf5,0xda,0xff,0xb6,0x97, + 0xfb,0xd7,0x6b,0xfe,0xf5,0xda,0xff,0xbd,0x76,0xbb,0xfd,0xa5,0xfe,0xf5,0xda,0xff, + 0xbd,0x76,0xbb,0xfd,0xa5,0xfe,0xf5,0xda,0xff,0xbd,0x76,0xbb,0xfd,0xa5,0xfe,0xf5, + 0xda,0xff,0xbd,0x76,0xbf,0xed,0xd7,0xae,0xf5,0xda,0xff,0xbd,0x76,0xbf,0xef,0x5d, + 0xae,0xf5,0xda,0xff,0xbd,0x76,0xbf,0xef,0x5c,0x7b,0x5f,0xf0,0x2b,0x46,0x56,0x8f, + 0xfa,0x78,0x22,0x15,0xd7,0x70,0x44,0x29,0x7d,0x6f,0xff,0xad,0xe9,0xfe,0xfb,0x5f, + 0x5f,0xde,0x9e,0xbb,0xf5,0xf5,0xbf,0xf7,0xf7,0xae,0xbb,0x5b,0x5f,0xff,0xe9,0xfd, + 0xfb,0xae,0xd7,0x5f,0xa7,0xf7,0xfa,0xf5,0xbf,0xbd,0xd7,0xeb,0xf7,0x5b,0xae,0xfd, + 0x7e,0x9f,0xf5,0xbf,0x7f,0xae,0xe9,0xd7,0xff,0xf5,0xbf,0x7f,0xae,0xe9,0xd7,0xd6, + 0xfd,0xfe,0xbb,0xa7,0xfd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2,0xac,0xc0,0x2b,0xd0,0x44,0x2f,0x6f,0xbd,0xf6,0xf6,0xfb,0xdf,0x6f, + 0x6f,0xb0,0x28,0x3c,0xe5,0x1f,0x04,0x74,0x4b,0x84,0x5a,0x50,0x78,0x40,0x81,0xbd, + 0x04,0x1b,0xd2,0x6f,0x49,0xbd,0x26,0xf4,0x9f,0xab,0xd7,0xf7,0xeb,0xfb,0xc7,0xff, + 0xff,0xff,0xff,0xce,0x8a,0xb9,0xcc,0x6b,0x08,0xbd,0x2e,0x11,0x6a,0xdc,0x20,0xbd, + 0x05,0xe8,0x2f,0x4b,0xd2,0xff,0xd2,0xff,0xeb,0xfe,0x3f,0xf5,0x82,0x21,0x5f,0xaf, + 0x6b,0xe8,0x8c,0xf6,0xd2,0xfd,0x7d,0xb4,0x17,0xb0,0xc2,0x5e,0xd8,0x49,0xf6,0x0c, + 0x10,0x57,0x0c,0x42,0xe0,0xce,0x52,0x60,0x2a,0x9b,0xff,0xff,0xff,0xff,0xf9,0xcc, + 0x27,0x04,0x0f,0x08,0xb8,0x80,0xf4,0x08,0x18,0x78,0x41,0x37,0xa0,0x9b,0xd2,0x7e, + 0x9b,0xd2,0x6e,0x37,0xab,0xa7,0xef,0xe9,0xfb,0xff,0xdf,0xff,0xfb,0xff,0xff,0xfe, + 0xbf,0xf5,0xff,0xeb,0xf5,0xfb,0xad,0x6e,0xad,0x60,0x88,0x52,0x5b,0x69,0x6c,0x34, + 0xb6,0xd7,0x61,0xa0,0xb0,0xc1,0x82,0x58,0x62,0x14,0x20,0x60,0xa0,0x28,0x3c,0xe5, + 0x1f,0x04,0x0f,0x08,0xb4,0x90,0xf4,0x10,0x37,0x84,0x10,0x61,0xe8,0x26,0xf4,0x9f, + 0xa6,0xf5,0x6f,0x49,0xfa,0xbd,0x5f,0xab,0xaf,0xfd,0x3f,0xc6,0x3a,0xff,0xff,0xff, + 0xef,0x82,0x21,0x5e,0x68,0x56,0xfe,0xb7,0xf7,0x5b,0xfd,0xae,0xda,0x5b,0xfd,0xa5, + 0xb6,0x96,0xc3,0x09,0x6c,0x30,0x96,0x18,0x30,0x82,0xc3,0x10,0xb0,0x60,0xa0,0x28, + 0x93,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x9c,0xf2,0x78,0x20,0x7c,0x22,0xd2,0x43, + 0xe1,0x02,0x06,0xfa,0x41,0x87,0xd0,0x4d,0xfa,0x6f,0xab,0xf4,0x9b,0xf5,0x1d,0x5f, + 0x4f,0x5f,0xfa,0x7a,0xff,0xfe,0xbf,0xff,0xe3,0xff,0xff,0xfe,0x08,0x85,0x7f,0xff, + 0xf7,0xff,0xf7,0xf7,0xfe,0xeb,0xbe,0xeb,0xb5,0xb7,0x04,0x42,0xad,0xa5,0xec,0x25, + 0xdb,0x4b,0xb6,0x12,0xe1,0x83,0x04,0x17,0x0c,0x42,0xe0,0xc1,0x08,0x28,0x40,0xe4, + 0x9f,0x04,0x0f,0x08,0xb4,0x90,0xf4,0x10,0x61,0xe1,0x04,0x1b,0xd2,0x6f,0x41,0x37, + 0xd3,0x7a,0xbe,0x93,0x7a,0x5f,0xb7,0xa5,0xfb,0xf5,0x7a,0xfe,0xfd,0x71,0xff,0xda, + 0xc7,0x2a,0x9b,0xff,0x7f,0xc1,0x10,0xae,0xff,0x7e,0xff,0x6f,0x6f,0xf6,0xcc,0xe2, + 0xdb,0x5d,0xb4,0xb6,0xd2,0xd8,0x61,0x2d,0x86,0x12,0xc3,0x0c,0x10,0x58,0x62,0x16, + 0x0c,0x14,0x28,0x92,0x18,0x27,0x45,0x88,0x58,0x41,0x0f,0x5a,0x5a,0x5f,0xd6,0xbf, + 0xfd,0x7f,0xff,0xff,0xff,0xc4,0xef,0x46,0x50,0x92,0xaa,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xf8,0x28,0x38,0xe4,0xa3,0x04,0x0c,0xc4,0xb8,0x45,0xc4,0x07,0xd0,0x20, + 0x61,0xf4,0x10,0x6f,0xa4,0xdf,0x49,0xbe,0x93,0x7e,0x9f,0xab,0x1e,0xba,0xbe,0xba, + 0xbf,0xf5,0xfc,0x7f,0xfd,0x7f,0xff,0xff,0xfd,0xff,0xf0,0x44,0x2b,0xfe,0xff,0xdf, + 0xdf,0x75,0xda,0xdf,0xda,0x22,0x3b,0x6b,0xdb,0x4b,0xb6,0x12,0xec,0x30,0x82,0xec, + 0x30,0x4b,0x86,0x21,0x70,0x67,0x24,0xcc,0x7f,0xf5,0xfa,0xff,0x5a,0xe4,0x86,0xb4, + 0xd7,0xeb,0x6d,0x76,0x1a,0x5b,0x61,0x2d,0x86,0x10,0x58,0x60,0xc2,0x58,0x62,0x16, + 0x0c,0x14,0x2a,0x9b,0xff,0xff,0xff,0xff,0xf9,0xce,0x27,0x04,0x0f,0x08,0xb4,0x87, + 0x84,0x08,0x18,0x7a,0x09,0xbd,0x27,0xd2,0x6f,0x49,0xf4,0xaf,0xa7,0xd2,0xbf,0xe2, + 0x9f,0xeb,0xff,0xab,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xe0,0x20,0x28,0x45,0xe4,0x05,0x63,0xff,0xff,0xff,0x90,0xbf,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x80,0x28,0x7a,0x1a,0x7f,0xda,0xc7,0xff,0xff,0xff,0x33,0xdf, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x5f,0xfa,0xf5, + 0xae,0x96,0x95,0x82,0x51,0x0a,0x40,0x42,0x80,0x2a,0x9b,0xff,0xff,0xff,0xff,0xfe, + 0x67,0x26,0x96,0x82,0xd2,0xd2,0xd2,0xd2,0xd2,0xc2,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a, + 0x5a,0x5a,0x0b,0x4b,0x4b,0x4b,0x4b,0x09,0x69,0xe8,0x11,0x0b,0xd2,0x6f,0x49,0xb8, + 0x85,0x74,0xdd,0x3d,0x37,0xb7,0xb7,0xb7,0xde,0xfb,0x7b,0x7b,0x7b,0x7d,0xed,0xef, + 0xb7,0xb7,0xb7,0xb7,0xde,0xfb,0x7b,0x0c,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xfe,0x28,0x20,0x71,0x26,0x0e,0x28,0x68,0x30,0x40,0xc1,0x03,0xc2,0x2d,0x12,0x18, + 0x45,0xc2,0x43,0xd0,0x20,0x61,0xa0,0x41,0xbc,0x24,0xd8,0x41,0x06,0xf4,0x13,0xa0, + 0x9b,0xe9,0xb4,0x9f,0x49,0xd2,0xbd,0x2b,0xa7,0xd5,0xd2,0xbe,0xa3,0x78,0xaa,0xff, + 0xa6,0xaf,0xff,0x55,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x28,0x40,0xe4,0x9e,0x18,0x20, + 0x78,0x45,0xa4,0x3c,0x20,0x40,0xc3,0xd0,0x4d,0xe9,0x3e,0x93,0x7a,0x4f,0xa5,0x7d, + 0x3e,0x95,0xff,0x14,0xff,0x5f,0xfd,0x5f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0x00,0x28,0x44,0xe5,0x2b,0x04,0x0f,0x08,0xb4,0x90,0xf0,0x82, + 0x06,0x1e,0x82,0x0d,0xe8,0x20,0xde,0x93,0x7a,0x4d,0xe9,0x37,0xa5,0x7e,0xfa,0x4d, + 0xff,0xa4,0xdf,0xfd,0x3e,0xb7,0xff,0x4f,0xff,0xf1,0xdf,0xff,0xff,0xff,0x04,0x42, + 0xab,0xff,0xfb,0x5f,0xf7,0xae,0xd7,0xfd,0xb4,0xbf,0xdb,0x4b,0xfd,0xb4,0xb6,0xd2, + 0xdb,0x4b,0x6d,0x2d,0x86,0x12,0xd8,0x61,0x2c,0x30,0x61,0x05,0x86,0x21,0x60,0xc1, + 0x40,0x28,0x38,0xe4,0xa2,0x18,0x20,0x78,0x45,0xc4,0x07,0xa0,0x40,0xc3,0xc2,0x09, + 0xbd,0x04,0xde,0x93,0xf4,0xde,0x93,0x71,0xbd,0x5d,0x3f,0x7f,0x4f,0xdf,0xfe,0xff, + 0xff,0xdf,0xff,0xff,0xf5,0xff,0xfa,0xff,0x5f,0xaf,0xdd,0x6b,0x75,0x6b,0x04,0x42, + 0x92,0xdb,0x4b,0x61,0xd6,0xd8,0x5d,0x86,0x82,0xc3,0x06,0x09,0x61,0x88,0x58,0x30, + 0x58,0xff,0xff,0xff,0xff,0xf0,0x28,0x3c,0xe4,0xa1,0x04,0x0c,0xc4,0xa8,0x45,0xa4, + 0x07,0xc2,0x04,0x0d,0xf4,0x83,0x0f,0xa0,0x83,0x7e,0x9b,0xea,0xfd,0x26,0xfd,0x47, + 0x57,0xd7,0x57,0xfe,0x9e,0xbf,0xff,0xaf,0xff,0xf8,0xff,0xff,0xff,0x82,0x21,0x5f, + 0xff,0xfd,0xff,0xfd,0xfd,0xff,0xba,0xef,0xba,0xed,0x6d,0xc1,0x10,0xab,0x69,0x7b, + 0x09,0x76,0xd2,0xed,0x84,0xb8,0x60,0xc1,0x05,0xc3,0x10,0xb8,0x30,0x5c,0x7f,0xff, + 0xff,0xff,0xff,0xff,0xfe,0x28,0x74,0x30,0x58,0x45,0xaa,0xa0,0xb4,0x16,0x96,0x82, + 0xd7,0xad,0x2f,0x8a,0xeb,0xeb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x28, + 0x34,0xe5,0xa1,0x04,0x0f,0x08,0xb4,0xa0,0xf0,0x82,0x06,0x1e,0x82,0x0d,0xe8,0x26, + 0xf4,0x9b,0xf7,0xd2,0x6f,0xfe,0x9b,0xff,0xff,0xc7,0xf7,0xbf,0x7b,0x7d,0xe1,0x87, + 0xb0,0xf0,0xc1,0xe1,0x83,0xcc,0x7f,0xcc,0x9f,0xc1,0x87,0x83,0x0f,0x0c,0x3c,0x37, + 0xb7,0xbe,0xdf,0xed,0xfe,0x0d,0xff,0xa8,0x22,0x17,0xf4,0xb6,0xfe,0xd2,0xdb,0x4b, + 0x6c,0x25,0x86,0x1a,0x5b,0x06,0x09,0x61,0x88,0x2c,0xe6,0x97,0x00,0x28,0x49,0x5b, + 0x3f,0xff,0xff,0xff,0xff,0xff,0xc4,0xce,0x39,0x42,0x4a,0xd9,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0x7f,0xef,0x7e,0xf6,0x1e,0xcc,0xb1,0x0e,0x2a,0x7f,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0xaf,0x04,0x42,0x97,0x7f,0x5b,0x68,0x8c, + 0xfd,0x76,0xc2,0x5d,0xb4,0xbb,0x0c,0x25,0xd8,0x30,0x4b,0x86,0x21,0x70,0x67,0x29, + 0x30,0x2b,0x8e,0x08,0x85,0x57,0x6b,0xfe,0xf5,0xda,0xef,0xf6,0x97,0xfb,0xd7,0x6b, + 0xfe,0xdd,0x7a,0xef,0x5d,0xaf,0xfb,0xd7,0x6b,0xbf,0xda,0x5f,0xef,0x5d,0xaf,0xfb, + 0x69,0x7f,0xbd,0x76,0xbf,0xed,0xd7,0xae,0xff,0x69,0x7f,0xbd,0x76,0xbf,0xed,0xa5, + 0xfe,0xf5,0xda,0xff,0xb7,0x5e,0xbb,0xfc,0x57,0xed,0x7c,0x2b,0x6c,0xad,0xbd,0x52, + 0xfe,0x08,0x85,0xdf,0xfd,0x7a,0x04,0x42,0x97,0x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ad,0x7f,0xad, + 0x7f,0xad,0x7a,0xd7,0xad,0x74,0xb5,0xd2,0xc2,0x59,0x51,0x5b,0x0a,0x20,0x40,0x87, + 0xe6,0x82,0x75,0xa5,0xa5,0xfa,0x5a,0x5a,0xf5,0xa5,0xaf,0x5a,0x5a,0x5f,0xa5,0xa5, + 0xaf,0x5a,0x5a,0x5f,0xa5,0xa5,0xaf,0x5a,0x5a,0xf5,0xa5,0xa5,0xfa,0x5a,0x5a,0xf5, + 0xa5,0xa5,0xfa,0x5a,0x5f,0xa5,0xa5,0xaf,0x51,0x34,0xc6,0x28,0xce,0x16,0x12,0xc2, + 0x05,0xa5,0xa0,0xb4,0xb4,0xbf,0x4b,0xad,0x7f,0xad,0x7f,0xaf,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xfd,0x7f,0xaf,0xd7,0xad,0x74,0xb4,0xb0,0x41,0x44,0x2e,0x41, + 0x03,0xc1,0x87,0xb7,0xbe,0xdf,0x7b,0xff,0x7f,0xbf,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0x7f,0xfb,0xf7,0xfb,0x7f,0xb7,0xde,0xde,0xde,0xde,0xc3,0xc3,0x0f, + 0x0d,0xc3,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x20,0x25,0x3e, + 0x10,0x72,0x02,0xf0,0x61,0xed,0xe1,0xbd,0xbd,0xbf,0xdb,0xdf,0xbf,0xdf,0xbf,0xfd, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xdf,0xfb,0xdf,0xbd,0xbd,0xbc, + 0x30,0x78,0x64,0xd7,0xc2,0x2c,0x4c,0x20,0xb4,0x17,0x5a,0x5a,0xf5,0xfa,0xff,0x5f, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfa,0xff,0xf5,0xaf,0xe9,0x7e,0x96,0xba, + 0x5a,0x5a,0x58,0x4b,0x08,0x28,0x85,0x20,0x21,0x40,0x28,0x24,0xe4,0x4f,0x08,0x33, + 0x3a,0xa1,0x12,0x70,0xfa,0x08,0x1b,0xe9,0x30,0xd7,0x4d,0xf5,0x0d,0xfa,0x6e,0xb5, + 0x6d,0x7a,0x6d,0x2f,0x61,0xd7,0xb6,0x17,0xc3,0x06,0x10,0x51,0xb1,0x50,0x40,0xc2, + 0x80}; diff --git a/examples/epd_panel_tester/bart_47x128.h b/examples/epd_panel_tester/bart_47x128.h new file mode 100644 index 0000000..0b5d2a4 --- /dev/null +++ b/examples/epd_panel_tester/bart_47x128.h @@ -0,0 +1,87 @@ +// Created with image_to_c +// https://github.com/bitbank2/image_to_c +// +// bart_47x128 +// Data size = 1170 bytes +// +// OS/2 BMP, Compression=None, Size: 47 x 128, 1-Bpp +// +// for non-Arduino builds... +#ifndef PROGMEM +#define PROGMEM +#endif +const uint8_t bart_47x128[] PROGMEM = { + 0x42,0x4d,0x92,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x92,0x00,0x00,0x00,0x7c,0x00, + 0x00,0x00,0x2f,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00, + 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0xff,0x00, + 0x00,0x00,0x00,0x00,0x00,0xff,0x42,0x47,0x52,0x73,0x8f,0xc2,0xf5,0x28,0x51,0xb8, + 0x1e,0x15,0x1e,0x85,0xeb,0x01,0x33,0x33,0x33,0x13,0x66,0x66,0x66,0x26,0x66,0x66, + 0x66,0x06,0x99,0x99,0x99,0x09,0x3d,0x0a,0xd7,0x03,0x28,0x5c,0x8f,0x32,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff, + 0xff,0x00,0xff,0xff,0xff,0xff,0xff,0xfe,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xfe, + 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xfe,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xfe, + 0x00,0x00,0xff,0xff,0xff,0xc1,0xff,0xfe,0x00,0x00,0xff,0xff,0xf8,0x1e,0x07,0xfe, + 0x00,0x00,0xff,0xff,0xe7,0xc1,0xf9,0xfe,0x00,0x00,0xff,0xf8,0x00,0x3c,0x06,0xfe, + 0x00,0x00,0xff,0xc7,0xe3,0xff,0xe0,0xfe,0x00,0x00,0xff,0xd8,0x03,0xff,0xfd,0xfe, + 0x00,0x00,0xff,0xc7,0xfb,0xff,0xfd,0xfe,0x00,0x00,0xff,0xcf,0xfd,0xff,0xfd,0xfe, + 0x00,0x00,0xff,0xef,0xfc,0xff,0xfb,0xfe,0x00,0x00,0xff,0xf7,0xfb,0x7c,0x7b,0xfe, + 0x00,0x00,0xff,0xfb,0xf9,0x81,0x87,0xfe,0x00,0x00,0xff,0xfd,0xf8,0x4f,0xe7,0xfe, + 0x00,0x00,0xff,0xfe,0xc6,0x00,0x07,0xfe,0x00,0x00,0xff,0xff,0x3f,0x87,0xef,0xfe, + 0x00,0x00,0xff,0xff,0x30,0x17,0xef,0xfe,0x00,0x00,0xff,0xff,0x8f,0xb7,0xef,0xfe, + 0x00,0x00,0xff,0xff,0xdf,0xb7,0xef,0xfe,0x00,0x00,0xff,0xff,0xdf,0xb7,0xef,0xfe, + 0x00,0x00,0xff,0xff,0xdf,0xb7,0xef,0xfe,0x00,0x00,0xff,0xff,0xdf,0xb7,0xef,0xfe, + 0x00,0x00,0xff,0xff,0xdf,0xb7,0xef,0xfe,0x00,0x00,0xff,0xff,0xdf,0xb7,0xef,0xfe, + 0x00,0x00,0xff,0xff,0xdf,0x87,0xef,0xfe,0x00,0x00,0xff,0xff,0xdf,0x87,0xef,0xfe, + 0x00,0x00,0xff,0xff,0xdf,0x00,0x00,0xfe,0x00,0x00,0xff,0xff,0x80,0x7f,0xfe,0x7e, + 0x00,0x00,0xff,0xfc,0x3f,0x7f,0xff,0x7e,0x00,0x00,0xff,0xf9,0xfe,0x7f,0xff,0x7e, + 0x00,0x00,0xff,0xfb,0xf1,0xff,0xff,0x7e,0x00,0x00,0xff,0xfb,0xc7,0xe7,0xff,0x7e, + 0x00,0x00,0xff,0xfb,0x9f,0xef,0xff,0x7e,0x00,0x00,0xff,0xfb,0x3f,0xdf,0xff,0x3e, + 0x00,0x00,0xff,0xfa,0xff,0xdf,0x83,0x9e,0x00,0x00,0xff,0xf8,0xff,0xde,0x37,0xde, + 0x00,0x00,0xff,0xf9,0xff,0xd9,0xf7,0xee,0x00,0x00,0xff,0xfb,0xff,0xc7,0xf0,0x0e, + 0x00,0x00,0xff,0xf2,0x00,0x07,0xf3,0x86,0x00,0x00,0xff,0xe1,0xff,0xf7,0xf7,0xf6, + 0x00,0x00,0xff,0xef,0xff,0xf7,0xf3,0xf6,0x00,0x00,0xff,0xef,0xff,0xf7,0xfb,0xf6, + 0x00,0x00,0xff,0xef,0xff,0xf7,0xfb,0xf6,0x00,0x00,0xff,0xef,0xff,0xf3,0xfb,0xee, + 0x00,0x00,0xff,0xef,0xff,0xfb,0xfb,0xee,0x00,0x00,0xff,0xf7,0xff,0xfb,0xfb,0xee, + 0x00,0x00,0xff,0xf7,0xff,0xfb,0xfb,0xce,0x00,0x00,0xff,0xf3,0xff,0xfb,0xfb,0xde, + 0x00,0x00,0xff,0xfb,0xff,0xfb,0xf9,0x9e,0x00,0x00,0xff,0xf9,0xff,0xfb,0xfd,0xbe, + 0x00,0x00,0xff,0xf8,0xff,0xfb,0xfd,0x7e,0x00,0x00,0xff,0xf8,0x7f,0xfb,0xfc,0x7e, + 0x00,0x00,0xff,0xfc,0x7f,0xfb,0xfc,0xfe,0x00,0x00,0xff,0xfd,0x7f,0xfb,0xfc,0xfe, + 0x00,0x00,0xff,0xfd,0x7f,0xfb,0xfc,0xfe,0x00,0x00,0xff,0xfd,0x7f,0xfb,0xfc,0xfe, + 0x00,0x00,0xff,0xfe,0x7f,0xfb,0xfc,0xfe,0x00,0x00,0xff,0xfe,0x7f,0xf1,0xfc,0x7e, + 0x00,0x00,0xff,0xfc,0x3f,0xe0,0x00,0x7e,0x00,0x00,0xff,0xfd,0xbf,0xf7,0xff,0x7e, + 0x00,0x00,0xff,0xfd,0xbf,0xf7,0xff,0x7e,0x00,0x00,0xff,0xfe,0xbf,0xf7,0xff,0x7e, + 0x00,0x00,0xff,0xfe,0x5f,0xf7,0xff,0x7e,0x00,0x00,0xff,0xff,0x5f,0xf3,0xfe,0x7e, + 0x00,0x00,0xff,0xff,0x9f,0xfb,0xfe,0xfe,0x00,0x00,0xff,0xff,0xcf,0xf9,0xfc,0xfe, + 0x00,0x00,0xff,0xff,0xe8,0x3d,0xfd,0xfe,0x00,0x00,0xff,0xff,0xe3,0xc2,0xfb,0xfe, + 0x00,0x00,0xff,0xff,0xf7,0xfc,0x07,0xfe,0x00,0x00,0xff,0xff,0xef,0xfe,0x1f,0xfe, + 0x00,0x00,0xff,0xff,0xcf,0xff,0x3f,0xfe,0x00,0x00,0xff,0xff,0x3f,0xff,0xbf,0xfe, + 0x00,0x00,0xff,0xe0,0x7f,0xff,0xbf,0xfe,0x00,0x00,0xfc,0x1c,0x03,0xff,0x7f,0xfe, + 0x00,0x00,0xf3,0xff,0xf8,0xff,0x7f,0xfe,0x00,0x00,0xef,0xff,0xff,0x0f,0x7f,0xfe, + 0x00,0x00,0xdf,0xff,0xff,0xff,0x7f,0xfe,0x00,0x00,0xdf,0xff,0xff,0xff,0x7f,0xfe, + 0x00,0x00,0xef,0xff,0xff,0xff,0x7f,0xfe,0x00,0x00,0xef,0xff,0xff,0xff,0x7f,0xfe, + 0x00,0x00,0xef,0xff,0xff,0xfc,0x1f,0xfe,0x00,0x00,0xef,0xff,0xff,0xff,0xdf,0xfe, + 0x00,0x00,0xef,0xff,0xff,0xff,0x8f,0xfe,0x00,0x00,0xe0,0x3f,0x87,0xfe,0x0f,0xfe, + 0x00,0x00,0xe7,0xfe,0x30,0xff,0xdf,0xfe,0x00,0x00,0xe7,0xfd,0xfe,0x7c,0x9f,0xfe, + 0x00,0x00,0xef,0xfb,0xff,0x3f,0x3f,0xfe,0x00,0x00,0xe7,0xf3,0xff,0xbf,0x7f,0xfe, + 0x00,0x00,0xc0,0x07,0xff,0x9f,0x7f,0xfe,0x00,0x00,0xdf,0xf7,0xf7,0xdf,0x7f,0xfe, + 0x00,0x00,0xde,0x77,0xe3,0xdf,0x7f,0xfe,0x00,0x00,0xde,0x37,0xf3,0xdf,0x3f,0xfe, + 0x00,0x00,0xde,0x77,0xff,0xdf,0xbf,0xfe,0x00,0x00,0xdf,0xf7,0xff,0x9f,0xbf,0xfe, + 0x00,0x00,0xdf,0xf3,0xff,0xbf,0xbf,0xfe,0x00,0x00,0xef,0xf3,0xff,0x7f,0xbf,0xfe, + 0x00,0x00,0xe7,0xe4,0xfe,0x7f,0xbf,0xfe,0x00,0x00,0xe0,0x0e,0x01,0xff,0xbf,0xfe, + 0x00,0x00,0xe7,0xff,0xef,0xff,0xbf,0xfe,0x00,0x00,0xf7,0xff,0xff,0xff,0x9f,0xfe, + 0x00,0x00,0xfb,0xff,0xff,0xff,0xdf,0xfe,0x00,0x00,0xfb,0xff,0xff,0xff,0xdf,0xfe, + 0x00,0x00,0xfb,0xff,0xff,0xff,0xdf,0xfe,0x00,0x00,0xfb,0xff,0xff,0xff,0xdf,0xfe, + 0x00,0x00,0xfb,0xff,0xff,0xff,0xcf,0xfe,0x00,0x00,0xfb,0xff,0xff,0xff,0xef,0xfe, + 0x00,0x00,0xfb,0xff,0xff,0xff,0xef,0xfe,0x00,0x00,0xfb,0xff,0xff,0xff,0xef,0xfe, + 0x00,0x00,0xfb,0xff,0xff,0xff,0xf7,0xfe,0x00,0x00,0xf9,0xff,0xff,0xff,0xf7,0xfe, + 0x00,0x00,0xfd,0xff,0xff,0xff,0xf7,0xfe,0x00,0x00,0xfd,0xff,0xff,0xff,0xf7,0xfe, + 0x00,0x00,0xfd,0xff,0xff,0xff,0xf7,0xfe,0x00,0x00,0xfd,0xff,0xff,0xff,0xcb,0xfe, + 0x00,0x00,0xfd,0xff,0xff,0xfe,0xc3,0xfe,0x00,0x00,0xfd,0xff,0xff,0xf6,0x5b,0xfe, + 0x00,0x00,0xfd,0xbf,0xff,0x64,0x3f,0xfe,0x00,0x00,0xfc,0x33,0x76,0x69,0xbf,0xfe, + 0x00,0x00,0xfc,0xa2,0x22,0x8d,0xff,0xfe,0x00,0x00,0xfd,0xc8,0xc8,0xdd,0xff,0xfe, + 0x00,0x00,0xff,0xdd,0xdd,0xff,0xff,0xfe,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xfe, + 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xfe,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xfe, + 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xfe,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xfe, + 0x00,0x00}; diff --git a/examples/epd_panel_tester/epd_panel_tester.ino b/examples/epd_panel_tester/epd_panel_tester.ino new file mode 100644 index 0000000..d86e4b0 --- /dev/null +++ b/examples/epd_panel_tester/epd_panel_tester.ino @@ -0,0 +1,360 @@ +#include +#include +#include "Roboto_Thin_48.h" +#include "bart_47x128.h" +ONE_BIT_DISPLAY oled; +BBEPAPER epd(EP29_128x296); +int iDataTime, iOpTime; + +#ifdef HAL_ESP32_HAL_H_ +// These values are for the Laska_Kit ESPInk board +// with a pushbutton and pull down resistor attached +// to the RX0/TX0 signals exposed on the 8-pin female programming header +#if defined (ARDUINO_FEATHERS3) || defined(ARDUINO_FEATHERS2) +#define CS_PIN 5 +#define DC_PIN 6 +#define RESET_PIN 12 +#define BUSY_PIN 14 +#define CLK_PIN 36 +#define MOSI_PIN 35 +#define POWER_PIN 39 +#else // must be Laska_Kit ESPInk +#define CS_PIN 5 +#define DC_PIN 17 +#define RESET_PIN 16 +#define BUSY_PIN 4 +#define CLK_PIN 18 +#define MOSI_PIN 23 +#define POWER_PIN 2 +#endif + +#define BUTTON1 1 +#define BUTTON2 3 +#else +// These pin assignments are for a custom e-paper +// adapter add-on with 2 push buttons +// for the Arduino Nano 33 BLE +#define CS_PIN 10 +#define DC_PIN 16 +#define RESET_PIN 14 +#define BUSY_PIN 15 +#define CLK_PIN -1 +#define MOSI_PIN -1 +#define POWER_PIN -1 + +#define BUTTON1 2 +#define BUTTON2 3 +#endif +int iPanel = 0; +int iMode = 0; // 0=EPD test + +// Friendly name for the OneBitDisplay library e-paper panel types +// The first 2 digits signify the panel size (e.g. 42 = 4.2") +// A letter "R" after the size indicates a Black/White/RED panel +// The X*Y indicate the native pixel resolution +const char *szPanelNames[] = { + "EP42_400x300 ", // WFT0420CZ15 + "EP42B_400x300 ", + "EP213_122x250 ", // waveshare + "EP213B_122x250 ", // GDEY0213B74 + "EP293_128x296 ", + "EP294_128x296 ", + "EP295_128x296 ", + "EP266_152x296 ", // GDEY0266T90 + "EP102_80x128 ", + "EP27B_176x264 ", // GDEY027T91 + "EP29R_128x296 ", + "EP122_192x176 ", // GDEM0122T61 + "EP154R_152x152 ", + "EP42R_400x300 ", + "EP42R2_400x300 ", + "EP37_240x416 ", // DEPG0370BS + "EP213_104x212 ", + "EP75_800x480 ", + "EP29_128x296 ", + "EP213R_122x250 ", + NULL +}; +// names of the operating modes +const char *szMode[] = {"Full upd wo/RAM ", "Full upd w/RAM ", "Fast Update ", "Partial Update ", "Clear to white "}; +enum { + MODE_FULL_NO_RAM = 0, + MODE_FULL_RAM, + MODE_FAST, + MODE_PARTIAL, + MODE_CLEAR, + MODE_COUNT +}; + +// List of supported colors for each panel type +// 2 = Black/White, 3 = Black/White/Red +const uint8_t u8PanelColors[] = {2,2,2,2,2,2,2,2,2,2,3,2,3,3,3,2,2,2,2,3}; + +void epdBegin() +{ + if (POWER_PIN != -1) { + pinMode(POWER_PIN, OUTPUT); + digitalWrite(POWER_PIN, HIGH); + delay(100); // allow time to settle + } + epd.initIO(DC_PIN, RESET_PIN, BUSY_PIN, CS_PIN, MOSI_PIN, CLK_PIN); +} /* epdBegin() */ + +// Display info about the currently selected panel +void ShowInfo(bool bErase) +{ + if (bErase) { + oled.fillScreen(OBD_WHITE); + } + oled.setCursor(0, 0); + oled.setFont(FONT_8x8); + oled.println("EPD Panel Tester"); + oled.setCursor(0, 16); + oled.print(szPanelNames[iPanel]); + oled.print(" "); // erase old name if longer + oled.setFont(FONT_6x8); + oled.setCursor(0, 24); + oled.print(" "); // erase any old text + oled.setCursor(0, 24); + if (epd.hasFastRefresh()) { + oled.print(" fast"); + } + if (epd.hasPartialRefresh()) { + oled.print(" partial"); + } + if (epd.capabilities() & BBEP_3COLOR) { + oled.print(" 3 colors"); + } + oled.setCursor(0, 32); + oled.print(" controller: "); + oled.print((epd.getChip() == BBEP_CHIP_SSD16xx) ? "SSD16xx" : "UC8xxx "); + oled.setCursor(0, 48); + oled.setFont(FONT_8x8); + oled.println(szMode[iMode]); + oled.setFont(FONT_6x8); + oled.print("(press&hold to exec)"); +} /* ShowInfo() */ + +void DrawScene(int i, int iPlane) +{ + char szTemp[16]; + epd.setPlane(iPlane); + epd.fillScreen(BBEP_WHITE, iPlane); + epd.setFont(FONT_12x16); + epd.setTextColor(BBEP_BLACK); + epd.setCursor(0,0); + epd.println("bb_epaper"); + epd.println("partial"); + epd.println("Update demo"); + sprintf(szTemp, "%04d", i); + epd.setCursor(0, epd.height()-4); + epd.setFont(Roboto_Thin_48); + epd.println(szTemp); +} /* DrawScene() */ + +void EPDTest(int iMode) +{ + oled.fillScreen(OBD_WHITE); + oled.setFont(FONT_12x16); + oled.println("Starting..."); + oled.setFont(FONT_8x8); + oled.println(szMode[iMode]); + if (iMode == MODE_PARTIAL) { + int i, x, y; + char szTemp[16]; + + if (!epd.hasPartialRefresh()) { + oled.setFont(FONT_8x8); + oled.println("This EPD doesn't"); + oled.println("Support partial\nupdates"); + iDataTime = iOpTime = 0; + return; + } + epdBegin(); +// if (epd.width() < epd.height() || !epd.getBuffer()) { +// epd.setRotation(90); +// } + epd.allocBuffer(); + epd.fillScreen(BBEP_WHITE); + epd.refresh(REFRESH_FULL, true); + epd.setFont(Roboto_Thin_48); + // count from 0 to 9 using partial updates + i = 0; + while (i<10) { + DrawScene(i, 0); // draw scene to old plane 0 (not always needed, but doesn't hurt to do) + i++; + DrawScene(i, 1); // new scene drawn to plane 1 + epd.writePlane(PLANE_BOTH); + epd.refresh(REFRESH_PARTIAL, true); + epd.sleep(LIGHT_SLEEP); + } // for i + iDataTime = epd.dataTime(); + iOpTime = epd.opTime(); + epd.freeBuffer(); + epd.fillScreen(BBEP_WHITE); + epd.refresh(REFRESH_FULL, true); + } else { // slow/fast + epdBegin(); + if (epd.width() < epd.height()) { + epd.setRotation(90); + } + if (iMode == MODE_FAST && !epd.hasFastRefresh()) { + oled.setFont(FONT_8x8); + oled.println("This EPD doesn't"); + oled.println("Support fast\nupdates"); + iDataTime = iOpTime = 0; + return; + } + if (iMode == MODE_FULL_RAM) { + epd.allocBuffer(); + } + epd.fillScreen(BBEP_WHITE); + epd.setTextColor(BBEP_BLACK); + if (epd.width() < 296) + epd.setFont(FONT_8x8); + else + epd.setFont(FONT_12x16); + epd.println("EPD Test"); + epd.print("Name: "); + epd.println(szPanelNames[iPanel]); + epd.print("Size: "); + epd.print(epd.width(), DEC); + epd.print("x"); + epd.println(epd.height(), DEC); + if (epd.getBuffer()) { + epd.println("With backbuffer"); + epd.loadBMP(bart_47x128, epd.width()-47, 0, BBEP_RED, BBEP_WHITE); + } else { + epd.println("No backbuffer (0 RAM)"); + } + if (u8PanelColors[iPanel] != 3) + epd.println("Two colors (B/W)"); + else { + epd.setTextColor(BBEP_RED, BBEP_WHITE); + epd.println("Three colors (B/W/R)"); + } + if (epd.getBuffer()) { + epd.writePlane(); + } + epd.refresh((iMode == MODE_FAST) ? REFRESH_FAST : REFRESH_FULL, true); + if (epd.getBuffer()) { + epd.freeBuffer(); + } + iDataTime = epd.dataTime(); + iOpTime = epd.opTime(); + } // slow/fast + epd.sleep(DEEP_SLEEP); +} /* EPDTest() */ + +void EPDClear(void) +{ + oled.fillScreen(OBD_WHITE); + oled.setFont(FONT_12x16); + oled.println("Clear EPD"); + oled.println("Starting..."); + epdBegin(); + if (epd.width() < epd.height() || !epd.getBuffer()) { + epd.setRotation(90); + } + epd.fillScreen(BBEP_WHITE); + epd.refresh(REFRESH_FULL, true); // display the white buffer and return + iDataTime = epd.dataTime(); + iOpTime = epd.opTime(); + epd.sleep(DEEP_SLEEP); +} /* EPDClear() */ + +void ShowTime(void) +{ + if (iDataTime || iOpTime) { + oled.fillScreen(OBD_WHITE); + oled.setFont(FONT_8x8); + oled.println("Perf Report for:"); + oled.println(szPanelNames[iPanel]); + oled.println("Data xfer @ 8MHz"); + oled.print((int)iDataTime, DEC); + oled.println(" ms"); + oled.println("\nEPD Op Time"); + oled.print((int)iOpTime, DEC); + oled.println(" ms"); + } + oled.setFont(FONT_6x8); + oled.setCursor(0,56); + oled.println("(Any button to exit)"); + while (digitalRead(BUTTON1) == 1 && digitalRead(BUTTON2) == 1) { + delay(10); + } + // wait for button release + while (digitalRead(BUTTON1) == 0 || digitalRead(BUTTON2) == 0) { + delay(10); + } +} /* ShowTime() */ + +void setup() { + oled.I2Cbegin(); + oled.fillScreen(OBD_WHITE); + pinMode(BUTTON1, INPUT_PULLUP); + pinMode(BUTTON2, INPUT_PULLUP); +// Serial.begin(115200); +// delay(3000); +// Serial.println("EPD BLE Tester"); +} /* setup() */ + +void loop() { + int iOldButt1 = 1; + int iButt1, iButt2; + long iTime; + + ShowInfo(true); + while (1) { + iButt1 = digitalRead(BUTTON1); + iButt2 = digitalRead(BUTTON2); + delay(25); // allow time for debounce + // Panel selection button + if (iButt1 == 0 && iOldButt1 == 1) { + iPanel++; + if (iPanel >= EP_PANEL_COUNT-1) iPanel = 0; + epd.setPanelType(iPanel+1); + ShowInfo(false); + iTime = millis(); + while (digitalRead(BUTTON1) == 0 && millis() - iTime < 1000) { // if user holds it down, go FAST + delay(20); + } // wait for button to be held for 1 second before starting + while (digitalRead(BUTTON1) == 0) { + iPanel++; + if (iPanel >= EP_PANEL_COUNT-1) iPanel = 0; + ShowInfo(false); + delay(200); // 5 per second should be fast enough + } // while button1 held down + } + // Mode selection/start button + if (iButt2 == 0) { + iTime = millis(); + while (digitalRead(BUTTON2) == 0 && (millis() - iTime < 1000)) { // measure how long button is held + delay(10); + } + iTime = millis() - iTime; + if (iTime < 1000) { + iMode++; + if (iMode >= MODE_COUNT) iMode = 0; + ShowInfo(false); + } else { + // start the operation + iTime = millis(); + switch (iMode) { + case MODE_FULL_NO_RAM: // full refresh EPD test without using the back buffer + case MODE_FULL_RAM: + case MODE_FAST: // needs backbuffer too + case MODE_PARTIAL: + EPDTest(iMode); + break; + case MODE_CLEAR: + EPDClear(); + break; + } // switch on mode + ShowTime(); + ShowInfo(true); // repaint the main menu info + } + } + iOldButt1 = iButt1; + } +} /* loop() */ diff --git a/examples/images_and_icons/images_and_icons.ino b/examples/images_and_icons/images_and_icons.ino index da4dca9..59c2634 100644 --- a/examples/images_and_icons/images_and_icons.ino +++ b/examples/images_and_icons/images_and_icons.ino @@ -6,7 +6,7 @@ #include "bomb.h" // uncompressed 40x40 image #include "bart.h" // compressed 128x64 image -BBEPAPER bbep(EPD295_128x296); +BBEPAPER bbep(EP295_128x296); // Mike Rankin's C3 e-ink PCB #define PIN_DC 3 #define PIN_BUSY 1 diff --git a/examples/partial_update/partial_update.ino b/examples/partial_update/partial_update.ino index 58a937a..02e8e05 100644 --- a/examples/partial_update/partial_update.ino +++ b/examples/partial_update/partial_update.ino @@ -28,9 +28,9 @@ // both old and new data each update. // #include -//BBEPAPER bbep(EPD295_128x296); -BBEPAPER bbep(EPD42_400x300); -//BBEPAPER bbep(EPD29_128x296); // Badger2040 +BBEPAPER bbep(EP295_128x296); +//BBEPAPER bbep(EP213B_122x250); +//BBEPAPER bbep(EP29_128x296); // Badger2040 // My Arduino Nano 33 BLE e-paper adapter #define DC_PIN 16 #define BUSY_PIN 15 diff --git a/rpi/examples/hello_epaper/main.cpp b/rpi/examples/hello_epaper/main.cpp index e8ca75f..bd4b0d7 100644 --- a/rpi/examples/hello_epaper/main.cpp +++ b/rpi/examples/hello_epaper/main.cpp @@ -5,9 +5,9 @@ // Copyright (c) 2024 BitBank Software, Inc. // #include "../../../src/bb_epaper.h" -//BBEPAPER bbep(EPD213_104x212); // InkyPHAT 2.13" -BBEPAPER bbep(EPD295_128x296); -//BBEPAPER bbep(EPD154R_152x152); +//BBEPAPER bbep(EP213_104x212); // InkyPHAT 2.13" +BBEPAPER bbep(EP295_128x296); +//BBEPAPER bbep(EP154R_152x152); // BCM GPIO numbers used by Pimoroni e-paper "HATs" #define PIN_DC 22 #define PIN_RST 27 diff --git a/rpi/examples/partial_update_clock/main.cpp b/rpi/examples/partial_update_clock/main.cpp index 9a8befd..aab31af 100644 --- a/rpi/examples/partial_update_clock/main.cpp +++ b/rpi/examples/partial_update_clock/main.cpp @@ -14,7 +14,7 @@ #include "../../../src/bb_epaper.h" #include "Roboto_Black_78.h" #include -BBEPAPER bbep(EPD42_400x300); // 4.2" UC81xx controller +BBEPAPER bbep(EP42_400x300); // 4.2" UC81xx controller // BCM GPIO numbers used by Pimoroni e-paper "HATs" #define PIN_DC 22 #define PIN_RST 27 diff --git a/rpi_pico/epaper_example/epaper_example.c b/rpi_pico/epaper_example/epaper_example.c index 9f96035..c039d8a 100644 --- a/rpi_pico/epaper_example/epaper_example.c +++ b/rpi_pico/epaper_example/epaper_example.c @@ -32,7 +32,7 @@ BBEPDISP bbep; // the main display structure int main() { - bbepSetPanelType(&bbep, EPD295_128x296); // must set this first + bbepSetPanelType(&bbep, EP295_128x296); // must set this first bbepInitIO(&bbep, PIN_DC, PIN_RST, PIN_BUSY, PIN_CS, PIN_MOSI, PIN_SCK, 8000000); bbepFill(&bbep, BBEP_WHITE, 0); bbepWriteString(&bbep, 0, 0, "RPI Pico2!", FONT_12x16, BBEP_BLACK); diff --git a/src/bb_ep.inl b/src/bb_ep.inl index 0171075..47078da 100644 --- a/src/bb_ep.inl +++ b/src/bb_ep.inl @@ -1063,26 +1063,26 @@ uint8_t u8Cache[128]; // buffer a single line of up to 1024 pixels // const EPD_PANEL panelDefs[] PROGMEM = { {0}, // undefined panel - {400, 300, 0, epd42_init_sequence_full, NULL, epd42_init_sequence_part, 0, BBEP_CHIP_UC81xx}, // EPD42_400x300 - {400, 300, 0, epd42b_init_sequence_full, epd42b_init_sequence_fast, epd42b_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EPD42B_400x300 - {122, 250, 0, epd213_122x250_init_sequence_full, NULL, epd213_122x250_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EPD213_122x250 WaveShare - {122, 250, 0, epd213b_init_sequence_full, NULL, epd213b_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EPD213B_122x250, newer Inky phat 2.13" B/W - {128, 296, 0, epd293_init_sequence_full, epd293_init_sequence_fast, epd293_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EPD293_128x296 - {128, 296, 0, epd294_init_sequence_full, NULL, NULL, 0, BBEP_CHIP_SSD16xx}, // EPD294_128x296 - {128, 296, 0, epd293_init_sequence_full, epd293_init_sequence_fast, epd295_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EPD295_128x296 - {152, 296, 0, epd266_init_sequence_full, NULL, epd266_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EPD266_152x296 - {80, 128, 0, epd102_init_sequence_full, NULL, epd102_init_sequence_part, 0, BBEP_CHIP_UC81xx}, // EPD102_80x128 - {176, 264, 0, epd27_init_sequence_full, NULL, epd27_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EPD27B_176x264 - {128, 296, 0, epd29r_init_sequence_full, NULL, NULL, BBEP_3COLOR, BBEP_CHIP_SSD16xx}, // EPD29R_128x296 - {192, 176, 0, epd122_init_sequence_full, epd122_init_sequence_fast, epd122_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EPD122_192x176 - {152, 152, 0, epd154r_init_sequence_full, NULL, NULL, BBEP_3COLOR, BBEP_CHIP_SSD16xx}, // EPD154R_152x152 - {400, 300, 0, epd42r_init_sequence_full, NULL, NULL, BBEP_3COLOR, BBEP_CHIP_SSD16xx}, // EPD42R_400x300, Inky wHAT 4.2" 400x300 B/W/R - {400, 300, 0, epd42r2_init_sequence_full, NULL, NULL, BBEP_3COLOR, BBEP_CHIP_UC81xx}, // EPD42R2_400x300 - {240, 416, 0, epd37_init_sequence_full, NULL, epd37_init_sequence_part, 0, BBEP_CHIP_UC81xx}, // EPD37_240x416 - {104, 212, 0, epd213_inky_init_sequence_full, NULL, NULL, 0, BBEP_CHIP_UC81xx}, // EPD213_104x212, older InkyPHAT black and white - {800, 480, 0, epd75_init_sequence_full, epd75_init_sequence_fast, epd75_init_sequence_partial, 0, BBEP_CHIP_UC81xx}, // EPD75_800x480 + {400, 300, 0, epd42_init_sequence_full, NULL, epd42_init_sequence_part, 0, BBEP_CHIP_UC81xx}, // EP42_400x300 + {400, 300, 0, epd42b_init_sequence_full, epd42b_init_sequence_fast, epd42b_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EP42B_400x300 + {122, 250, 0, epd213_122x250_init_sequence_full, NULL, epd213_122x250_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EP213_122x250 WaveShare + {122, 250, 0, epd213b_init_sequence_full, NULL, epd213b_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EP213B_122x250, newer Inky phat 2.13" B/W + {128, 296, 0, epd293_init_sequence_full, epd293_init_sequence_fast, epd293_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EP293_128x296 + {128, 296, 0, epd294_init_sequence_full, NULL, NULL, 0, BBEP_CHIP_SSD16xx}, // EP294_128x296 + {128, 296, 0, epd293_init_sequence_full, epd293_init_sequence_fast, epd295_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EP295_128x296 + {152, 296, 0, epd266_init_sequence_full, NULL, epd266_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EP266_152x296 + {80, 128, 0, epd102_init_sequence_full, NULL, epd102_init_sequence_part, 0, BBEP_CHIP_UC81xx}, // EP102_80x128 + {176, 264, 0, epd27_init_sequence_full, NULL, epd27_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EP27B_176x264 + {128, 296, 0, epd29r_init_sequence_full, NULL, NULL, BBEP_3COLOR, BBEP_CHIP_SSD16xx}, // EP29R_128x296 + {192, 176, 0, epd122_init_sequence_full, epd122_init_sequence_fast, epd122_init_sequence_part, 0, BBEP_CHIP_SSD16xx}, // EP122_192x176 + {152, 152, 0, epd154r_init_sequence_full, NULL, NULL, BBEP_3COLOR, BBEP_CHIP_SSD16xx}, // EP154R_152x152 + {400, 300, 0, epd42r_init_sequence_full, NULL, NULL, BBEP_3COLOR, BBEP_CHIP_SSD16xx}, // EP42R_400x300, Inky wHAT 4.2" 400x300 B/W/R + {400, 300, 0, epd42r2_init_sequence_full, NULL, NULL, BBEP_RED_SWAPPED | BBEP_3COLOR, BBEP_CHIP_UC81xx}, // EP42R2_400x300 + {240, 416, 0, epd37_init_sequence_full, NULL, epd37_init_sequence_part, 0, BBEP_CHIP_UC81xx}, // EP37_240x416 + {104, 212, 0, epd213_inky_init_sequence_full, NULL, NULL, 0, BBEP_CHIP_UC81xx}, // EP213_104x212, older InkyPHAT black and white + {800, 480, 0, epd75_init_sequence_full, epd75_init_sequence_fast, epd75_init_sequence_partial, 0, BBEP_CHIP_UC81xx}, // EP75_800x480 {128, 296, 0, epd29_init_sequence_full, NULL, epd29_init_sequence_part, 0, BBEP_CHIP_UC81xx}, // Badger 2040 - {122, 250, 1, epd213r_inky_init_sequence_full, NULL, NULL, BBEP_3COLOR, BBEP_CHIP_SSD16xx}, // EPD213R_122x250 Inky phat 2.13" B/W/R + {122, 250, 1, epd213r_inky_init_sequence_full, NULL, NULL, BBEP_3COLOR, BBEP_CHIP_SSD16xx}, // EP213R_122x250 Inky phat 2.13" B/W/R }; // // Set the e-paper panel type @@ -1090,7 +1090,7 @@ const EPD_PANEL panelDefs[] PROGMEM = { // int bbepSetPanelType(BBEPDISP *pBBEP, int iPanel) { - if (pBBEP == NULL || iPanel <= EPD_PANEL_UNDEFINED || iPanel >= EPD_PANEL_COUNT) + if (pBBEP == NULL || iPanel <= EP_PANEL_UNDEFINED || iPanel >= EP_PANEL_COUNT) return BBEP_ERROR_BAD_PARAMETER; memset(pBBEP, 0, sizeof(BBEPDISP)); @@ -1232,10 +1232,17 @@ void bbepStartWrite(BBEPDISP *pBBEP, int iPlane) if (!pBBEP) return; if (pBBEP->chip_type == BBEP_CHIP_UC81xx) { - if (iPlane == PLANE_0) - u8Cmd = UC8151_DTM2; - else - u8Cmd = UC8151_DTM1; + if (pBBEP->iFlags & BBEP_RED_SWAPPED) { + if (iPlane == PLANE_0) + u8Cmd = UC8151_DTM1; + else + u8Cmd = UC8151_DTM2; + } else { + if (iPlane == PLANE_0) + u8Cmd = UC8151_DTM2; + else + u8Cmd = UC8151_DTM1; + } } else { // SSD16xx if (iPlane == PLANE_0) u8Cmd = SSD1608_WRITE_RAM; @@ -1323,8 +1330,13 @@ void bbepFill(BBEPDISP *pBBEP, unsigned char ucData, int iPlane) uc1 = uc2 = ucData; } if (pBBEP->chip_type == BBEP_CHIP_UC81xx) { - ucCMD1 = UC8151_DTM2; - ucCMD2 = UC8151_DTM1; + if (pBBEP->iFlags & BBEP_RED_SWAPPED) { + ucCMD1 = UC8151_DTM1; + ucCMD2 = UC8151_DTM2; + } else { + ucCMD1 = UC8151_DTM2; + ucCMD2 = UC8151_DTM1; + } } else { ucCMD1 = SSD1608_WRITE_RAM; ucCMD2 = SSD1608_WRITE_ALTRAM; @@ -1507,8 +1519,13 @@ int bbepWritePlane(BBEPDISP *pBBEP, int iPlane) bbepSetAddrWindow(pBBEP, 0,0, pBBEP->native_width, pBBEP->native_height); if (pBBEP->chip_type == BBEP_CHIP_UC81xx) { - ucCMD1 = UC8151_DTM2; - ucCMD2 = UC8151_DTM1; + if (pBBEP->iFlags & BBEP_RED_SWAPPED) { + ucCMD1 = UC8151_DTM1; + ucCMD2 = UC8151_DTM2; + } else { + ucCMD1 = UC8151_DTM2; + ucCMD2 = UC8151_DTM1; + } } else { ucCMD1 = SSD1608_WRITE_RAM; ucCMD2 = SSD1608_WRITE_ALTRAM; diff --git a/src/bb_ep_gfx.inl b/src/bb_ep_gfx.inl index 6338b45..eedddba 100644 --- a/src/bb_ep_gfx.inl +++ b/src/bb_ep_gfx.inl @@ -210,8 +210,13 @@ void bbepDrawSprite(BBEPDISP *pBBEP, const uint8_t *pSprite, int cx, int cy, int int iDestPitch; // start writing into the correct plane if (pBBEP->chip_type == BBEP_CHIP_UC81xx) { - u8CMD1 = UC8151_DTM2; - u8CMD2 = UC8151_DTM1; + if (pBBEP->iFlags & BBEP_RED_SWAPPED) { + u8CMD1 = UC8151_DTM1; + u8CMD2 = UC8151_DTM2; + } else { + u8CMD1 = UC8151_DTM2; + u8CMD2 = UC8151_DTM1; + } } else { u8CMD1 = SSD1608_WRITE_RAM; u8CMD2 = SSD1608_WRITE_ALTRAM; @@ -665,7 +670,7 @@ void bbepSetTextWrap(BBEPDISP *pBBEP, int bWrap) // // Draw a string of BB_FONT characters directly into the EPD framebuffer // -void bbepWriteStringCustom(BBEPDISP *pBBEP, BB_FONT *pFont, int x, int y, char *szMsg, int iColor, uint8_t iPlane) +int bbepWriteStringCustom(BBEPDISP *pBBEP, BB_FONT *pFont, int x, int y, char *szMsg, int iColor, uint8_t iPlane) { int rc, i, h, w, j, end_y, dx, dy, tx, ty, iSrcPitch, iPitch; signed int n; @@ -675,10 +680,10 @@ void bbepWriteStringCustom(BBEPDISP *pBBEP, BB_FONT *pFont, int x, int y, char * uint8_t *pBits, u8CMD1, u8CMD2, u8CMD, u8EndMask; uint8_t first, last; - if (pBBEP == NULL) return; + if (pBBEP == NULL) return BBEP_ERROR_BAD_PARAMETER; if (pFont == NULL) { pBBEP->last_error = BBEP_ERROR_BAD_PARAMETER; - return; // invalid param + return BBEP_ERROR_BAD_PARAMETER; // invalid param } if (x == -1) x = pBBEP->iCursorX; @@ -738,7 +743,7 @@ void bbepWriteStringCustom(BBEPDISP *pBBEP, BB_FONT *pFont, int x, int y, char * rc = g5_decode_init(&g5dec, w, h, s, ty); if (rc != G5_SUCCESS) { pBBEP->last_error = BBEP_ERROR_BAD_DATA; - return; // corrupt data? + return BBEP_ERROR_BAD_DATA; // corrupt data? } if (pBBEP->ucScreen) { // backbuffer, draw pixels #ifndef NO_RAM @@ -769,8 +774,13 @@ void bbepWriteStringCustom(BBEPDISP *pBBEP, BB_FONT *pFont, int x, int y, char * iPitch = (w+7)/8; // start writing into the correct plane if (pBBEP->chip_type == BBEP_CHIP_UC81xx) { - u8CMD1 = UC8151_DTM2; - u8CMD2 = UC8151_DTM1; + if (pBBEP->iFlags & BBEP_RED_SWAPPED) { + u8CMD1 = UC8151_DTM1; + u8CMD2 = UC8151_DTM2; + } else { + u8CMD1 = UC8151_DTM2; + u8CMD2 = UC8151_DTM1; + } } else { u8CMD1 = SSD1608_WRITE_RAM; u8CMD2 = SSD1608_WRITE_ALTRAM; @@ -811,6 +821,7 @@ void bbepWriteStringCustom(BBEPDISP *pBBEP, BB_FONT *pFont, int x, int y, char * } // while drawing characters pBBEP->iCursorX = x; pBBEP->iCursorY = y; + return BBEP_SUCCESS; } /* EPDWriteStringCustom() */ // // Rotate an 8x8 pixel block (8 bytes) by 90 degrees @@ -848,8 +859,13 @@ int bbepWriteString(BBEPDISP *pBBEP, int x, int y, char *szMsg, int iSize, int i return BBEP_ERROR_BAD_PARAMETER; } if (pBBEP->chip_type == BBEP_CHIP_UC81xx) { - ucCMD1 = UC8151_DTM2; - ucCMD2 = UC8151_DTM1; + if (pBBEP->iFlags & BBEP_RED_SWAPPED) { + ucCMD1 = UC8151_DTM1; + ucCMD2 = UC8151_DTM2; + } else { + ucCMD1 = UC8151_DTM2; + ucCMD2 = UC8151_DTM1; + } } else { ucCMD1 = SSD1608_WRITE_RAM; ucCMD2 = SSD1608_WRITE_ALTRAM; @@ -963,8 +979,6 @@ int bbepWriteString(BBEPDISP *pBBEP, int x, int y, char *szMsg, int iSize, int i s = (unsigned char *)&ucSmallFont[(int)c*5]; u8Temp[0] = 0; // first column is blank memcpy_P(&u8Temp[1], s, 6); - if (iColor == BBEP_BLACK && !pBBEP->ucScreen) - InvertBytes(u8Temp, 6); // Stretch the font to double width + double height memset(&u8Temp[6], 0, 24); // write 24 new bytes for (tx=0; tx<6; tx++) @@ -1070,9 +1084,15 @@ int bbepWriteString(BBEPDISP *pBBEP, int x, int y, char *szMsg, int iSize, int i if (!pBBEP->ucScreen) { // bufferless mode bbepSetAddrWindow(pBBEP, pBBEP->native_width-8-pBBEP->iCursorY, pBBEP->iCursorX, 8, iLen); bbepWriteCmd(pBBEP, ucCMD); // write to "new" plane + if (iColor == BBEP_BLACK) { + InvertBytes(&u8Temp[6], iLen); + } bbepWriteData(pBBEP, &u8Temp[6], iLen); bbepSetAddrWindow(pBBEP, pBBEP->native_width-16-pBBEP->iCursorY, pBBEP->iCursorX, 8, iLen); bbepWriteCmd(pBBEP, ucCMD); // write to "new" plane + if (iColor == BBEP_BLACK) { + InvertBytes(&u8Temp[18], iLen); + } bbepWriteData(pBBEP, &u8Temp[18], iLen); } else { // write to RAM #ifndef NO_RAM diff --git a/src/bb_epaper.cpp b/src/bb_epaper.cpp index e93af6c..215856a 100644 --- a/src/bb_epaper.cpp +++ b/src/bb_epaper.cpp @@ -61,6 +61,11 @@ void BBEPAPER::setAddrWindow(int x, int y, int w, int h) bbepSetAddrWindow(&_bbep, x, y, w, h); } +int BBEPAPER::setPanelType(int iPanel) +{ + return bbepSetPanelType(&_bbep, iPanel); +} + #ifdef ARDUINO void BBEPAPER::initIO(int iDC, int iReset, int iBusy, int iCS, int iMOSI, int iSCLK, uint32_t u32Speed) { @@ -83,16 +88,22 @@ void BBEPAPER::initIO(int iDC, int iReset, int iBusy, int iCS, int iSPIChannel, #endif int BBEPAPER::writePlane(int iPlane) { - return bbepWritePlane(&_bbep, iPlane); + long l = millis(); + int rc; + rc = bbepWritePlane(&_bbep, iPlane); + _bbep.iDataTime = (int)(millis() - l); + return rc; } /* writePlane() */ int BBEPAPER::refresh(int iMode, bool bWait) { int rc; + long l = millis(); rc = bbepRefresh(&_bbep, iMode); if (rc == BBEP_SUCCESS && bWait) { bbepWaitBusy(&_bbep); } + _bbep.iOpTime = (int)(millis() - l); return rc; } /* refresh() */ @@ -166,7 +177,9 @@ int BBEPAPER::getRotation(void) void BBEPAPER::fillScreen(int iColor, int iPlane) { + long l = millis(); bbepFill(&_bbep, iColor, iPlane); + _bbep.iDataTime = (int)(millis() - l); // e.g. for bufferless mode } /* fillScreen() */ void BBEPAPER::drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) @@ -184,6 +197,16 @@ void BBEPAPER::setTextWrap(bool bWrap) _bbep.wrap = (int)bWrap; } +bool BBEPAPER::hasFastRefresh() +{ + return (_bbep.pInitFast != NULL); +} + +bool BBEPAPER::hasPartialRefresh() +{ + return (_bbep.pInitPart != NULL); +} + void BBEPAPER::setTextColor(int iFG, int iBG) { if (iFG > BBEP_RED) iFG = BBEP_BLACK; @@ -345,7 +368,7 @@ char ucTemp[4]; #ifndef __AVR__ size_t BBEPAPER::write(uint8_t c) { char szTemp[2]; // used to draw 1 character at a time to the C methods -int w=8, h=8; +int rc, w=8, h=8; szTemp[0] = c; szTemp[1] = 0; if (_bbep.pFont == NULL) { // use built-in fonts @@ -374,18 +397,16 @@ int w=8, h=8; _bbep.iCursorY += pBBF->height; } else if (c != '\r') { if (c >= pBBF->first && c <= pBBF->last) { - BB_GLYPH *pBBG = &pBBF->glyphs[c-pBBF->first]; + BB_GLYPH *pBBG = &pBBF->glyphs[c - pBBF->first]; w = pBBG->width; h = pBBG->height; - if ((w > 0) && (h > 0)) { // Is there an associated bitmap? - int16_t xo = pBBG->xOffset; - w += xo; // xadvance - h = pBBF->height; - if (_bbep.wrap && ((_bbep.iCursorX + w) > _bbep.width)) { + if (w > 0 && h > 0) { // Is there an associated bitmap? + w += pBBG->xOffset; + if (_bbep.wrap && (_bbep.iCursorX + w) > _bbep.width) { _bbep.iCursorX = 0; _bbep.iCursorY += h; } - bbepWriteStringCustom(&_bbep, (BB_FONT *)_bbep.pFont, -1, -1, szTemp, _bbep.iFG, _bbep.iPlane); + rc = bbepWriteStringCustom(&_bbep, (BB_FONT *)_bbep.pFont, -1, -1, szTemp, _bbep.iFG, _bbep.iPlane); } } } diff --git a/src/bb_epaper.h b/src/bb_epaper.h index b245546..2c480a2 100644 --- a/src/bb_epaper.h +++ b/src/bb_epaper.h @@ -69,6 +69,7 @@ enum { PLANE_BOTH, PLANE_DUPLICATE // duplicate 0 to both 0 and 1 }; +#ifndef __ONEBITDISPLAY__ // 5 possible font sizes: 8x8, 16x32, 6x8, 12x16 (stretched from 6x8 with smoothing), 16x16 (stretched from 8x8) enum { FONT_6x8 = 0, @@ -77,6 +78,8 @@ enum { FONT_16x16, FONT_COUNT }; +#endif + // Centering coordinates to pass to the character drawing functions #define CENTER_X 9998 #define CENTER_Y 9999 @@ -94,28 +97,28 @@ typedef struct epd_panel { // Display types enum { - EPD_PANEL_UNDEFINED=0, - EPD42_400x300, // WFT0420CZ15 - EPD42B_400x300, // DEPG0420BN / GDEY042T81 - EPD213_122x250, // waveshare - EPD213B_122x250, // GDEY0213B74 (Inky phat 2.13" B/W newer version) - EPD293_128x296, - EPD294_128x296, // Waveshare newer 2.9" 1-bit 128x296 - EPD295_128x296, // harvested from Solum 2.9" BW ESLs - EPD266_152x296, // GDEY0266T90 - EPD102_80x128, // GDEW0102T4 - EPD27B_176x264, // GDEY027T91 - EPD29R_128x296, - EPD122_192x176, // GDEM0122T61 - EPD154R_152x152, - EPD42R_400x300, - EPD42R2_400x300, // GDEQ042Z21 - EPD37_240x416, // GDEY037T03 - EPD213_104x212, // InkyPHAT 2.13 black and white - EPD75_800x480, // GDEY075T7 - EPD29_128x296, // Pimoroni Badger2040 - EPD213R_122x250, // Inky phat 2.13 B/W/R - EPD_PANEL_COUNT + EP_PANEL_UNDEFINED=0, + EP42_400x300, // WFT0420CZ15 + EP42B_400x300, // DEPG0420BN / GDEY042T81 + EP213_122x250, // waveshare + EP213B_122x250, // GDEY0213B74 (Inky phat 2.13" B/W newer version) + EP293_128x296, + EP294_128x296, // Waveshare newer 2.9" 1-bit 128x296 + EP295_128x296, // harvested from Solum 2.9" BW ESLs + EP266_152x296, // GDEY0266T90 + EP102_80x128, // GDEW0102T4 + EP27B_176x264, // GDEY027T91 + EP29R_128x296, + EP122_192x176, // GDEM0122T61 + EP154R_152x152, + EP42R_400x300, + EP42R2_400x300, // GDEQ042Z21 + EP37_240x416, // GDEY037T03 + EP213_104x212, // InkyPHAT 2.13 black and white + EP75_800x480, // GDEY075T7 + EP29_128x296, // Pimoroni Badger2040 + EP213R_122x250, // Inky phat 2.13 B/W/R + EP_PANEL_COUNT }; #ifdef FUTURE EPD42_4GRAY_400x300, // WFT0420CZ15 @@ -150,7 +153,7 @@ enum { }; #endif // FUTURE // flag bits -#define BBEP_INVERTED 0x0001 +#define BBEP_RED_SWAPPED 0x0001 #define BBEP_BITBANG 0x0002 #define BBEP_3COLOR 0x0004 #define BBEP_4COLOR 0x0008 @@ -168,6 +171,7 @@ enum { #define BBEP_GRAY2 2 #define BBEP_GRAY3 3 +#ifndef __ONEBITDISPLAY__ // (UC81xx commands) enum { UC8151_PSR = 0x00, @@ -248,6 +252,7 @@ enum { SSD1608_SET_RAMYCOUNT = 0x4F, SSD1608_NOP = 0xFF, }; +#endif #define BUSY_WAIT 0xff @@ -289,6 +294,9 @@ class BBEPAPER BBEPAPER(int iPanel); int createVirtual(int iWidth, int iHeight, int iFlags); void setAddrWindow(int x, int y, int w, int h); + int setPanelType(int iPanel); + bool hasFastRefresh(); + bool hasPartialRefresh(); #ifdef ARDUINO void initIO(int iDC, int iReset, int iBusy, int iCS = SS, int iMOSI = MOSI, int iSCLK = SCK, uint32_t u32Speed = 8000000); #else