From 808dcae79e37695cdf80c1a16da8fe37861d6e69 Mon Sep 17 00:00:00 2001 From: olikraus Date: Sun, 13 Nov 2016 08:36:46 +0100 Subject: [PATCH] 2.6.2 --- examples/full_buffer/FPS/FPS.ino | 2 + .../full_buffer/GraphicsTest/GraphicsTest.ino | 2 + .../full_buffer/HelloWorld/HelloWorld.ino | 2 + examples/full_buffer/PrintUTF8/PrintUTF8.ino | 2 + .../SelectionList/SelectionList.ino | 2 + examples/full_buffer/U8g2Logo/U8g2Logo.ino | 2 + examples/page_buffer/ExtUTF8/ExtUTF8.ino | 2 + examples/page_buffer/FPS/FPS.ino | 2 + examples/page_buffer/FlipMode/FlipMode.ino | 2 + .../page_buffer/GraphicsTest/GraphicsTest.ino | 2 + .../page_buffer/HelloWorld/HelloWorld.ino | 4 +- .../PrintHelloWorld/PrintHelloWorld.ino | 2 + examples/page_buffer/PrintUTF8/PrintUTF8.ino | 2 + .../SelectionList/SelectionList.ino | 2 + examples/page_buffer/U8g2Logo/U8g2Logo.ino | 2 + examples/u8x8/FlipMode/FlipMode.ino | 8 +- examples/u8x8/GraphicsTest/GraphicsTest.ino | 10 +- examples/u8x8/HelloWorld/HelloWorld.ino | 10 +- examples/u8x8/MessageBox/MessageBox.ino | 3 +- extras/ChangeLog | 10 +- library.properties | 2 +- src/U8g2lib.h | 345 ++++++++++++++++++ src/U8x8lib.cpp | 53 +++ src/U8x8lib.h | 130 ++++++- src/clib/u8g2.h | 21 ++ src/clib/u8g2_d_memory.c | 18 + src/clib/u8g2_d_setup.c | 140 +++++++ src/clib/u8g2_fonts.c | 290 +++++++++++++++ src/clib/u8x8.h | 7 +- src/clib/u8x8_cad.c | 85 +++++ src/clib/u8x8_d_uc1611.c | 291 +++++++++++++++ 31 files changed, 1440 insertions(+), 15 deletions(-) create mode 100644 src/clib/u8x8_d_uc1611.c diff --git a/examples/full_buffer/FPS/FPS.ino b/examples/full_buffer/FPS/FPS.ino index 4858f5bc..2e6b6d47 100644 --- a/examples/full_buffer/FPS/FPS.ino +++ b/examples/full_buffer/FPS/FPS.ino @@ -208,6 +208,8 @@ //U8G2_RA8835_NHD_240X128_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board // End of constructor list diff --git a/examples/full_buffer/GraphicsTest/GraphicsTest.ino b/examples/full_buffer/GraphicsTest/GraphicsTest.ino index 3936ad15..4098b7ce 100644 --- a/examples/full_buffer/GraphicsTest/GraphicsTest.ino +++ b/examples/full_buffer/GraphicsTest/GraphicsTest.ino @@ -92,6 +92,8 @@ //U8G2_RA8835_NHD_240X128_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board // End of constructor list diff --git a/examples/full_buffer/HelloWorld/HelloWorld.ino b/examples/full_buffer/HelloWorld/HelloWorld.ino index b20792b4..8c5b20d4 100644 --- a/examples/full_buffer/HelloWorld/HelloWorld.ino +++ b/examples/full_buffer/HelloWorld/HelloWorld.ino @@ -91,6 +91,8 @@ //U8G2_RA8835_NHD_240X128_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board // End of constructor list diff --git a/examples/full_buffer/PrintUTF8/PrintUTF8.ino b/examples/full_buffer/PrintUTF8/PrintUTF8.ino index ecc90179..846f144f 100644 --- a/examples/full_buffer/PrintUTF8/PrintUTF8.ino +++ b/examples/full_buffer/PrintUTF8/PrintUTF8.ino @@ -94,6 +94,8 @@ //U8G2_RA8835_NHD_240X128_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board // End of constructor list diff --git a/examples/full_buffer/SelectionList/SelectionList.ino b/examples/full_buffer/SelectionList/SelectionList.ino index 84bb3239..a6f73376 100644 --- a/examples/full_buffer/SelectionList/SelectionList.ino +++ b/examples/full_buffer/SelectionList/SelectionList.ino @@ -91,6 +91,8 @@ //U8G2_RA8835_NHD_240X128_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board // End of constructor list diff --git a/examples/full_buffer/U8g2Logo/U8g2Logo.ino b/examples/full_buffer/U8g2Logo/U8g2Logo.ino index 7a03ea79..aa18b4a1 100644 --- a/examples/full_buffer/U8g2Logo/U8g2Logo.ino +++ b/examples/full_buffer/U8g2Logo/U8g2Logo.ino @@ -92,6 +92,8 @@ //U8G2_RA8835_NHD_240X128_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board // End of constructor list diff --git a/examples/page_buffer/ExtUTF8/ExtUTF8.ino b/examples/page_buffer/ExtUTF8/ExtUTF8.ino index 63776219..59d9d47b 100644 --- a/examples/page_buffer/ExtUTF8/ExtUTF8.ino +++ b/examples/page_buffer/ExtUTF8/ExtUTF8.ino @@ -94,6 +94,8 @@ //U8G2_RA8835_NHD_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board diff --git a/examples/page_buffer/FPS/FPS.ino b/examples/page_buffer/FPS/FPS.ino index f0b61494..66787a54 100644 --- a/examples/page_buffer/FPS/FPS.ino +++ b/examples/page_buffer/FPS/FPS.ino @@ -219,6 +219,8 @@ //U8G2_RA8835_NHD_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board diff --git a/examples/page_buffer/FlipMode/FlipMode.ino b/examples/page_buffer/FlipMode/FlipMode.ino index 09cc8101..4cb71d03 100644 --- a/examples/page_buffer/FlipMode/FlipMode.ino +++ b/examples/page_buffer/FlipMode/FlipMode.ino @@ -89,6 +89,8 @@ //U8G2_RA8835_NHD_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board diff --git a/examples/page_buffer/GraphicsTest/GraphicsTest.ino b/examples/page_buffer/GraphicsTest/GraphicsTest.ino index e418646e..bccf1e24 100644 --- a/examples/page_buffer/GraphicsTest/GraphicsTest.ino +++ b/examples/page_buffer/GraphicsTest/GraphicsTest.ino @@ -94,6 +94,8 @@ //U8G2_RA8835_NHD_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board diff --git a/examples/page_buffer/HelloWorld/HelloWorld.ino b/examples/page_buffer/HelloWorld/HelloWorld.ino index 351d744c..0da9af3f 100644 --- a/examples/page_buffer/HelloWorld/HelloWorld.ino +++ b/examples/page_buffer/HelloWorld/HelloWorld.ino @@ -59,7 +59,7 @@ // Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected //U8G2_SSD1306_128X64_NONAME_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy (Production, Kickstarter Edition) -U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); +//U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display @@ -94,6 +94,8 @@ U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* //U8G2_RA8835_NHD_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board diff --git a/examples/page_buffer/PrintHelloWorld/PrintHelloWorld.ino b/examples/page_buffer/PrintHelloWorld/PrintHelloWorld.ino index 4139970e..fa8f9110 100644 --- a/examples/page_buffer/PrintHelloWorld/PrintHelloWorld.ino +++ b/examples/page_buffer/PrintHelloWorld/PrintHelloWorld.ino @@ -95,6 +95,8 @@ //U8G2_RA8835_NHD_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board diff --git a/examples/page_buffer/PrintUTF8/PrintUTF8.ino b/examples/page_buffer/PrintUTF8/PrintUTF8.ino index 36111fd4..64557fba 100644 --- a/examples/page_buffer/PrintUTF8/PrintUTF8.ino +++ b/examples/page_buffer/PrintUTF8/PrintUTF8.ino @@ -95,6 +95,8 @@ //U8G2_RA8835_NHD_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board diff --git a/examples/page_buffer/SelectionList/SelectionList.ino b/examples/page_buffer/SelectionList/SelectionList.ino index 19e5d133..a1be38b4 100644 --- a/examples/page_buffer/SelectionList/SelectionList.ino +++ b/examples/page_buffer/SelectionList/SelectionList.ino @@ -84,6 +84,8 @@ //U8G2_RA8835_NHD_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board diff --git a/examples/page_buffer/U8g2Logo/U8g2Logo.ino b/examples/page_buffer/U8g2Logo/U8g2Logo.ino index 1f30110c..d241b9db 100644 --- a/examples/page_buffer/U8g2Logo/U8g2Logo.ino +++ b/examples/page_buffer/U8g2Logo/U8g2Logo.ino @@ -93,6 +93,8 @@ //U8G2_RA8835_NHD_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1610_EA_DOGXL160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); +//U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board diff --git a/examples/u8x8/FlipMode/FlipMode.ino b/examples/u8x8/FlipMode/FlipMode.ino index fe56618d..17319b9e 100644 --- a/examples/u8x8/FlipMode/FlipMode.ino +++ b/examples/u8x8/FlipMode/FlipMode.ino @@ -1,8 +1,9 @@ /* - HelloWorld.ino + FlipMode.ino - "Hello World" version for U8x8 API + Test flip functionality (180 degree roation) + Note: Not supported with all displays Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) @@ -70,7 +71,8 @@ //U8X8_ST7565_NHD_C12832_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1610_EA_DOGXL160_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1610_EA_DOGXL160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); - +//U8X8_UC1611_EA_DOGM240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8X8_UC1611_EA_DOGXL240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board // End of constructor list diff --git a/examples/u8x8/GraphicsTest/GraphicsTest.ino b/examples/u8x8/GraphicsTest/GraphicsTest.ino index 66bd153f..c8d209e2 100644 --- a/examples/u8x8/GraphicsTest/GraphicsTest.ino +++ b/examples/u8x8/GraphicsTest/GraphicsTest.ino @@ -73,7 +73,8 @@ //U8X8_ST7565_NHD_C12832_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1610_EA_DOGXL160_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1610_EA_DOGXL160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); - +//U8X8_UC1611_EA_DOGM240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8X8_UC1611_EA_DOGXL240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board // End of constructor list @@ -180,6 +181,13 @@ void loop(void) u8x8.draw2x2String(0, 5, "Big"); delay(3000); + pre(); + u8x8.print("print \\n\n"); + delay(500); + u8x8.println("println"); + delay(500); + u8x8.println("done"); + delay(1500); } diff --git a/examples/u8x8/HelloWorld/HelloWorld.ino b/examples/u8x8/HelloWorld/HelloWorld.ino index d6e5dbdd..a689ecd2 100644 --- a/examples/u8x8/HelloWorld/HelloWorld.ino +++ b/examples/u8x8/HelloWorld/HelloWorld.ino @@ -70,15 +70,17 @@ //U8X8_ST7565_NHD_C12832_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1610_EA_DOGXL160_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1610_EA_DOGXL160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); - - +//U8X8_UC1611_EA_DOGM240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8X8_UC1611_EA_DOGXL240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board +//U8X8_UC1611_EA_DOGXL240_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); +U8X8_UC1611_EA_DOGXL240_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // End of constructor list void setup(void) { - pinMode(16, OUTPUT); - digitalWrite(16, 0); + //pinMode(16, OUTPUT); + //digitalWrite(16, 0); u8x8.begin(); u8x8.setPowerSave(0); } diff --git a/examples/u8x8/MessageBox/MessageBox.ino b/examples/u8x8/MessageBox/MessageBox.ino index 70ab7360..5db8a94d 100644 --- a/examples/u8x8/MessageBox/MessageBox.ino +++ b/examples/u8x8/MessageBox/MessageBox.ino @@ -70,7 +70,8 @@ //U8X8_ST7565_NHD_C12832_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1610_EA_DOGXL160_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1610_EA_DOGXL160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); - +//U8X8_UC1611_EA_DOGM240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board +//U8X8_UC1611_EA_DOGXL240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board // End of constructor list diff --git a/extras/ChangeLog b/extras/ChangeLog index 93033e74..07d196c5 100644 --- a/extras/ChangeLog +++ b/extras/ChangeLog @@ -45,6 +45,12 @@ https://github.com/olikraus/u8g2 ChangeLog * Added DrawXBMP (AVR: Assume bitmap in PROGMEM) * Added japanese fonts (issue 65) 2016-xx-xx v2.6.x olikraus@gmail.com - * Added support for UC1610 (DOGXL160) - * Use Wire.setClock() for improved HW I2C performance (issue 79) + * Added support for UC1610 (EA DOGXL160) + * Use Wire.setClock() for improved HW I2C performance (issue 79). This + requires Arduino IDE 1.6.0 or higher. + * Added Thai Fonts (issue 73) + * Added support for "\n" in the print function for u8x8 (issue 74) + * Screen mirror option for U8g2 (issue 76) + * Added support for second wire interface (Constructor postfix 2ND_HW_I2C) + * Added support for UC1611 (EA DOGM240 and EA DOGXL240) diff --git a/library.properties b/library.properties index 0c775e4c..4bb97418 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=U8g2 -version=2.6.1 +version=2.6.2 author=oliver maintainer=oliver sentence=Library for monochrome LCDs and OLEDs. Successor of U8glib. Features: UTF8, >700 fonts, all Arduino Boards supported diff --git a/src/U8g2lib.h b/src/U8g2lib.h index a4b2c47e..8f9f864a 100644 --- a/src/U8g2lib.h +++ b/src/U8g2lib.h @@ -62,6 +62,9 @@ class U8G2 : public Print U8G2(void) { cpp_next_cb = u8x8_ascii_next; home(); } u8x8_t *getU8x8(void) { return u8g2_GetU8x8(&u8g2); } u8g2_t *getU8g2(void) { return &u8g2; } + + void setI2CAddress(uint8_t adr) { u8g2_SetI2CAddress(&u8g2, adr); } + void enableUTF8Print(void) { cpp_next_cb = u8x8_utf8_next; } void disableUTF8Print(void) { cpp_next_cb = u8x8_ascii_next; } @@ -395,6 +398,12 @@ class U8G2_SSD1306_128X64_NONAME_1_HW_I2C : public U8G2 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8G2_SSD1306_128X64_NONAME_1_2ND_HW_I2C : public U8G2 { + public: U8G2_SSD1306_128X64_NONAME_1_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_ssd1306_i2c_128x64_noname_1(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8G2_SSD1306_128X64_NONAME_2_SW_I2C : public U8G2 { public: U8G2_SSD1306_128X64_NONAME_2_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_ssd1306_i2c_128x64_noname_2(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); @@ -407,6 +416,12 @@ class U8G2_SSD1306_128X64_NONAME_2_HW_I2C : public U8G2 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8G2_SSD1306_128X64_NONAME_2_2ND_HW_I2C : public U8G2 { + public: U8G2_SSD1306_128X64_NONAME_2_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_ssd1306_i2c_128x64_noname_2(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8G2_SSD1306_128X64_NONAME_F_SW_I2C : public U8G2 { public: U8G2_SSD1306_128X64_NONAME_F_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_ssd1306_i2c_128x64_noname_f(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); @@ -419,6 +434,12 @@ class U8G2_SSD1306_128X64_NONAME_F_HW_I2C : public U8G2 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8G2_SSD1306_128X64_NONAME_F_2ND_HW_I2C : public U8G2 { + public: U8G2_SSD1306_128X64_NONAME_F_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_ssd1306_i2c_128x64_noname_f(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8G2_SH1106_128X64_NONAME_1_4W_SW_SPI : public U8G2 { public: U8G2_SH1106_128X64_NONAME_1_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_sh1106_128x64_noname_1(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); @@ -521,6 +542,12 @@ class U8G2_SH1106_128X64_NONAME_1_HW_I2C : public U8G2 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8G2_SH1106_128X64_NONAME_1_2ND_HW_I2C : public U8G2 { + public: U8G2_SH1106_128X64_NONAME_1_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_sh1106_i2c_128x64_noname_1(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8G2_SH1106_128X64_NONAME_2_SW_I2C : public U8G2 { public: U8G2_SH1106_128X64_NONAME_2_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_sh1106_i2c_128x64_noname_2(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); @@ -533,6 +560,12 @@ class U8G2_SH1106_128X64_NONAME_2_HW_I2C : public U8G2 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8G2_SH1106_128X64_NONAME_2_2ND_HW_I2C : public U8G2 { + public: U8G2_SH1106_128X64_NONAME_2_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_sh1106_i2c_128x64_noname_2(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8G2_SH1106_128X64_NONAME_F_SW_I2C : public U8G2 { public: U8G2_SH1106_128X64_NONAME_F_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_sh1106_i2c_128x64_noname_f(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); @@ -545,6 +578,12 @@ class U8G2_SH1106_128X64_NONAME_F_HW_I2C : public U8G2 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8G2_SH1106_128X64_NONAME_F_2ND_HW_I2C : public U8G2 { + public: U8G2_SH1106_128X64_NONAME_F_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_sh1106_i2c_128x64_noname_f(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8G2_SSD1306_128X32_UNIVISION_1_4W_SW_SPI : public U8G2 { public: U8G2_SSD1306_128X32_UNIVISION_1_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_ssd1306_128x32_univision_1(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); @@ -647,6 +686,12 @@ class U8G2_SSD1306_128X32_UNIVISION_1_HW_I2C : public U8G2 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8G2_SSD1306_128X32_UNIVISION_1_2ND_HW_I2C : public U8G2 { + public: U8G2_SSD1306_128X32_UNIVISION_1_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_ssd1306_i2c_128x32_univision_1(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8G2_SSD1306_128X32_UNIVISION_2_SW_I2C : public U8G2 { public: U8G2_SSD1306_128X32_UNIVISION_2_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_ssd1306_i2c_128x32_univision_2(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); @@ -659,6 +704,12 @@ class U8G2_SSD1306_128X32_UNIVISION_2_HW_I2C : public U8G2 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8G2_SSD1306_128X32_UNIVISION_2_2ND_HW_I2C : public U8G2 { + public: U8G2_SSD1306_128X32_UNIVISION_2_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_ssd1306_i2c_128x32_univision_2(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8G2_SSD1306_128X32_UNIVISION_F_SW_I2C : public U8G2 { public: U8G2_SSD1306_128X32_UNIVISION_F_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_ssd1306_i2c_128x32_univision_f(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); @@ -671,6 +722,12 @@ class U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C : public U8G2 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8G2_SSD1306_128X32_UNIVISION_F_2ND_HW_I2C : public U8G2 { + public: U8G2_SSD1306_128X32_UNIVISION_F_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_ssd1306_i2c_128x32_univision_f(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8G2_SSD1325_NHD_128X64_1_4W_SW_SPI : public U8G2 { public: U8G2_SSD1325_NHD_128X64_1_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_ssd1325_nhd_128x64_1(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); @@ -809,6 +866,12 @@ class U8G2_LD7032_60X32_1_HW_I2C : public U8G2 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8G2_LD7032_60X32_1_2ND_HW_I2C : public U8G2 { + public: U8G2_LD7032_60X32_1_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_ld7032_i2c_60x32_1(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8G2_LD7032_60X32_2_SW_I2C : public U8G2 { public: U8G2_LD7032_60X32_2_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_ld7032_i2c_60x32_2(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); @@ -821,6 +884,12 @@ class U8G2_LD7032_60X32_2_HW_I2C : public U8G2 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8G2_LD7032_60X32_2_2ND_HW_I2C : public U8G2 { + public: U8G2_LD7032_60X32_2_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_ld7032_i2c_60x32_2(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8G2_LD7032_60X32_F_SW_I2C : public U8G2 { public: U8G2_LD7032_60X32_F_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_ld7032_i2c_60x32_f(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); @@ -833,6 +902,12 @@ class U8G2_LD7032_60X32_F_HW_I2C : public U8G2 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8G2_LD7032_60X32_F_2ND_HW_I2C : public U8G2 { + public: U8G2_LD7032_60X32_F_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_ld7032_i2c_60x32_f(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8G2_ST7920_192X32_1_8080 : public U8G2 { public: U8G2_ST7920_192X32_1_8080(const u8g2_cb_t *rotation, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t enable, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_st7920_p_192x32_1(&u8g2, rotation, u8x8_byte_8bit_8080mode, u8x8_gpio_and_delay_arduino); @@ -1247,6 +1322,276 @@ class U8G2_UC1610_EA_DOGXL160_F_3W_SW_SPI : public U8G2 { u8x8_SetPin_3Wire_SW_SPI(getU8x8(), clock, data, cs, reset); } }; +class U8G2_UC1610_EA_DOGXL160_1_SW_I2C : public U8G2 { + public: U8G2_UC1610_EA_DOGXL160_1_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1610_i2c_ea_dogxl160_1(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_SW_I2C(getU8x8(), clock, data, reset); + } +}; +class U8G2_UC1610_EA_DOGXL160_1_HW_I2C : public U8G2 { + public: U8G2_UC1610_EA_DOGXL160_1_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1610_i2c_ea_dogxl160_1(&u8g2, rotation, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1610_EA_DOGXL160_1_2ND_HW_I2C : public U8G2 { + public: U8G2_UC1610_EA_DOGXL160_1_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1610_i2c_ea_dogxl160_1(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1610_EA_DOGXL160_2_SW_I2C : public U8G2 { + public: U8G2_UC1610_EA_DOGXL160_2_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1610_i2c_ea_dogxl160_2(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_SW_I2C(getU8x8(), clock, data, reset); + } +}; +class U8G2_UC1610_EA_DOGXL160_2_HW_I2C : public U8G2 { + public: U8G2_UC1610_EA_DOGXL160_2_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1610_i2c_ea_dogxl160_2(&u8g2, rotation, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1610_EA_DOGXL160_2_2ND_HW_I2C : public U8G2 { + public: U8G2_UC1610_EA_DOGXL160_2_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1610_i2c_ea_dogxl160_2(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1610_EA_DOGXL160_F_SW_I2C : public U8G2 { + public: U8G2_UC1610_EA_DOGXL160_F_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1610_i2c_ea_dogxl160_f(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_SW_I2C(getU8x8(), clock, data, reset); + } +}; +class U8G2_UC1610_EA_DOGXL160_F_HW_I2C : public U8G2 { + public: U8G2_UC1610_EA_DOGXL160_F_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1610_i2c_ea_dogxl160_f(&u8g2, rotation, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1610_EA_DOGXL160_F_2ND_HW_I2C : public U8G2 { + public: U8G2_UC1610_EA_DOGXL160_F_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1610_i2c_ea_dogxl160_f(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1611_EA_DOGM240_1_4W_SW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_1_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogm240_1(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset); + } +}; +class U8G2_UC1611_EA_DOGM240_1_4W_HW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_1_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogm240_1(&u8g2, rotation, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset); + } +}; +class U8G2_UC1611_EA_DOGM240_1_3W_SW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_1_3W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogm240_1(&u8g2, rotation, u8x8_byte_3wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_3Wire_SW_SPI(getU8x8(), clock, data, cs, reset); + } +}; +class U8G2_UC1611_EA_DOGM240_2_4W_SW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_2_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogm240_2(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset); + } +}; +class U8G2_UC1611_EA_DOGM240_2_4W_HW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_2_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogm240_2(&u8g2, rotation, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset); + } +}; +class U8G2_UC1611_EA_DOGM240_2_3W_SW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_2_3W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogm240_2(&u8g2, rotation, u8x8_byte_3wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_3Wire_SW_SPI(getU8x8(), clock, data, cs, reset); + } +}; +class U8G2_UC1611_EA_DOGM240_F_4W_SW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_F_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogm240_f(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset); + } +}; +class U8G2_UC1611_EA_DOGM240_F_4W_HW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_F_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogm240_f(&u8g2, rotation, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset); + } +}; +class U8G2_UC1611_EA_DOGM240_F_3W_SW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_F_3W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogm240_f(&u8g2, rotation, u8x8_byte_3wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_3Wire_SW_SPI(getU8x8(), clock, data, cs, reset); + } +}; +class U8G2_UC1611_EA_DOGM240_1_SW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_1_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogm240_1(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_SW_I2C(getU8x8(), clock, data, reset); + } +}; +class U8G2_UC1611_EA_DOGM240_1_HW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_1_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogm240_1(&u8g2, rotation, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogm240_1(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1611_EA_DOGM240_2_SW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_2_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogm240_2(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_SW_I2C(getU8x8(), clock, data, reset); + } +}; +class U8G2_UC1611_EA_DOGM240_2_HW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_2_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogm240_2(&u8g2, rotation, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1611_EA_DOGM240_2_2ND_HW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_2_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogm240_2(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1611_EA_DOGM240_F_SW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_F_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogm240_f(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_SW_I2C(getU8x8(), clock, data, reset); + } +}; +class U8G2_UC1611_EA_DOGM240_F_HW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_F_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogm240_f(&u8g2, rotation, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1611_EA_DOGM240_F_2ND_HW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGM240_F_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogm240_f(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_1_4W_SW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_1_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogxl240_1(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_1_4W_HW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_1_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogxl240_1(&u8g2, rotation, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_1_3W_SW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_1_3W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogxl240_1(&u8g2, rotation, u8x8_byte_3wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_3Wire_SW_SPI(getU8x8(), clock, data, cs, reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_2_4W_SW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_2_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogxl240_2(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_2_4W_HW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_2_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogxl240_2(&u8g2, rotation, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_2_3W_SW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_2_3W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogxl240_2(&u8g2, rotation, u8x8_byte_3wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_3Wire_SW_SPI(getU8x8(), clock, data, cs, reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_F_4W_SW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_F_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogxl240_f(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_F_4W_HW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_F_4W_HW_SPI(const u8g2_cb_t *rotation, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogxl240_f(&u8g2, rotation, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_F_3W_SW_SPI : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_F_3W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_ea_dogxl240_f(&u8g2, rotation, u8x8_byte_3wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_3Wire_SW_SPI(getU8x8(), clock, data, cs, reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_1_SW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_1_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogxl240_1(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_SW_I2C(getU8x8(), clock, data, reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_1_HW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_1_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogxl240_1(&u8g2, rotation, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogxl240_1(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_2_SW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_2_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogxl240_2(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_SW_I2C(getU8x8(), clock, data, reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_2_HW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_2_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogxl240_2(&u8g2, rotation, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_2_2ND_HW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_2_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogxl240_2(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_F_SW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_F_SW_I2C(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogxl240_f(&u8g2, rotation, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_SW_I2C(getU8x8(), clock, data, reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_F_HW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_F_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogxl240_f(&u8g2, rotation, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8G2_UC1611_EA_DOGXL240_F_2ND_HW_I2C : public U8G2 { + public: U8G2_UC1611_EA_DOGXL240_F_2ND_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { + u8g2_Setup_uc1611_i2c_ea_dogxl240_f(&u8g2, rotation, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8G2_ST7565_EA_DOGM128_1_4W_SW_SPI : public U8G2 { public: U8G2_ST7565_EA_DOGM128_1_4W_SW_SPI(const u8g2_cb_t *rotation, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_st7565_ea_dogm128_1(&u8g2, rotation, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); diff --git a/src/U8x8lib.cpp b/src/U8x8lib.cpp index 973d93ce..e8f3e836 100644 --- a/src/U8x8lib.cpp +++ b/src/U8x8lib.cpp @@ -45,6 +45,25 @@ #include #endif +/*=============================================*/ + +size_t U8X8::write(uint8_t v) +{ + if ( v == '\n' ) + { + ty++; + tx=0; + } + else + { + u8x8_DrawGlyph(&u8x8, tx, ty, v); + tx++; + } + return 1; +} + + + /*=============================================*/ /* callbacks */ @@ -397,6 +416,40 @@ extern "C" uint8_t u8x8_byte_arduino_hw_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t a return 1; } +extern "C" uint8_t u8x8_byte_arduino_2nd_hw_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr) +{ +#ifdef U8X8_HAVE_2ND_HW_I2C + switch(msg) + { + case U8X8_MSG_BYTE_SEND: + Wire1.write((uint8_t *)arg_ptr, (int)arg_int); + break; + case U8X8_MSG_BYTE_INIT: + Wire1.begin(); + break; + case U8X8_MSG_BYTE_SET_DC: + break; + case U8X8_MSG_BYTE_START_TRANSFER: +#if ARDUINO >= 10600 + /* not sure when the setClock function was introduced, but it is there since 1.6.0 */ + /* if there is any error with Wire.setClock() just remove this function call */ + if ( u8x8->display_info->i2c_bus_clock_100kHz >= 4 ) + { + Wire1.setClock(400000L); + } +#endif + Wire1.beginTransmission(u8x8_GetI2CAddress(u8x8)>>1); + break; + case U8X8_MSG_BYTE_END_TRANSFER: + Wire1.endTransmission(); + break; + default: + return 0; + } +#endif + return 1; +} + /* use U8X8_PIN_NONE as value for "reset", if there is no reset line diff --git a/src/U8x8lib.h b/src/U8x8lib.h index 66426605..3a908aa5 100644 --- a/src/U8x8lib.h +++ b/src/U8x8lib.h @@ -48,7 +48,6 @@ /* Assumption: All Arduino Boards have "SPI.h" */ #define U8X8_HAVE_HW_SPI - /* Assumption: All Arduino Boards have "Wire.h" */ #define U8X8_HAVE_HW_I2C @@ -68,12 +67,22 @@ #endif #endif +/* define U8X8_HAVE_2ND_HW_I2C if the board has a second wire interface*/ + + +#ifdef WIRE_INTERFACES_COUNT +#if WIRE_INTERFACES_COUNT > 1 +#define U8X8_HAVE_2ND_HW_I2C +#endif +#endif + extern "C" uint8_t u8x8_gpio_and_delay_arduino(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); extern "C" uint8_t u8x8_byte_arduino_4wire_sw_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); extern "C" uint8_t u8x8_byte_arduino_hw_spi(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ptr); extern "C" uint8_t u8x8_byte_arduino_hw_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); +extern "C" uint8_t u8x8_byte_arduino_2nd_hw_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); void u8x8_SetPin_4Wire_SW_SPI(u8x8_t *u8x8, uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset); void u8x8_SetPin_3Wire_SW_SPI(u8x8_t *u8x8, uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset); @@ -100,6 +109,8 @@ class U8X8 : public Print U8X8(void) { home(); } u8x8_t *getU8x8(void) { return &u8x8; } + + void setI2CAddress(uint8_t adr) { u8x8_SetI2CAddress(&u8x8, adr); } uint8_t getCols(void) { return u8x8_GetCols(&u8x8); } uint8_t getRows(void) { return u8x8_GetRows(&u8x8); } @@ -180,11 +191,14 @@ class U8X8 : public Print uint8_t getUTF8Len(const char *s) { return u8x8_GetUTF8Len(&u8x8, s); } + size_t write(uint8_t v); + /* size_t write(uint8_t v) { u8x8_DrawGlyph(&u8x8, tx, ty, v); tx++; return 1; } + */ size_t write(const uint8_t *buffer, size_t size) { size_t cnt = 0; @@ -264,6 +278,12 @@ class U8X8_SSD1306_128X64_NONAME_HW_I2C : public U8X8 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8X8_SSD1306_128X64_NONAME_2ND_HW_I2C : public U8X8 { + public: U8X8_SSD1306_128X64_NONAME_2ND_HW_I2C(uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_ssd1306_128x64_noname, u8x8_cad_ssd13xx_i2c, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8X8_SH1106_128X64_NONAME_4W_SW_SPI : public U8X8 { public: U8X8_SH1106_128X64_NONAME_4W_SW_SPI(uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() { u8x8_Setup(getU8x8(), u8x8_d_sh1106_128x64_noname, u8x8_cad_001, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); @@ -306,6 +326,12 @@ class U8X8_SH1106_128X64_NONAME_HW_I2C : public U8X8 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8X8_SH1106_128X64_NONAME_2ND_HW_I2C : public U8X8 { + public: U8X8_SH1106_128X64_NONAME_2ND_HW_I2C(uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_sh1106_128x64_noname, u8x8_cad_ssd13xx_i2c, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8X8_SSD1306_128X32_UNIVISION_4W_SW_SPI : public U8X8 { public: U8X8_SSD1306_128X32_UNIVISION_4W_SW_SPI(uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() { u8x8_Setup(getU8x8(), u8x8_d_ssd1306_128x32_univision, u8x8_cad_001, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); @@ -348,6 +374,12 @@ class U8X8_SSD1306_128X32_UNIVISION_HW_I2C : public U8X8 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8X8_SSD1306_128X32_UNIVISION_2ND_HW_I2C : public U8X8 { + public: U8X8_SSD1306_128X32_UNIVISION_2ND_HW_I2C(uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_ssd1306_128x32_univision, u8x8_cad_ssd13xx_i2c, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8X8_SSD1325_NHD_128X64_4W_SW_SPI : public U8X8 { public: U8X8_SSD1325_NHD_128X64_4W_SW_SPI(uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() { u8x8_Setup(getU8x8(), u8x8_d_ssd1325_nhd_128x64, u8x8_cad_001, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); @@ -402,6 +434,12 @@ class U8X8_LD7032_60X32_HW_I2C : public U8X8 { u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; +class U8X8_LD7032_60X32_2ND_HW_I2C : public U8X8 { + public: U8X8_LD7032_60X32_2ND_HW_I2C(uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_ld7032_60x32, u8x8_cad_ld7032_i2c, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8X8_ST7920_192X32_8080 : public U8X8 { public: U8X8_ST7920_192X32_8080(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3, uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7, uint8_t enable, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() { u8x8_Setup(getU8x8(), u8x8_d_st7920_192x32, u8x8_cad_001, u8x8_byte_8bit_8080mode, u8x8_gpio_and_delay_arduino); @@ -540,6 +578,96 @@ class U8X8_UC1610_EA_DOGXL160_3W_SW_SPI : public U8X8 { u8x8_SetPin_3Wire_SW_SPI(getU8x8(), clock, data, cs, reset); } }; +class U8X8_UC1610_EA_DOGXL160_SW_I2C : public U8X8 { + public: U8X8_UC1610_EA_DOGXL160_SW_I2C(uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1610_ea_dogxl160, u8x8_cad_uc16xx_i2c, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_SW_I2C(getU8x8(), clock, data, reset); + } +}; +class U8X8_UC1610_EA_DOGXL160_HW_I2C : public U8X8 { + public: U8X8_UC1610_EA_DOGXL160_HW_I2C(uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1610_ea_dogxl160, u8x8_cad_uc16xx_i2c, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8X8_UC1610_EA_DOGXL160_2ND_HW_I2C : public U8X8 { + public: U8X8_UC1610_EA_DOGXL160_2ND_HW_I2C(uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1610_ea_dogxl160, u8x8_cad_uc16xx_i2c, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8X8_UC1611_EA_DOGM240_4W_SW_SPI : public U8X8 { + public: U8X8_UC1611_EA_DOGM240_4W_SW_SPI(uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1611_ea_dogm240, u8x8_cad_001, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset); + } +}; +class U8X8_UC1611_EA_DOGM240_4W_HW_SPI : public U8X8 { + public: U8X8_UC1611_EA_DOGM240_4W_HW_SPI(uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1611_ea_dogm240, u8x8_cad_001, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset); + } +}; +class U8X8_UC1611_EA_DOGM240_3W_SW_SPI : public U8X8 { + public: U8X8_UC1611_EA_DOGM240_3W_SW_SPI(uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1611_ea_dogm240, u8x8_cad_001, u8x8_byte_3wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_3Wire_SW_SPI(getU8x8(), clock, data, cs, reset); + } +}; +class U8X8_UC1611_EA_DOGM240_SW_I2C : public U8X8 { + public: U8X8_UC1611_EA_DOGM240_SW_I2C(uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1611_ea_dogm240, u8x8_cad_uc16xx_i2c, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_SW_I2C(getU8x8(), clock, data, reset); + } +}; +class U8X8_UC1611_EA_DOGM240_HW_I2C : public U8X8 { + public: U8X8_UC1611_EA_DOGM240_HW_I2C(uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1611_ea_dogm240, u8x8_cad_uc16xx_i2c, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8X8_UC1611_EA_DOGM240_2ND_HW_I2C : public U8X8 { + public: U8X8_UC1611_EA_DOGM240_2ND_HW_I2C(uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1611_ea_dogm240, u8x8_cad_uc16xx_i2c, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8X8_UC1611_EA_DOGXL240_4W_SW_SPI : public U8X8 { + public: U8X8_UC1611_EA_DOGXL240_4W_SW_SPI(uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1611_ea_dogxl240, u8x8_cad_001, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset); + } +}; +class U8X8_UC1611_EA_DOGXL240_4W_HW_SPI : public U8X8 { + public: U8X8_UC1611_EA_DOGXL240_4W_HW_SPI(uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1611_ea_dogxl240, u8x8_cad_001, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset); + } +}; +class U8X8_UC1611_EA_DOGXL240_3W_SW_SPI : public U8X8 { + public: U8X8_UC1611_EA_DOGXL240_3W_SW_SPI(uint8_t clock, uint8_t data, uint8_t cs, uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1611_ea_dogxl240, u8x8_cad_001, u8x8_byte_3wire_sw_spi, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_3Wire_SW_SPI(getU8x8(), clock, data, cs, reset); + } +}; +class U8X8_UC1611_EA_DOGXL240_SW_I2C : public U8X8 { + public: U8X8_UC1611_EA_DOGXL240_SW_I2C(uint8_t clock, uint8_t data, uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1611_ea_dogxl240, u8x8_cad_uc16xx_i2c, u8x8_byte_sw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_SW_I2C(getU8x8(), clock, data, reset); + } +}; +class U8X8_UC1611_EA_DOGXL240_HW_I2C : public U8X8 { + public: U8X8_UC1611_EA_DOGXL240_HW_I2C(uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1611_ea_dogxl240, u8x8_cad_uc16xx_i2c, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; +class U8X8_UC1611_EA_DOGXL240_2ND_HW_I2C : public U8X8 { + public: U8X8_UC1611_EA_DOGXL240_2ND_HW_I2C(uint8_t reset = U8X8_PIN_NONE) : U8X8() { + u8x8_Setup(getU8x8(), u8x8_d_uc1611_ea_dogxl240, u8x8_cad_uc16xx_i2c, u8x8_byte_arduino_2nd_hw_i2c, u8x8_gpio_and_delay_arduino); + u8x8_SetPin_HW_I2C(getU8x8(), reset); + } +}; class U8X8_ST7565_EA_DOGM128_4W_SW_SPI : public U8X8 { public: U8X8_ST7565_EA_DOGM128_4W_SW_SPI(uint8_t clock, uint8_t data, uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() { u8x8_Setup(getU8x8(), u8x8_d_st7565_ea_dogm128, u8x8_cad_001, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino); diff --git a/src/clib/u8g2.h b/src/clib/u8g2.h index 92cae6a2..032e9dc0 100644 --- a/src/clib/u8g2.h +++ b/src/clib/u8g2.h @@ -422,6 +422,9 @@ uint8_t *u8g2_m_uc1701_16_f(uint8_t *page_cnt); uint8_t *u8g2_m_uc1610_20_1(uint8_t *page_cnt); uint8_t *u8g2_m_uc1610_20_2(uint8_t *page_cnt); uint8_t *u8g2_m_uc1610_20_f(uint8_t *page_cnt); +uint8_t *u8g2_m_uc1611_30_1(uint8_t *page_cnt); +uint8_t *u8g2_m_uc1611_30_2(uint8_t *page_cnt); +uint8_t *u8g2_m_uc1611_30_f(uint8_t *page_cnt); uint8_t *u8g2_m_st7565_16_1(uint8_t *page_cnt); uint8_t *u8g2_m_st7565_16_2(uint8_t *page_cnt); uint8_t *u8g2_m_st7565_16_f(uint8_t *page_cnt); @@ -508,6 +511,21 @@ void u8g2_Setup_uc1701_mini12864_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8 void u8g2_Setup_uc1610_ea_dogxl160_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); void u8g2_Setup_uc1610_ea_dogxl160_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); void u8g2_Setup_uc1610_ea_dogxl160_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1610_i2c_ea_dogxl160_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1610_i2c_ea_dogxl160_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1610_i2c_ea_dogxl160_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1611_ea_dogm240_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1611_ea_dogm240_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1611_ea_dogm240_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1611_i2c_ea_dogm240_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1611_i2c_ea_dogm240_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1611_i2c_ea_dogm240_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1611_ea_dogxl240_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1611_ea_dogxl240_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1611_ea_dogxl240_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1611_i2c_ea_dogxl240_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1611_i2c_ea_dogxl240_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); +void u8g2_Setup_uc1611_i2c_ea_dogxl240_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); void u8g2_Setup_st7565_ea_dogm128_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); void u8g2_Setup_st7565_ea_dogm128_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); void u8g2_Setup_st7565_ea_dogm128_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb); @@ -917,6 +935,9 @@ extern const uint8_t u8g2_font_amstrad_cpc_extended_8f[] U8G2_FONT_SECTION("u8g2 extern const uint8_t u8g2_font_amstrad_cpc_extended_8r[] U8G2_FONT_SECTION("u8g2_font_amstrad_cpc_extended_8r"); extern const uint8_t u8g2_font_amstrad_cpc_extended_8n[] U8G2_FONT_SECTION("u8g2_font_amstrad_cpc_extended_8n"); extern const uint8_t u8g2_font_amstrad_cpc_extended_8u[] U8G2_FONT_SECTION("u8g2_font_amstrad_cpc_extended_8u"); +extern const uint8_t u8g2_font_etl14thai_t[] U8G2_FONT_SECTION("u8g2_font_etl14thai_t"); +extern const uint8_t u8g2_font_etl16thai_t[] U8G2_FONT_SECTION("u8g2_font_etl16thai_t"); +extern const uint8_t u8g2_font_etl24thai_t[] U8G2_FONT_SECTION("u8g2_font_etl24thai_t"); extern const uint8_t u8g2_font_crox1cb_tf[] U8G2_FONT_SECTION("u8g2_font_crox1cb_tf"); extern const uint8_t u8g2_font_crox1cb_tr[] U8G2_FONT_SECTION("u8g2_font_crox1cb_tr"); extern const uint8_t u8g2_font_crox1cb_tn[] U8G2_FONT_SECTION("u8g2_font_crox1cb_tn"); diff --git a/src/clib/u8g2_d_memory.c b/src/clib/u8g2_d_memory.c index 08fdfc64..a060a3c5 100644 --- a/src/clib/u8g2_d_memory.c +++ b/src/clib/u8g2_d_memory.c @@ -183,6 +183,24 @@ uint8_t *u8g2_m_uc1610_20_f(uint8_t *page_cnt) *page_cnt = 13; return buf; } +uint8_t *u8g2_m_uc1611_30_1(uint8_t *page_cnt) +{ + static uint8_t buf[240]; + *page_cnt = 1; + return buf; +} +uint8_t *u8g2_m_uc1611_30_2(uint8_t *page_cnt) +{ + static uint8_t buf[480]; + *page_cnt = 2; + return buf; +} +uint8_t *u8g2_m_uc1611_30_f(uint8_t *page_cnt) +{ + static uint8_t buf[1920]; + *page_cnt = 8; + return buf; +} uint8_t *u8g2_m_st7565_16_1(uint8_t *page_cnt) { static uint8_t buf[128]; diff --git a/src/clib/u8g2_d_setup.c b/src/clib/u8g2_d_setup.c index 4e50f2e7..dde23c4b 100644 --- a/src/clib/u8g2_d_setup.c +++ b/src/clib/u8g2_d_setup.c @@ -535,6 +535,146 @@ void u8g2_Setup_uc1610_ea_dogxl160_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8 buf = u8g2_m_uc1610_20_f(&tile_buf_height); u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); } +/* uc1610 */ +/* uc1610 1 */ +void u8g2_Setup_uc1610_i2c_ea_dogxl160_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1610_ea_dogxl160, u8x8_cad_uc16xx_i2c, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1610_20_1(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1610 2 */ +void u8g2_Setup_uc1610_i2c_ea_dogxl160_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1610_ea_dogxl160, u8x8_cad_uc16xx_i2c, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1610_20_2(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1610 f */ +void u8g2_Setup_uc1610_i2c_ea_dogxl160_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1610_ea_dogxl160, u8x8_cad_uc16xx_i2c, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1610_20_f(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1611 */ +/* uc1611 1 */ +void u8g2_Setup_uc1611_ea_dogm240_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1611_ea_dogm240, u8x8_cad_001, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1611_30_1(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1611 2 */ +void u8g2_Setup_uc1611_ea_dogm240_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1611_ea_dogm240, u8x8_cad_001, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1611_30_2(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1611 f */ +void u8g2_Setup_uc1611_ea_dogm240_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1611_ea_dogm240, u8x8_cad_001, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1611_30_f(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1611 */ +/* uc1611 1 */ +void u8g2_Setup_uc1611_i2c_ea_dogm240_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1611_ea_dogm240, u8x8_cad_uc16xx_i2c, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1611_30_1(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1611 2 */ +void u8g2_Setup_uc1611_i2c_ea_dogm240_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1611_ea_dogm240, u8x8_cad_uc16xx_i2c, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1611_30_2(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1611 f */ +void u8g2_Setup_uc1611_i2c_ea_dogm240_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1611_ea_dogm240, u8x8_cad_uc16xx_i2c, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1611_30_f(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1611 */ +/* uc1611 1 */ +void u8g2_Setup_uc1611_ea_dogxl240_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1611_ea_dogxl240, u8x8_cad_001, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1611_30_1(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1611 2 */ +void u8g2_Setup_uc1611_ea_dogxl240_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1611_ea_dogxl240, u8x8_cad_001, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1611_30_2(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1611 f */ +void u8g2_Setup_uc1611_ea_dogxl240_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1611_ea_dogxl240, u8x8_cad_001, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1611_30_f(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1611 */ +/* uc1611 1 */ +void u8g2_Setup_uc1611_i2c_ea_dogxl240_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1611_ea_dogxl240, u8x8_cad_uc16xx_i2c, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1611_30_1(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1611 2 */ +void u8g2_Setup_uc1611_i2c_ea_dogxl240_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1611_ea_dogxl240, u8x8_cad_uc16xx_i2c, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1611_30_2(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} +/* uc1611 f */ +void u8g2_Setup_uc1611_i2c_ea_dogxl240_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) +{ + uint8_t tile_buf_height; + uint8_t *buf; + u8g2_SetupDisplay(u8g2, u8x8_d_uc1611_ea_dogxl240, u8x8_cad_uc16xx_i2c, byte_cb, gpio_and_delay_cb); + buf = u8g2_m_uc1611_30_f(&tile_buf_height); + u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation); +} /* st7565 */ /* st7565 1 */ void u8g2_Setup_st7565_ea_dogm128_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg_cb byte_cb, u8x8_msg_cb gpio_and_delay_cb) diff --git a/src/clib/u8g2_fonts.c b/src/clib/u8g2_fonts.c index 445a8194..5e59b267 100644 --- a/src/clib/u8g2_fonts.c +++ b/src/clib/u8g2_fonts.c @@ -11406,6 +11406,296 @@ const uint8_t u8g2_font_amstrad_cpc_extended_8u[818] U8X8_FONT_SECTION("u8g2_fon "\220\221\4Y\14\210\343\20\321\33*\61)R\0Z\17\210c\270\220\221\210\221R\22\242\342\22\0[\12" "\210c!\22\323\31)\0\134\11\210c\220\323\273H\0]\11\210c!\323#R\0^\14\210\343\11\33" "\222\20\221\221G\3_\10\210\343\307\366 \0\0\0\0"; +/* + Fontname: -etl-fixed-medium-r-normal--14-140-72-72-m-70-tis620-0 + Copyright: Public domain font. Share and enjoy. + Glyphs: 182/182 + BBX Build Mode: 0 +*/ +const uint8_t u8g2_font_etl14thai_t[2265] U8G2_FONT_SECTION("u8g2_font_etl14thai_t") = + "\266\0\3\2\3\4\4\5\4\7\21\0\375\11\376\12\377\1{\2\370\4V \5\0\204\17!\11K\205" + "\237\250\307%\1\42\13\245\264\17E\211\222HJ\0#\16\316\204\257\246aH\242^\206!j\2$\23" + "\326|\277lH\242D\312\222p\211\22)I\206\60\2%\16\316\204\37IJ$iL'Kd\1&" + "\16\316\204/-j\63I\211\226D\246\0'\10\42\265\17%Q\0(\13\333}\257$J\242nQ\26" + ")\14\333|\217,\312\242.Q\22\1*\13\275\214\257Je\313\226\246\10+\12\275\214\257\260\64Ha" + "\11,\10\242u\17%Q\0-\6\215\244\217A.\6\222\205\217!/\13\315\204\317Z\230\25\263\60\4" + "\60\15\316\204/-JB\217I\224I\0\61\13\315\204\257LJ\302\236\6\1\62\15\316\204\237!\11\305" + "\64\323\302\352\60\63\17\316\204\237!\11\305\64\232E\61\31\22\0\64\20\316\204\317PK\262$\252d\311" + "\60\246\11\0\65\16\316\204\217C\232\16r\232\212\311\220\0\66\17\316\204\237!\11\325tPBc\62$" + "\0\67\14\316\204\217k\230\206i\230\326\0\70\17\316\204\237!\11\215\311\220\204\306dH\0\71\17\316\204" + "\237!\11\215\311\240\212b\62$\0:\10\272\205\217!\36\2;\11\312u\217!V\22\5<\10<\205" + "\277\250\261\1=\11\245\224\217A\307\6\1>\10<\205\217\260\251\15?\15\316\204\237!\11\305\326\34L" + "#\0@\20\316\204\257)\223\206$R\42%\222\226x\10A\15\316\204/-JBq\30D\307\0B" + "\22\316\204\217A\312\222,\311\222!\312\222,\311\206\5C\15\316\204\237!\11\255\215b\62$\0D\22" + "\316\204\217A\312\222,\311\222,\311\222,\311\206\5E\14\316\204\217CZ\35\224\264:\14F\13\316\204" + "\217CZ\35\224\264\25G\15\316\204\237!\11\325\322\20\332\224%H\13\316\204\217\320q\30D\307\0I" + "\12\315\204\217A\12\373\64\10J\14\316\204\277\61\355\222%Y\64\1K\20\316\204\217PK\242J&&" + "YTK\302\0L\11\316\204\217\264_\207\1M\14\316\204\217p\32\242\305\243c\0N\17\316\204\17m" + "S\42%\222\22)\321\216\1O\14\316\204\237!\11\375\230\14\11\0P\14\316\204\217A\11\215\303\222\266" + "\2Q\20\336t\237!\11\35\207HJ\64eH\343\0R\16\316\204\217A\11\215\303\22\325\222P\14S" + "\15\316\204\237!\11eG\61\31\22\0T\12O\204\217C\26\367\33\0U\12\316\204\217\320\37\223!\1" + "V\14\316\204\217\320\230D\275\211&\0W\14\316\204\217\320\213\313\64Dc\0X\16\316\204\217PL\242" + "\66-j\11\305\0Y\13\315\204\217\314-\251\205M\0Z\12\316\204\217k\330k:\14[\11\333}\217" + "!\352O\3\134\13\315\204\217\60\15\323b\32\6]\11\333|\217\251?\15\1^\11\236\304/-J\302" + "\0_\7\17|\217C\0`\7\242\265\217%\12a\15\276\204\237!\11\263E\22\65e\11b\15\316\204" + "\217\264\262h\242qS\26\0c\14\276\204\237!\11\325\306dH\0d\13\316\204\337\312\242\215n\312\22" + "e\16\276\204\237!\11\305aP\303dH\0f\13\315\204?)\214\6)\354\4g\21\316t\237EK" + "\262$\213\266\60Y\302dH\0h\13\316\204\217\264\262h\242\307\0i\13\325\204\257\60G\304\236\6\1" + "j\14\345t\317:\42v\324\264d\1k\16\315\204\217\260&%%-\211*Y\0l\11\315\204\37\261" + "\237\6\1m\16\275\204\17\245EI\224DI\224D\13n\12\276\204\217d\321D\217\1o\13\276\204\237" + "!\11=&C\2p\15\316t\217d\321D\343\246,i\12q\13\316t\237E\33\335\224%-r\12" + "\276\204\217d\321D\265\25s\15\276\204\237!\11\345!\26\223!\1t\14\316\204\257\64\33\264\264S\246" + "\0u\11\276\204\217\320\67e\11v\14\275\204\217\314\226\224\222,\214\0w\16\275\204\217LI\224DI" + "\224D\351\2x\13\275\204\217LKj\225\232\26y\14\316t\217\320\233\262\244\225!\1z\11\276\204\217" + "c\257\303\0{\14\333}\237)\213\222,J\242L|\7\351u\217\17\1}\15\333|\17-J\242," + "\211\262h\1~\7\226\274\37\311\2\0\0\16\1\17\275\204\237%\233\222(\211\222(\211\2\16\2\14<" + "\205\17e\251H\246D\1\16\3\21\275\204\217$\31\222()%Q\22E\12\0\16\4\16\275\204\237%" + "\323\206dH\246$\12\16\5\16\275\204\237.\332\220\14\311\224D\1\16\6\21\275\204\217$\31\222()" + "%\321\220,\11\0\16\7\13\274\204/[&%%\1\16\10\17\275\204\237%\13\23%Q\242$R\0" + "\16\11\16\276\204\237)K\23)\221*\213\1\16\12\16\314\204\277l\31\242D\62%\12\0\16\13\21\315" + "\204\317PI\6-)%Q\22E\12\0\16\14\17\276\204\37IJZ\244DJ\206K\1\16\15\17\306" + "|\37IJZ\244DJ\16J:\16\16\20\315t\237%K\242$J\242\213\264D\1\16\17\17\315t" + "\237%K\242$J\242\313\322\5\16\20\16\315t\237A]\23%Q\262\245E\16\21\20\275\204\217$\31" + "\246\244\224DI\224D\1\16\22\17\276\204\237\212S\262$K\242\14\212\22\16\23\15\276\204\37\245\223\322" + "_\206!\21\16\24\16\275\204\237%\323\206dH\224\246\0\16\25\15\275\204\237.\332\220\14\211\322\24\16" + "\26\17\275\204\237%\233\222(\211\22%Q\2\16\27\20\275\204\17%YJI\224DI\224D\1\16\30" + "\16\275\204\237A\34\242J\224D\221\2\16\31\20\275\204\17%Q\242\244\224DI\262$\2\16\32\20\275" + "\204\17iJ\242$J\242$\212\24\0\16\33\20\315\204\317p\232\222(\211\222(\211\42\5\16\34\16\275" + "\204\17i\322\224DI\224.\0\16\35\17\315\204\317p\232\64%Q\22\245\13\0\16\36\16\275\204\17i" + "J\42%Q\22\245E\16\37\17\315\204\317p\232\222HI\224D\351\2\16 \15\275\204\237%\233\222(" + "\211N\1\16!\20\275\204\17iJ\242$J\242!Y\22\0\16\42\15\275\204\17i\322\22\233\226,\0" + "\16#\13\275\204\237A\34\322\60\63\16$\20\315t\237%\233\222(\211\22%Q\302\2\16%\15\275\204" + "\237%\13\23\323\20M\1\16&\16\315t\237%\233\222(\211Na\1\16'\12\275\204\237%\13\333\14" + "\16(\17\315\204\317\312\222iC\62$S\22\5\16)\17\276\204\17)\221*R\262Dm\22\0\16*" + "\16\315\204\317\312\222\205\211i\210\246\0\16+\17\275\204\17eH\224\222RJ\242$\12\16,\20\315\204" + "\317pI\244$R\22%Q\272\0\16-\15\275\204\237%\13\247IK\26\0\16.\15\315\204\317\312%" + "\234&-Y\0\16/\14\275\204\17eP\302n\11\0\16\60\13,\215\17eH\225!\1\16\61\11\25" + "\305\17iP\0\16\62\11\275\204\237%\13{\16\63\14N\204\17Q\7\264(\355\1\16\64\7\215\304\217" + "A\16\65\7\225\304\317a\16\66\10\225\304\277a\10\16\67\10\225\304\257d\30\16\70\7\22n\17%\16" + "\71\7\223m\217E\16:\7\22n\217!\16?\20\316|/iP\22\227aI\134\206M\2\16@\11" + "\272\205\217\244\313\20\16A\20\275\204\217(\211\222(\211\222(Q\206D\16B\14\325\204\237A\34\302\36" + "\65\1\16C\15\325\204\237%J\22i\354\250\11\16D\14\325\204\217DJ\302>j\2\16E\12\315t" + "\237%\13\373\1\16F\13\315t\217e\21{+\1\16G\13\236\304\237a)%\12\0\16H\7\231\336" + "\217\1\16I\12\35\335\17\61\32\24\0\16J\13\236\334\237R\242,\12\0\16K\11\33\336\237dI\0" + "\16L\10\33\336\237I\1\16M\7\22\336\217!\16N\11\234\305\237a\221\0\16O\15\266\204\237!\11" + "\25\217\311\220\0\16P\14\266\204\237!\11\35\223!\1\16Q\17\266\204\237!\11\25%Y\322dH\0" + "\16R\16\306\204\217\264\224(\311\342\61\31\4\16S\16\266\204\37\245\224H\211\224l[\0\16T\17\306" + "\204\337\312\220\244\221\22)Q\66\10\16U\20\306\204\337HI\206$\215\224H\211\262A\16V\20\276\204" + "\217\70\321\242\64\221\22)\31\22\0\16W\17\306\204\337J\305)\221\222%Y\24\0\16X\14\276\204O" + "eJKJ\213\5\16Y\17\306\204\337\222\222(mQ\244DR\2\16Z\23\306\204\17%\31\224,\311" + "\222,\311\222,\211\222\4\16[\17\276\204\17QL\262$Y\244$\14\1\0"; +/* + Fontname: -etl-fixed-medium-r-normal--16-160-72-72-m-80-tis620-0 + Copyright: Public domain font. Share and enjoy. + Glyphs: 182/182 + BBX Build Mode: 0 +*/ +const uint8_t u8g2_font_etl16thai_t[2429] U8G2_FONT_SECTION("u8g2_font_etl16thai_t") = + "\266\0\3\2\3\4\4\5\5\10\23\0\375\12\376\13\377\1\211\3\23\4\210 \5\0\204\30!\7Q\206" + "\30\207D\42\13\246\304\30\222\222%\231\226\0#\17\326\204X=\15C\22\265\14C\324\23\0$\21\327" + "\204x\341\240D\221\24\316c$U\6\61\3%\24\327\204\70\232\224\224\222HI\343\64\221\222()i" + "\12\0&\21\327\204X[)\213\262\354\244%b\222IS\0'\10\242\305\30J\242\0(\14\343}X" + "I\224D\275EY\0)\14c}\30Y\224E\275DI\4*\15\277\214x\245J\333\226\64\325\62\0" + "+\13\277\214xqm\30\262\270\6,\10\242u\30J\242\0-\6\216\244\30\7.\7\222\205\30C\0" + "/\13\326\204\270\305j\230\206\325\24\60\15\326\204XZ\224\204>&Q&\1\61\13U\205X\231\224\204" + "}\32\4\62\16\326\204\70C\22\212i\246\205\325t\30\63\20\326\204\70C\22\212i\64\247\242\230\14\11" + "\0\64\20\326\204\230\241\226D\225,\311\222aL+\0\65\16\326\204\30\207\264:\310i*&C\2\66" + "\16\326\204XS\230\246\203\22:&C\2\67\13\326\204\30\327bZL\233\0\70\17\326\204\70C\22\32" + "\223!\11\35\223!\1\71\16\326\204\70C\22\32\223Am\214&\0:\10\272\215\30C<\4;\12\312" + "}\30C\254$\12\0<\10M\205\230Y\327\16=\10\256\224\30w\342\60>\11\315\204\30i\267\216\0" + "?\16\326\204\70C\22\212iX\315\301\64\2@\22\326\204XS&%J\262DJ\244D\322\22\17\1" + "A\15\326\204XZ\324\22\212\303 :\6B\16\326\204\30\203\22\32\207%t\34\26\0C\15\326\204\70" + "C\22Z;\212\311\220\0D\15\326\204\30C\224%\241\337\222!\2E\14\326\204\30\207\264:(i\353" + "\60F\14\326\204\30\207\264:(iW\0G\16\326\204\70C\22ZKChS\226\0H\13\326\204\30" + "\241\343\60\210\36\3I\12U\205\30\203\24\366\323 J\15\327\204X\203\30\367\224EY\266\1K\21\326" + "\204\30\241\226D\225L\24\223,\252%a\0L\11\326\204\30i\35\6M\14\326\204\30\241\70\15\321" + "\342\321\61N\20\326\204\30\341\266)\221\22I\211\224h\307\0O\14\326\204\70C\22\372c\62$\0P" + "\14\326\204\30\203\22\32\207%\355\12Q\26\337|\70C\24&a\22&a\22&a\222(\211$\15\71" + " R\20\326\204\30\203\22\32\207%\252%Y\22\212\1S\15\326\204\70C\22\232\35\305dH\0T\12" + "\327\204\30\207,\356o\0U\12\326\204\30\241L\206\4V\21\327\204\30\251\65\311\242,\312*a\222" + "\306\31\0W\14\326\204\30\241\27\227i\210F\61X\17\326\204\30\241\230Dm\242\26\265\204b\0Y\16" + "\327\204\30\251\232dQVI\343n\0Z\12\326\204\30\327b\257\351\60[\11c~\30C\324?\15\134" + "\13\326\204\30i\134\215\323\270\32]\11\343|\30S\377\64\4^\11\236\314XZ\224\204\1_\7\217|" + "\30\207\0`\7\242\305\30K\24a\15\306\204\70C\22\246\311\60\332\224%b\15\336\204\30i\313\242\211" + "\216\233\262\0c\14\306\204\70C\22\252\35\223!\1d\14\336\204\270-\213\66zS\226\0e\16\306\204" + "\70C\22\212\303\240\26\223!\1f\14\335\204xRX\32\244\260'\0g\23\336t\270\311\242%Y\222" + "E[:$\241\230\14\11\0h\13\336\204\30i\313\242\211>\6i\13]\205Xa\216\210}\32\4j" + "\14\355t\230uD\354\243\24I\0k\20\326\204\30i-\211*\231\230dQ-\11\3l\11U\205\70" + "b\32\4m\21\307\204\30\213\22ER$ER$ER$\25n\12\306\204\30\311\242\211>\6o" + "\14\306\204\70C\22\372\230\14\11\0p\16\326t\30\311\242\211\216\233\262\244)\0q\14\326t\70\213\66" + "zS\226\264\0r\13\306\204\30\311\242\211jW\0s\14\306\204\70C\22\312\216\311\220\0t\13\325\204" + "Xa\64Ha\257\2u\11\306\204\30\241\337\224%v\14\306\204\30\241\61\211z\23%\0w\21\307\204" + "\30\251\24I\221\24I\221\24I\25\13\0x\16\306\204\30\241\230D\231\250EI(\6y\15\326t\30" + "\241\307$\262\244\225!\1z\11\306\204\30\327\260\327a{\15\343}\70S\26%Q\26%Q&|\7" + "qv\30\37\4}\16c}\30Z\224DY\224DY\264\0~\12\237\304\70\232\24i\12\0\0\0\16" + "\1\21\306\204\70C\22nI\226dI\226dI\26\16\2\15\305\204\30\322\224D\232[\262\0\16\3\22" + "\306\204\30I\64D-Y\222%Y\222E\13\0\16\4\17\306\204\70C\22Z\274DJ\224d\1\16\5" + "\20\306\204\70J)\21\25/\221\22%Y\0\16\6\22\306\204\30I\64D-Y\222%\331\20-\12\0" + "\16\7\14\305\204x\306PK\242J&\16\10\21\306\204\70C\22\246\221\22)Y\222%\231\2\16\11\16" + "\306\204\70S\226&R\42uY\14\16\12\16\325\204\230\341\264D\221\346\226,\0\16\13\24\326\204\270\251" + "\22\15I\26%Y\222%Y\222E\13\0\16\14\22\307\204\70\223\226\224\22-\321\22-\71,J\0\16" + "\15\21\316|\70\222\224\264H\211\224H\311AI\7\16\16\22\326t\70C\22nI\226dIv)U" + "\22\5\16\17\22\326t\70C\22nI\226dIv)\15I\3\16\20\17\325t\70\203\272&J\242d" + "\242\322\42\16\21\22\306\204\30IeH\242J\226dI\226dI\26\16\22\23\307\204\70%\245\242%C" + "\222\14I\242T\16\222\22\16\23\24\307\204\70R\22%Q\322\224\224\222R\222(\303\222\10\16\24\17\306" + "\204\70C\22Z<%J\224d\1\16\25\20\306\204\70J)\21\25O\211\22%Y\0\16\26\21\306\204" + "\70C\22nI\226dI\226H\211\24\16\27\22\306\204\30R\242T\244$K\262$K\262$\13\16\30" + "\20\305\204\70\203\70D\225(\211\222(R\0\16\31\20\306\204\30R\42\265dI\226dI\264\30\16\32" + "\21\306\204\30\332\226dI\226dI\226d\321\2\16\33\22\326\204\270\351\266%Y\222%Y\222%Y\264" + "\0\16\34\21\306\204\30\332&J\211\224H\211\224$J\2\16\35\22\326\204\270\351\266\211R\42%R\42" + "%\211\222\0\16\36\15\306\204\30J\262\364\377OI\2\16\37\16\326\204\270\351\222,\375\377S\222\0\16" + " \17\306\204\70C\22nI\226dIv\13\16!\21\306\204\30\332\226dI\226dI\66D\213\2\16" + "\42\16\306\204\30\332&&\222hL\206\4\16#\14\305\204\70\203\70\244a\315\0\16$\22\326t\70C" + "\22nI\226dI\226H\211\224\26\16%\21\306\204\70C\22\246\221RR\262DJ\244\0\16&\20\326" + "t\70C\22nI\226dIvK\13\16'\12\305\204\70K\26v\63\16(\20\326\204\270\225!\11-" + "^\42%J\262\0\16)\20\306\204\30\332\226dI\227%K\262h\1\16*\22\326\204\270\225!\11\323" + "H))Y\42%R\0\16+\22\306\204\30\322\20)Q\245\42%Y\222%Y\0\16,\16\326\204\270" + "\351bK\372\377)I\0\16-\21\306\204\70C\22\246\211\224HI\226d\321\2\16.\23\326\204\270\225" + "!\31\222\64\221\22)\311\222,Z\0\16/\14\305\204\30\312\240\204\275%\0\16\60\13,\225\30\312\220" + "*C\2\16\61\11\26\325\30\332\260\0\16\62\12\305\204\70K\26\366\1\16\63\14\336\204\30\242\216NY" + "\332\7\16\64\7\216\324\30\7\16\65\10\226\324\270\303\20\16\66\10\226\324\230\303 \16\67\11\226\324x\311" + "\60\4\16\70\10\222n\30J\0\16\71\10\224m\30J\62\16:\10\22n\30C\0\16?\21\336|X" + "\322\240$\276\14K\342\313\260I\0\16@\12\302\205\30I/C\0\16A\22E\205\30Q\22%Q\22" + "%Q\22%\312\220\10\16B\14\336\204\70\303:\250}\25\5\16C\16\336\204\70S\226\64)i\257\242" + "\0\16D\14\336\204\30\212\226\244\375*\12\16E\12\325t\70K\26\366\7\16F\14\326t\30K\242T" + "\373X\2\16G\14\246\324\270\311\220\64%\12\0\16H\7\31\357\30\3\16I\12\235\355\30b\64(\0" + "\16J\13\237\354\70\265\244\62)\0\16K\11\233\356\70\311\222\0\16L\10\233\356\70\223\2\16M\10\222" + "\356\30C\0\16N\13$\316\70K\224$\22\0\16O\15\266\204\70C\22*\36\223!\1\16P\14\276" + "\204\70C\22zL\206\4\16Q\17\276\204\70C\22Z\224dI\223!\1\16R\20\316\204\30i)Q" + "\222%R<&C\2\16S\17\276\204\70J)\221\22)\221\222m\13\16T\17\316\204\270\225!IK" + "J\244D\331 \16U\21\316\204\270\221\222\14IZR\42%\312\6\1\16V\20\306\204\30q\242Ei" + "EJ\244dH\0\16W\20\316\204\270\225\212S\42%R\262$\213\2\16X\20\307\204\270\312\20\305\65" + "\245\242\224\22e\1\16Y\20\316\204\270%%Q\332\242&)\221\22\0\16Z\24\306\204\30J\62(Y" + "\222%Y\222%Y\22%\11\0\16[\21\307\204\30\252\232\204I)I\206DK\322\24\0"; +/* + Fontname: -etl-fixed-medium-r-normal--24-240-72-72-c-120-tis620-0 + Copyright: Public domain + Glyphs: 182/182 + BBX Build Mode: 0 +*/ +const uint8_t u8g2_font_etl24thai_t[3903] U8G2_FONT_SECTION("u8g2_font_etl24thai_t") = + "\266\0\4\3\4\5\4\6\5\16\35\0\373\16\373\16\0\2\134\4\226\6\221 \6\0\20\377\0!\14\364" + "\370\373!\242*A!\1\42\11VV\375 \302\23\1#!\352\22\374#\42$\42$\42r q" + " \242HDHDHD\344@\342@D\221\210\220\210\14\0$\31\352\22\374$fs@\42B\42U" + "fV%\42$B\42r@r&\4%\35\352\22\374\61#Q\42\241I\205\314\204\240\234\240\234\240\304" + "\214D\211\204&\25\62\23\0&\31\352\22\374\64V\64\61\243\211TQ\243\21\11\42\243\11!\231\3\21" + "\22\1'\14t\70\375!q\20\242B\11\0(\22\345\30\374#\42\62\42\62\42\243\315\214\314\214\220\0" + ")\21\345\26\374 $\63#\63\243\223\21\221\21\65\0*\27\272\62\374$($\42R!\61b&f" + "\62!Q\242HP\10\0+\16\252\62\374$\250\321\301\201\221\240F\0,\14t\270\373!q\20\242B" + "\11\0-\10*\262\374\360\300\0.\12D\30\374!q\20!\1/\24\350\24\374\246JLJLJL" + "JLJLJL\14\0\60\26\350\24\374Bc\61RDSb!aRCDT\62aC\2\61\17" + "\350\24\374#\65D#!\246\277\71\70\20\62\20\351\24\374Rs!T%'\246\337\35\34\20\63\25\351" + "\24\374Rs!T%'&DU(GE\64qS\2\64\31\351\24\374$'&'&!$!#" + "\42#\242F\344\340\200JN\11\0\65\27\351\24\374p\20q\20!\247\356\344 nN\216\212h\342\246" + "\4\0\66\27\351\24\374Rs\61DE'Ar\20\61S\305\252f\342\246\4\0\67\25\351\24\374\360\200" + "LNLNLNLNLNLN\14\0\70\32\352\22\374Ce#$\42$\42$cd\63\62\61" + "TFV\64q\20c\2\71\27\351\24\374Rs\61SEU\63q\20B!'GE\64qS\2:" + "\16\264\30\374!q\20!.q\20!\1;\20\344\270\373!q\20!.q\20\242B\11\0<\17\252" + "\62\374(\66\65EDF\310pR\0=\14jr\374\360\300\36\352\340\300\0>\16\252\62\374 \271\220" + "\31\21\325\62A\0?\23\370\364\373Bc\61B%&\245\231z\70)*\31\0@\32\351\24\374Rs" + "\61DErq\20!B!B!Bq\20B\61w\20rA\20\351\24\374Rs\61S\305\352\340A" + "\24_\11B\32\351\24\374`s\42\63!$!$!#\362 BHB\212\321\1\305\11\0C\21\351" + "\24\374Rs\61SE\247\257j&nJ\0D\20\351\24\374pr\20!T\305?:\240\70\1E\20" + "\351\24\374\360\300N\273\223\23\71\355\16\16\10F\16\351\24\374\360\300N\273\223\23\71\275\3G\23\351\24" + "\374Rs\61SE\247\215+\252\232\211\233\22\0H\16\351\24\374 \305W\7\17\242\370J\0I\14\346" + "\26\374pP\42\244rPJ\15\351\24\374\247GE\64qS\2K\33\351\24\374 E$!#" + "\242FB\210j\214JBHDF\211\220\204\24Y\0L\14\351\24\374 \247\377\335\301\1\1M\25\351" + "\24\374 Ucsqp\20\61A\61A\22B\305W\2N\27\351\24\374 UTdcC!B!" + "B\42A\42A\343\250\225\0O\20\351\24\374Rs\61S\305_\325L\334\224\0P\22\351\24\374pr" + "\20!T\305\350\200\342DN\357\0Q\37\372\364\373Rt\62\63!%!%!%!%!%!%" + "!%!C\61Brt\20(R\32\351\24\374pr\20!T\305\350\200\342DFDFDHBH" + "B\212J\0S\24\351\24\374Rs!TE\67gd\67GEt@b\2T\14\352\22\374\360\300H" + "P\377#\0U\16\351\24\374 \305\377\252f\342\246\4\0V\33\352\22\374 \306LBHDHDH" + "FDHDHD*$\214\235\240\20\0W\24\351\24\374 \305OB(&(&,\16\42nl\252" + "\4X\34\351\24\374 E%!#\42\243BHBjlJBHBF\211\214\204\24\225\0Y\24\352" + "\22\374 F&!$\42$#\42dE'\250\217\0Z\17\352\22\374\360\300Pnl\277\23<\70\60" + "[\14\365\30\374pP\243\377\346`\0\134\23\350\24\374 &'&'&'&'&'&'&]" + "\14\365\26\374p\60\243\377\346\240\0^\15YT\375\24\67%!\243BJ\0_\10,\260\373\360\301\0" + "`\15t\70\375\42\241D\344 B\2\0a\24\271\24\374Cd\42$'cq\60ETs\60!A" + "\42b\26\351\24\374 \247\223\21\211\12\22#*\252\42\223\212\12\221\21\0c\22\251\24\374br\61D" + "E\247nH\342 \304\2\0d\23\351\24\374\247\23\12\211\3\232*\216j(*DF\4e\23\251\24" + "\374Rs\61Du\360 NJ\342 \304\2\0f\17\346\26\374\63B\42\244\344\240DH\237\0g\26" + "\371t\373\62\42\321\304\250\212U\315\304A\10\205\234&F$\0h\20\351\24\374 \247\223\21\211\12\22" + "#*\276\22i\11\342\32\374@tp`j\15%\225\373\243ZF\377\315\301\10\0k\27\330\24\374 " + "\246\210\246dBb\244\206\250FbDdB\246H\0l\13\344\32\374 \242\377\11\305\0m\33\272\22" + "\374 (!\61qP\42B\42B\42B\42B\42B\42B\42B\242\0n\17\251\24\374 \62\42Q" + "ASD\305W\2o\20\251\24\374Rs\61S\305U\315\304M\11\0p\27\351\224\373 \62\42QA" + "bDEUdRQ!\62\42\247\35\0q\23\351\224\373\62\42\321\304\250\212\221\11E\205\310\210\234\16" + "r\17\251\24\374 \62\42QASD\247w\0s\20\251\24\374\361\200l\320\310\220\352\200\342\2\0t" + "\16\326\26\374\42\244\344\240DH\217h\6u\16\251\24\374 \305\217L(*DF\4v\25\252\22\374" + " F&!$\42$#\42$\42EF'(\4w\21\251\24\374 \305\223\20\212\11\212\11\213\233*" + "\1x\24\251\24\374 E%!\243BjlJBF\205\24\225\0y\21\371t\373 \305\37M\34\204" + "P\310iqS\2z\14\251\24\374\360\200L\237\35\34\20{\17\366\26\374\63\42\244\33\231!)!]" + "\15|\10b\233\373\360\17\4}\17\366\26\374\60%\244+\241\31E:\231\1~\16Kr\375\62$Q" + "\42\22b!\64\2\0\0\16\1\36\331\22\374qr@\63\42#!$!$!$!$!$!$" + "!$!$!$\16\2\35\330\22\374!\63!\62!\42\61\242\205\214\204\214\204\214\204\214\204\214\304\212" + "\23\22\0\16\3\26\332\22\374\60!\62AB\242HDF\377\67\23\63V$\0\16\4\33\332\22\374b" + "s\20\61TF\42B!\21A!\21q\20bdT\325J\0\16\5\34\332\22\374\62\42rP\42A" + "F\42B!\21A!\21q\20bdT\325J\0\16\6\31\312\22\374\60!\62AB\242HDF" + "R!\21q\21!\262F\0\16\7\25\331\24\374\65\25\42E\66\247\35U\221\304\310\210\21\11\0\16\10" + "\32\331\24\374Rs\61\63'\62\42\241O(\204$\204$\204$\204$\244\10\16\11\37\332\22\374Qt" + "#\63(\243$\211\314\210\220\210\220\310\214\210D\210\212\220\203\230\11\11\0\16\12\37\350\22\374&!\63" + "!\62\241dBFDBFBFBFBFBFb\305\11\11\0\16\13\31\352\22\374X!\62A" + "B\42!%\21%\42$\243\63\61cE\2\16\14 \332\22\374QB\62\241D\202F\202F\202F" + "\202F\202F\202F\202\306\42EE\26\22\61\11\16\15'\12\263\373QB\62\241D\202F\202F\202F" + "\202F\202F\202F\202F\242Db$\242B\244*D(\202\212\2\0\16\16%\12\263\373St\42%" + "\243DHDHDHDHDHDHbh$HBDBfD$\244fD\0\16\17&\12\263" + "\373St\42%\243DHDHDHDHDHDHbh$\42DB\42FE\204H\204\211\204" + "\2\16\20 \10\265\373R\42Rv\61\62&\242\42$BdBFBFB\246\42\204\42BbE\5" + "\1\16\21\42\332\22\374 !\61\21q\60\61\42\243DHDHBJBJBJBJBJBJ" + "BJ\0\16\22%\333\22\374!\61r!A\241\202H\202\42D\242\42B\242\42B\202B\5\205\12\23" + "\11\213\3\11\21\223\221\0\16\23&\333\22\374Q\42!\62!\242B\215\204\32\11\65\22j$\324H\250" + "\221P#!\61B!\22A\21!\22\42\1\16\24\35\332\22\374bs\20\61TF\42B\21\22A\62" + "A#A#A\42B!cT%\16\25\36\332\22\374\62\42rP\42AF\42B\21\22A\62A#" + "A\42B\42B!cT%\16\26 \332\22\374bs\20\61\64\42$!%!%!%!%!%" + "!%\61$\21\22#\42$\16\27 \332\22\374\61A\21\62\61A\243\211\220\210\220\210\220\210\220\210\220" + "\210\220\210\220\210\220\210\220\0\16\30\33\331\22\374q\61Sw\42$(!$!$!$!$!$" + "q\20q\20\16\31#\332\22\374!$\21!#\21!#\62\243\211\220\210\220\210\220\210\220\210\14\205\210" + "H\304\201\310\210\4\0\16\32 \331\22\374!\64!\63!#\61#\42#!$!$!$!$!" + "$!$q\20b\1\16\33\42\371\22\374\247BhBfBFbFDFBHBHBHBH" + "BHBH\342 \304\2\0\16\34#\332\22\374\21\42\62\21!\62\21!B\42B\42B\42B\42B" + "\42B\42B\42B\61q`\61\62\1\16\35$\372\22\374\250B\311D\204\310D\204\10\211\10\211\10\211" + "\10\211\10\211\10\211\10\211\10\305\304\201\305\310\4\0\16\36#\332\22\374\241d\42Bd\42BDB\211" + "\204\22\22\21\22\21\22\21\22\21\22\221\12\211\3\213\221\11\0\16\37$\372\22\374\250B\311D\204\310D" + "\204\210\204\22\11%\22JHDHDHDHD*$\16,F&\0\16 \36\331\22\374br@" + "\63\42#!$!$!$!$!$!\64\21\64\21$\21%\16! \332\22\374!\65!\64!" + "$\61$\42$\42$\42$\42$\42$\61\64\42r`!B\1\16\42\30\331\22\374\61C\22bC" + "u\20!B!\61SD\305\352\340\300\0\16#\30\331\22\374a\62Sw\20\61\63\247\233\30\221\210\210" + "\221\210\232\12\0\16$ \371\22\374Rs\61\63\42#!$!$!$!$!$!$\61#\21" + "\22\242FN\1\16%\30\331\22\374Rs\61SE\64T\62\42!TDU\64\22#!$\16& " + "\372\22\374bs\20\61\64\243DHDHDHDHDHDHbh$HBJP\1\16'\26" + "\331\22\374Rs\61S%\247\67\61\42\21\21#\21D$\0\16(!\372\22\374\250\344\311\314\204\224\204" + "H\210\204D\12\25)\64\221P\42A#A#\61$\61$\1\16)\42\332\22\374!$\21\22#A" + "#\62\243\211H\304\204D\4\205\10\211\220\210\220\210\220\310A\214\11\0\16* \372\22\374(FRt" + "\62\63!%Fd\63\242HBJBJbH\42$FDH\2\0\16+#\331\22\374!\24\21\222" + "\42bB\42dBdFBHBHBHBHBHBHBHBH\0\16,#\372\22\374\250" + "B\213\24\22\24\21\42\22J$\224H(!\21!\21!\21!\21\251\220\70\260\30\231\0\16-\26\331" + "\22\374Rs\61S%'\61C\22bC\305\352\340\300\0\16.\31\371\22\374\66&Ss!\22q#" + "'\61C\22bC\305\352\340\300\0\16/\17\310\22\374\21\64\21BaA!\246?\16\60\17wt\374" + "!\62BQ)\62BQ\1\16\61\15J\364\375\21\66\21Dqb\3\16\62\15\330\24\374aq\60\63" + "\246\377\0\16\63\23\12\21\374 \21\26\22&\21\17Ut\243P\377\0\16\64\13H\324\375a!tp" + "@\16\65\14Y\324\375'r!tp`\16\66\15Y\324\375&C\22\21t\360\0\16\67\16Y\324\375" + "%\21R\221\352\340\300\0\16\70\14T|\373!\21\22\61\242\0\16\71\16Wx\373!\62\22!\61!" + "\303\0\16:\7#\272\373`\16?\34\11\365\373#ds\42Q\241_\220<\210PQ!B!B!" + "q@q%\4\16@\17\324\24\374 \242?\231\220\230\210\220\0\16A$\331\24\374 #\42#\42#" + "\42#\42#\42#\42#\42#\42#\262B\42Bb\42B\42BF\2\0\16B\25\12\23\374r\42" + "u s\20\250?\234\223\10\223\210\223\0\16C\32\12\23\374R$\62\42$\42\241\244BfDP\37" + "\316I\204I\304I\0\16D\25\12\23\374\60\62r\20%!\250\70'\21&\21'\1\16E\15\10" + "\25\374aq\60\63\246\377\7\16F\20\310\22\374!\61\21\261BDBFL\16G\21i\324\375'" + "b\22'\241\302\42bD\4\0\16H\7\62\236\376`\16I\17Xv\376\21\26\21\63\21\62aQ\3" + "\16J\22Zr\376!\42s\20\61\22\241\42\306h\2\0\16K\13F\230\376\42rP\42\2\16L\15" + "Xv\376&\65a\21\42\63\5\16M\15Vz\376Aq\20r\20A\1\16N\14V\334\375B\21E" + "\21U\1\16O\26\231\24\374R\63\61!E\61A\221\202b\202JbM\11\0\16P\21\330\24\374B" + "c\61R\304\217J&lH\0\16Q\31\331\24\374Rs\61SE!R\22q\20!A\42'&\66" + "bS\3\16R\34\352\22\374 \250\305D\305\201\204D\4\205\14\305\10EH\4'\42d\7\17\2\16" + "S\36\312\22\374\61#Qa\301D\204D\204D\204D\204D\244B\204\42\210\42HBJ\0\16T\31" + "\332\22\374(\67\66\343fNPfDI\204\10\311\204\324\201\310A\0\16U\35\352\22\374(%!\24" + "\42Fc\63\66'(\63\242$B\204dB\352@\344 \0\16V\32\312\22\374 (x\20s\20\70" + "\250dFB$D\202d\342 \306\4\0\16W \313\22\374\241\352H\202H\42BHFHFHF" + "\204F\244D\242\42B\213\210\22\21\22\0\16X\31\313\22\374)\70r\20r\20\62(\251\205\210\310I" + "\304H\205\320\10\0\16Y\26\332\22\374\250n\346\344hp\312\246H\204\211I\214\210\30\0\16Z'\373" + "\22\374\21$\221\311E\4\205\4\205\62\11\61\11\61\11\61\11\61\11\61\11\61\11\61\11\61\11)\21!" + "\21\11\0\16[\32\255R\374\61)\22(\22h'\42!$\42\61AB\61Q!\66\33\12\0"; /* Fontname: -Cronyx-Courier-Bold-R-Normal--8-80-75-75-M-50-RAWIN-R Copyright: Copyright (C) 1990, 1991 EWT Consulting, Portions Copyright (C) 1994 Cronyx Ltd. diff --git a/src/clib/u8x8.h b/src/clib/u8x8.h index 0becc9cd..1296af77 100644 --- a/src/clib/u8x8.h +++ b/src/clib/u8x8.h @@ -328,6 +328,8 @@ struct u8x8_struct #define u8x8_GetCols(u8x8) ((u8x8)->display_info->tile_width) #define u8x8_GetRows(u8x8) ((u8x8)->display_info->tile_height) #define u8x8_GetI2CAddress(u8x8) ((u8x8)->i2c_address) +#define u8x8_SetI2CAddress(u8x8, address) ((u8x8)->i2c_address = (address)) + #define u8x8_SetGPIOResult(u8x8, val) ((u8x8)->gpio_result = (val)) #define u8x8_GetSPIClockPhase(u8x8) ((u8x8)->display_info->spi_mode & 0x01) /* 0 means rising edge */ #define u8x8_GetSPIClockPolarity(u8x8) (((u8x8)->display_info->spi_mode & 0x02) >> 1) @@ -542,6 +544,7 @@ uint8_t u8x8_cad_100(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); uint8_t u8x8_cad_st7920_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); uint8_t u8x8_cad_ssd13xx_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); uint8_t u8x8_cad_ld7032_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); +uint8_t u8x8_cad_uc16xx_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); /*==========================================*/ @@ -694,13 +697,15 @@ uint8_t u8x8_d_ld7032_60x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *ar uint8_t u8x8_d_t6963_240x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); uint8_t u8x8_d_t6963_240x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); uint8_t u8x8_d_t6963_128x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); -uint8_t u8x8_d_ssd1322_nhd_256x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); uint8_t u8x8_d_t6963_256x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); +uint8_t u8x8_d_ssd1322_nhd_256x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); uint8_t u8x8_d_a2printer_384x240(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); uint8_t u8x8_d_sed1330_240x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); uint8_t u8x8_d_ra8835_nhd_240x128(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); uint8_t u8x8_d_ssd1325_nhd_128x64(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); uint8_t u8x8_d_uc1610_ea_dogxl160(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); +uint8_t u8x8_d_uc1611_ea_dogm240(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); +uint8_t u8x8_d_uc1611_ea_dogxl240(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr); /*==========================================*/ diff --git a/src/clib/u8x8_cad.c b/src/clib/u8x8_cad.c index 2c504b2a..80e94d92 100644 --- a/src/clib/u8x8_cad.c +++ b/src/clib/u8x8_cad.c @@ -368,6 +368,7 @@ uint8_t u8x8_cad_st7920_spi(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *ar /* cad procedure for the SSD13xx family in I2C mode */ /* u8x8_byte_SetDC is not used */ /* U8X8_MSG_BYTE_START_TRANSFER starts i2c transfer, U8X8_MSG_BYTE_END_TRANSFER stops transfer */ +/* After transfer start, a full byte indicates command or data mode */ static void u8x8_i2c_data_transfer(u8x8_t *u8x8, uint8_t arg_int, void *arg_ptr) U8X8_NOINLINE; static void u8x8_i2c_data_transfer(u8x8_t *u8x8, uint8_t arg_int, void *arg_ptr) @@ -385,6 +386,7 @@ uint8_t u8x8_cad_ssd13xx_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *a { case U8X8_MSG_CAD_SEND_CMD: case U8X8_MSG_CAD_SEND_ARG: + /* 7 Nov 2016: Can this be improved? */ //u8x8_byte_SetDC(u8x8, 0); u8x8_byte_StartTransfer(u8x8); //u8x8_byte_SendByte(u8x8, u8x8_GetI2CAddress(u8x8)); @@ -483,3 +485,86 @@ uint8_t u8x8_cad_ld7032_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *ar return 1; } +/* cad procedure for the UC16xx family in I2C mode */ +/* u8x8_byte_SetDC is not used */ +/* DC bit is encoded into the adr byte */ +uint8_t u8x8_cad_uc16xx_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr) +{ + static uint8_t in_transfer = 0; + static uint8_t is_data = 0; + uint8_t *p; + switch(msg) + { + case U8X8_MSG_CAD_SEND_CMD: + case U8X8_MSG_CAD_SEND_ARG: + if ( in_transfer != 0 ) + { + if ( is_data != 0 ) + { + /* transfer mode is active, but data transfer */ + u8x8_byte_EndTransfer(u8x8); + /* clear the lowest two bits of the adr */ + u8x8_SetI2CAddress( u8x8, u8x8_GetI2CAddress(u8x8)&0x0fc ); + u8x8_byte_StartTransfer(u8x8); + } + } + else + { + /* clear the lowest two bits of the adr */ + u8x8_SetI2CAddress( u8x8, u8x8_GetI2CAddress(u8x8)&0x0fc ); + u8x8_byte_StartTransfer(u8x8); + } + u8x8_byte_SendByte(u8x8, arg_int); + in_transfer = 1; + break; + case U8X8_MSG_CAD_SEND_DATA: + if ( in_transfer != 0 ) + { + if ( is_data == 0 ) + { + /* transfer mode is active, but data transfer */ + u8x8_byte_EndTransfer(u8x8); + /* clear the lowest two bits of the adr */ + u8x8_SetI2CAddress( u8x8, (u8x8_GetI2CAddress(u8x8)&0x0fc)|2 ); + u8x8_byte_StartTransfer(u8x8); + } + } + else + { + /* clear the lowest two bits of the adr */ + u8x8_SetI2CAddress( u8x8, (u8x8_GetI2CAddress(u8x8)&0x0fc)|2 ); + u8x8_byte_StartTransfer(u8x8); + } + in_transfer = 1; + + p = arg_ptr; + while( arg_int > 24 ) + { + u8x8->byte_cb(u8x8, U8X8_MSG_CAD_SEND_DATA, 24, p); + arg_int-=24; + p+=24; + u8x8_byte_EndTransfer(u8x8); + u8x8_byte_StartTransfer(u8x8); + } + u8x8->byte_cb(u8x8, U8X8_MSG_CAD_SEND_DATA, arg_int, p); + + break; + case U8X8_MSG_CAD_INIT: + /* apply default i2c adr if required so that the start transfer msg can use this */ + if ( u8x8->i2c_address == 255 ) + u8x8->i2c_address = 0x070; + return u8x8->byte_cb(u8x8, msg, arg_int, arg_ptr); + case U8X8_MSG_CAD_START_TRANSFER: + in_transfer = 0; + /* actual start is delayed, because we do not whether this is data or cmd transfer */ + break; + case U8X8_MSG_CAD_END_TRANSFER: + if ( in_transfer != 0 ) + u8x8_byte_EndTransfer(u8x8); + in_transfer = 0; + break; + default: + return 0; + } + return 1; +} diff --git a/src/clib/u8x8_d_uc1611.c b/src/clib/u8x8_d_uc1611.c new file mode 100644 index 00000000..1e541e80 --- /dev/null +++ b/src/clib/u8x8_d_uc1611.c @@ -0,0 +1,291 @@ +/* + + u8x8_d_uc1611.c + + Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) + + Copyright (c) 2016, olikraus@gmail.com + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list + of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or other + materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + 6 Nov 2016: Not yet finished + +*/ +#include "u8x8.h" + + + + + +static const uint8_t u8x8_d_uc1611_powersave0_seq[] = { + U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */ + U8X8_C(0x0a9), /* display on */ + U8X8_END_TRANSFER(), /* disable chip */ + U8X8_END() /* end of sequence */ +}; + +static const uint8_t u8x8_d_uc1611_powersave1_seq[] = { + U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */ + U8X8_C(0x0a8), /* display off, enter sleep mode */ + U8X8_END_TRANSFER(), /* disable chip */ + U8X8_END() /* end of sequence */ +}; + +static const uint8_t u8x8_d_uc1611_flip0_seq[] = { + U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */ + U8X8_CA(0x0c0, 0x004), /* LCD Mapping */ + U8X8_END_TRANSFER(), /* disable chip */ + U8X8_END() /* end of sequence */ +}; + +static const uint8_t u8x8_d_uc1611_flip1_seq[] = { + U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */ + U8X8_CA(0x0c0, 0x002), /* LCD Mapping */ + U8X8_END_TRANSFER(), /* disable chip */ + U8X8_END() /* end of sequence */ +}; + + +uint8_t u8x8_d_uc1611_common(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr) +{ + uint8_t x, y, c; + uint8_t *ptr; + switch(msg) + { + case U8X8_MSG_DISPLAY_DRAW_TILE: + u8x8_cad_StartTransfer(u8x8); + + x = ((u8x8_tile_t *)arg_ptr)->x_pos; + x *= 8; + x += u8x8->x_offset; + + u8x8_cad_SendCmd(u8x8, 0x000 | ((x&15))); + u8x8_cad_SendCmd(u8x8, 0x010 | (x>>4) ); + + y = ((u8x8_tile_t *)arg_ptr)->y_pos; + u8x8_cad_SendCmd(u8x8, 0x060 | (y&15)); + u8x8_cad_SendCmd(u8x8, 0x070 | (y>>4)); + + c = ((u8x8_tile_t *)arg_ptr)->cnt; + c *= 8; + ptr = ((u8x8_tile_t *)arg_ptr)->tile_ptr; + do + { + u8x8_cad_SendData(u8x8, c, ptr); /* note: SendData can not handle more than 255 bytes */ + arg_int--; + } while( arg_int > 0 ); + + u8x8_cad_EndTransfer(u8x8); + break; + /* handled in the calling procedure + case U8X8_MSG_DISPLAY_SETUP_MEMORY: + u8x8_d_helper_display_setup_memory(u8x8, &u8x8_uc1611_128x64_display_info); + break; + case U8X8_MSG_DISPLAY_INIT: + u8x8_d_helper_display_init(u8x8); + u8x8_cad_SendSequence(u8x8, u8x8_d_uc1701_dogs102_init_seq); + break; + */ + case U8X8_MSG_DISPLAY_SET_POWER_SAVE: + if ( arg_int == 0 ) + u8x8_cad_SendSequence(u8x8, u8x8_d_uc1611_powersave0_seq); + else + u8x8_cad_SendSequence(u8x8, u8x8_d_uc1611_powersave1_seq); + break; + case U8X8_MSG_DISPLAY_SET_FLIP_MODE: + if ( arg_int == 0 ) + { + u8x8_cad_SendSequence(u8x8, u8x8_d_uc1611_flip0_seq); + u8x8->x_offset = u8x8->display_info->default_x_offset; + } + else + { + u8x8_cad_SendSequence(u8x8, u8x8_d_uc1611_flip1_seq); + u8x8->x_offset = u8x8->display_info->flipmode_x_offset; + } + break; +#ifdef U8X8_WITH_SET_CONTRAST + case U8X8_MSG_DISPLAY_SET_CONTRAST: + u8x8_cad_StartTransfer(u8x8); + u8x8_cad_SendCmd(u8x8, 0x081 ); + u8x8_cad_SendArg(u8x8, arg_int ); /* uc1611 has range from 0 to 255 */ + u8x8_cad_EndTransfer(u8x8); + break; +#endif + default: + return 0; + } + return 1; +} + +/*================================================*/ +/* EA DOGM240 */ + +static const u8x8_display_info_t u8x8_uc1611_240x64_display_info = +{ + /* chip_enable_level = */ 0, + /* chip_disable_level = */ 1, + + /* post_chip_enable_wait_ns = */ 10, /* uc1611 datasheet, page 60, actually 0 */ + /* pre_chip_disable_wait_ns = */ 10, /* uc1611 datasheet, page 60, actually 0 */ + /* reset_pulse_width_ms = */ 1, + /* post_reset_wait_ms = */ 10, /* uc1611 datasheet, page 67 */ + /* sda_setup_time_ns = */ 10, /* uc1611 datasheet, page 64, actually 0 */ + /* sck_pulse_width_ns = */ 60, /* half of cycle time */ + /* sck_clock_hz = */ 8000000UL, /* since Arduino 1.6.0, the SPI bus speed in Hz. Should be 1000000000/sck_pulse_width_ns */ + /* spi_mode = */ 0, /* active high, rising edge */ + /* i2c_bus_clock_100kHz = */ 4, + /* data_setup_time_ns = */ 30, /* uc1611 datasheet, page 60 */ + /* write_pulse_width_ns = */ 80, /* uc1611 datasheet, page 60 */ + /* tile_width = */ 30, /* width of 30*8=240 pixel */ + /* tile_hight = */ 8, + /* default_x_offset = */ 0, + /* flipmode_x_offset = */ 0, + /* pixel_width = */ 240, + /* pixel_height = */ 64 +}; + +static const uint8_t u8x8_d_uc1611_ea_dogm240_init_seq[] = { + + U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */ + U8X8_C(0x02f), /* internal pump control */ + U8X8_CA(0x0f1, 0x07f), /* set COM end */ + U8X8_CA(0x0f2, 0x000), /* display line start */ + U8X8_CA(0x0f3, 63), /* display line end */ + U8X8_C(0x0a3), /* line rate */ + U8X8_CA(0x081, 0x092), /* set contrast, EA default: 0x08f */ + + //U8X8_C(0x0a9), /* display enable */ + + U8X8_C(0x0d1), /* display pattern */ + U8X8_C(0x089), /* auto increment */ + U8X8_CA(0x0c0, 0x004), /* LCD Mapping */ + U8X8_C(0x000), /* column low nibble */ + U8X8_C(0x010), /* column high nibble */ + U8X8_C(0x060), /* page adr low */ + U8X8_C(0x070), /* page adr high */ + + + U8X8_END_TRANSFER(), /* disable chip */ + U8X8_END() /* end of sequence */ +}; + +uint8_t u8x8_d_uc1611_ea_dogm240(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr) +{ + /* call common procedure first and handle messages there */ + if ( u8x8_d_uc1611_common(u8x8, msg, arg_int, arg_ptr) == 0 ) + { + /* msg not handled, then try here */ + switch(msg) + { + case U8X8_MSG_DISPLAY_SETUP_MEMORY: + u8x8_d_helper_display_setup_memory(u8x8, &u8x8_uc1611_240x64_display_info); + break; + case U8X8_MSG_DISPLAY_INIT: + u8x8_d_helper_display_init(u8x8); + u8x8_cad_SendSequence(u8x8, u8x8_d_uc1611_ea_dogm240_init_seq); + break; + default: + return 0; /* msg unknown */ + } + } + return 1; +} + +/*================================================*/ +/* EA DOGXL240 */ + +static const uint8_t u8x8_d_uc1611_ea_dogxl240_init_seq[] = { + + U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */ + U8X8_C(0x02f), /* internal pump control */ + U8X8_CA(0x0f1, 0x07f), /* set COM end */ + U8X8_CA(0x0f2, 0x000), /* display line start */ + U8X8_CA(0x0f3, 127), /* display line end */ + U8X8_C(0x0a3), /* line rate */ + U8X8_CA(0x081, 0x09f), /* set contrast */ + + U8X8_C(0x0a9), /* display enable */ + + U8X8_C(0x0d1), /* display pattern */ + U8X8_C(0x089), /* auto increment */ + U8X8_CA(0x0c0, 0x004), /* LCD Mapping */ + U8X8_C(0x000), /* column low nibble */ + U8X8_C(0x010), /* column high nibble */ + U8X8_C(0x060), /* page adr low */ + U8X8_C(0x070), /* page adr high */ + + + U8X8_END_TRANSFER(), /* disable chip */ + U8X8_END() /* end of sequence */ +}; + +static const u8x8_display_info_t u8x8_uc1611_240x128_display_info = +{ + /* chip_enable_level = */ 0, + /* chip_disable_level = */ 1, + + /* post_chip_enable_wait_ns = */ 10, /* uc1611 datasheet, page 60, actually 0 */ + /* pre_chip_disable_wait_ns = */ 10, /* uc1611 datasheet, page 60, actually 0 */ + /* reset_pulse_width_ms = */ 1, + /* post_reset_wait_ms = */ 10, /* uc1611 datasheet, page 67 */ + /* sda_setup_time_ns = */ 10, /* uc1611 datasheet, page 64, actually 0 */ + /* sck_pulse_width_ns = */ 60, /* half of cycle time */ + /* sck_clock_hz = */ 8000000UL, /* since Arduino 1.6.0, the SPI bus speed in Hz. Should be 1000000000/sck_pulse_width_ns */ + /* spi_mode = */ 0, /* active high, rising edge */ + /* i2c_bus_clock_100kHz = */ 4, + /* data_setup_time_ns = */ 30, /* uc1611 datasheet, page 60 */ + /* write_pulse_width_ns = */ 80, /* uc1611 datasheet, page 60 */ + /* tile_width = */ 30, /* width of 30*8=240 pixel */ + /* tile_hight = */ 16, + /* default_x_offset = */ 0, + /* flipmode_x_offset = */ 0, + /* pixel_width = */ 240, + /* pixel_height = */ 128 +}; + +uint8_t u8x8_d_uc1611_ea_dogxl240(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr) +{ + /* call common procedure first and handle messages there */ + if ( u8x8_d_uc1611_common(u8x8, msg, arg_int, arg_ptr) == 0 ) + { + /* msg not handled, then try here */ + switch(msg) + { + case U8X8_MSG_DISPLAY_SETUP_MEMORY: + u8x8_d_helper_display_setup_memory(u8x8, &u8x8_uc1611_240x128_display_info); + break; + case U8X8_MSG_DISPLAY_INIT: + u8x8_d_helper_display_init(u8x8); + u8x8_cad_SendSequence(u8x8, u8x8_d_uc1611_ea_dogxl240_init_seq); + break; + default: + return 0; /* msg unknown */ + } + } + return 1; +}