This commit is contained in:
kraus
2021-10-03 23:49:12 +02:00
parent 2b173061a7
commit f014fc898a
7 changed files with 59 additions and 39 deletions
+1 -1
View File
@@ -8,5 +8,5 @@ Description: https://github.com/olikraus/u8g2/wiki
Issue Tracker: https://github.com/olikraus/u8g2/issues
Download (2.32.5): https://github.com/olikraus/U8g2_Arduino/archive/master.zip
Download (2.32.6): https://github.com/olikraus/U8g2_Arduino/archive/master.zip
+1 -1
View File
@@ -1,5 +1,5 @@
name=U8g2
version=2.32.5
version=2.32.6
author=oliver <olikraus@gmail.com>
maintainer=oliver <olikraus@gmail.com>
sentence=Monochrome LCD, OLED and eInk Library. Display controller: SSD1305, SSD1306, SSD1309, SSD1316, SSD1320, SSD1322, SSD1325, SSD1327, SSD1329, SSD1606, SSD1607, SH1106, SH1107, SH1108, SH1122, T6963, RA8835, LC7981, PCD8544, PCF8812, HX1230, UC1601, UC1604, UC1608, UC1610, UC1611, UC1617, UC1638, UC1701, ST7511, ST7528, ST7565, ST7567, ST7571, ST7586, ST7588, ST75256, ST75320, NT7534, ST7920, IST3020, IST7920, LD7032, KS0108, KS0713, HD44102, T7932, SED1520, SBN1661, IL3820, MAX7219. Interfaces: I2C, SPI, Parallel.
+5 -5
View File
@@ -6986,31 +6986,31 @@ class U8X8_S1D15721_240X64_8080 : public U8X8 {
};
class U8X8_GU800_128X64_4W_SW_SPI : public U8X8 {
public: U8X8_GU800_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_gu800_128x64, u8x8_cad_110, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino);
u8x8_Setup(getU8x8(), u8x8_d_gu800_128x64, u8x8_gu800_cad_110, u8x8_byte_arduino_4wire_sw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_SW_SPI(getU8x8(), clock, data, cs, dc, reset);
}
};
class U8X8_GU800_128X64_4W_HW_SPI : public U8X8 {
public: U8X8_GU800_128X64_4W_HW_SPI(uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() {
u8x8_Setup(getU8x8(), u8x8_d_gu800_128x64, u8x8_cad_110, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_Setup(getU8x8(), u8x8_d_gu800_128x64, u8x8_gu800_cad_110, u8x8_byte_arduino_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8X8_GU800_128X64_2ND_4W_HW_SPI : public U8X8 {
public: U8X8_GU800_128X64_2ND_4W_HW_SPI(uint8_t cs, uint8_t dc, uint8_t reset = U8X8_PIN_NONE) : U8X8() {
u8x8_Setup(getU8x8(), u8x8_d_gu800_128x64, u8x8_cad_110, u8x8_byte_arduino_2nd_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_Setup(getU8x8(), u8x8_d_gu800_128x64, u8x8_gu800_cad_110, u8x8_byte_arduino_2nd_hw_spi, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_4Wire_HW_SPI(getU8x8(), cs, dc, reset);
}
};
class U8X8_GU800_128X64_6800 : public U8X8 {
public: U8X8_GU800_128X64_6800(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_gu800_128x64, u8x8_cad_110, u8x8_byte_8bit_6800mode, u8x8_gpio_and_delay_arduino);
u8x8_Setup(getU8x8(), u8x8_d_gu800_128x64, u8x8_gu800_cad_110, u8x8_byte_8bit_6800mode, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_8Bit_6800(getU8x8(), d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc, reset);
}
};
class U8X8_GU800_128X64_8080 : public U8X8 {
public: U8X8_GU800_128X64_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_gu800_128x64, u8x8_cad_110, u8x8_byte_arduino_8bit_8080mode, u8x8_gpio_and_delay_arduino);
u8x8_Setup(getU8x8(), u8x8_d_gu800_128x64, u8x8_gu800_cad_110, u8x8_byte_arduino_8bit_8080mode, u8x8_gpio_and_delay_arduino);
u8x8_SetPin_8Bit_8080(getU8x8(), d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc, reset);
}
};
+3 -3
View File
@@ -6529,7 +6529,7 @@ void u8g2_Setup_gu800_128x64_1(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg
{
uint8_t tile_buf_height;
uint8_t *buf;
u8g2_SetupDisplay(u8g2, u8x8_d_gu800_128x64, u8x8_cad_110, byte_cb, gpio_and_delay_cb);
u8g2_SetupDisplay(u8g2, u8x8_d_gu800_128x64, u8x8_gu800_cad_110, byte_cb, gpio_and_delay_cb);
buf = u8g2_m_16_8_1(&tile_buf_height);
u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation);
}
@@ -6538,7 +6538,7 @@ void u8g2_Setup_gu800_128x64_2(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg
{
uint8_t tile_buf_height;
uint8_t *buf;
u8g2_SetupDisplay(u8g2, u8x8_d_gu800_128x64, u8x8_cad_110, byte_cb, gpio_and_delay_cb);
u8g2_SetupDisplay(u8g2, u8x8_d_gu800_128x64, u8x8_gu800_cad_110, byte_cb, gpio_and_delay_cb);
buf = u8g2_m_16_8_2(&tile_buf_height);
u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation);
}
@@ -6547,7 +6547,7 @@ void u8g2_Setup_gu800_128x64_f(u8g2_t *u8g2, const u8g2_cb_t *rotation, u8x8_msg
{
uint8_t tile_buf_height;
uint8_t *buf;
u8g2_SetupDisplay(u8g2, u8x8_d_gu800_128x64, u8x8_cad_110, byte_cb, gpio_and_delay_cb);
u8g2_SetupDisplay(u8g2, u8x8_d_gu800_128x64, u8x8_gu800_cad_110, byte_cb, gpio_and_delay_cb);
buf = u8g2_m_16_8_f(&tile_buf_height);
u8g2_SetupBuffer(u8g2, buf, tile_buf_height, u8g2_ll_hvline_vertical_top_lsb, rotation);
}
+1
View File
@@ -646,6 +646,7 @@ void u8x8_SendF(u8x8_t * u8x8, const char *fmt, ...);
void u8x8_cad_SendSequence(u8x8_t *u8x8, uint8_t const *data);
uint8_t u8x8_cad_empty(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
uint8_t u8x8_cad_110(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
uint8_t u8x8_gu800_cad_110(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
uint8_t u8x8_cad_001(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
uint8_t u8x8_cad_011(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
uint8_t u8x8_cad_100(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr);
+46
View File
@@ -248,6 +248,52 @@ uint8_t u8x8_cad_110(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
return 1;
}
/*
convert to bytes by using
dc = 1 for commands and args and
dc = 0 for data
*/
uint8_t u8x8_gu800_cad_110(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
{
uint8_t *data;
switch(msg)
{
case U8X8_MSG_CAD_SEND_CMD:
u8x8_byte_SetDC(u8x8, 1);
u8x8_byte_StartTransfer(u8x8);
u8x8_byte_SendByte(u8x8, arg_int);
u8x8_byte_EndTransfer(u8x8);
break;
case U8X8_MSG_CAD_SEND_ARG:
u8x8_byte_SetDC(u8x8, 1);
u8x8_byte_StartTransfer(u8x8);
u8x8_byte_SendByte(u8x8, arg_int);
u8x8_byte_EndTransfer(u8x8);
break;
case U8X8_MSG_CAD_SEND_DATA:
u8x8_byte_SetDC(u8x8, 0);
data = (uint8_t *)arg_ptr;
while( arg_int > 0 )
{
u8x8_byte_StartTransfer(u8x8);
u8x8_byte_SendByte(u8x8, *data);
u8x8_byte_EndTransfer(u8x8);
data++;
arg_int--;
}
break;
case U8X8_MSG_CAD_INIT:
u8x8->byte_cb(u8x8, msg, arg_int, arg_ptr);
break;
case U8X8_MSG_CAD_START_TRANSFER:
case U8X8_MSG_CAD_END_TRANSFER:
break;
default:
return 0;
}
return 1;
}
/*
convert to bytes by using
dc = 1 for commands and args and
+2 -29
View File
@@ -153,48 +153,21 @@ static const uint8_t u8x8_d_gu800_128x64_init_seq[] = {
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_C(0x05f), /* clear all RAM, clear address counters */
U8X8_END_TRANSFER(), /* disable chip */
U8X8_DLY(1), /* delay for 1 ms (see datasheet) */
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
/* configure all area as graphics RAM */
U8X8_CA(0x62,0), U8X8_D1(0xff),
U8X8_END_TRANSFER(), /* disable chip */
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_CA(0x62,1), U8X8_D1(0xff),
U8X8_END_TRANSFER(), /* disable chip */
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_CA(0x62,2), U8X8_D1(0xff),
U8X8_END_TRANSFER(), /* disable chip */
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_CA(0x62,3), U8X8_D1(0xff),
U8X8_END_TRANSFER(), /* disable chip */
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_CA(0x62,4), U8X8_D1(0xff),
U8X8_END_TRANSFER(), /* disable chip */
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_CA(0x62,5), U8X8_D1(0xff),
U8X8_END_TRANSFER(), /* disable chip */
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_CA(0x62,6), U8X8_D1(0xff),
U8X8_END_TRANSFER(), /* disable chip */
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_CA(0x62,7), U8X8_D1(0xff),
U8X8_END_TRANSFER(), /* disable chip */
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_CA(0x70, 0), /* horizontal shift */
U8X8_END_TRANSFER(), /* disable chip */
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_C(0xb0), /* vertical shift */
U8X8_END_TRANSFER(), /* disable chip */
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_C(0xb0), /* vertical shift */
U8X8_C(0x4f), /* max brightness */
U8X8_END_TRANSFER(), /* disable chip */
U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */
U8X8_C(0x84), /* x increment */
// U8X8_CA(0x024, 0x040) /* display on */
@@ -215,7 +188,7 @@ static const u8x8_display_info_t u8x8_d_gu800_128x64_display_info =
/* post_reset_wait_ms = */ 2, /* GU800: Min 1.5ms per datasheet */
/* sda_setup_time_ns = */ 40, /* GU800: 40ns according to the timing diagram */
/* sck_pulse_width_ns = */ 80, /* GU800: Min 80ns per datasheet */
/* sck_clock_hz = */ 2000000UL,
/* sck_clock_hz = */ 4000000UL,
/* spi_mode = */ 0, /* active high, rising edge */
/* i2c_bus_clock_100kHz = */ 4, /* GU800: Not used */
/* data_setup_time_ns = */ 40, /* GU800: Min 40ns per datasheet */