diff --git a/README.md b/README.md index 9b909541..3718fe5d 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,5 @@ Description: https://github.com/olikraus/u8g2/wiki Issue Tracker: https://github.com/olikraus/u8g2/issues -Download (2.34.2): https://github.com/olikraus/U8g2_Arduino/archive/master.zip +Download (2.34.3): https://github.com/olikraus/U8g2_Arduino/archive/master.zip diff --git a/extras/ChangeLog b/extras/ChangeLog index 673b068a..e33a7a94 100644 --- a/extras/ChangeLog +++ b/extras/ChangeLog @@ -300,4 +300,6 @@ https://github.com/olikraus/u8g2 ChangeLog * Changed SPI mode for SH1106 from 3 to 0 (issue 1901) 2022-xx-xx v2.34.xx olikraus@gmail.com * SSD1327 ZJY M150 128x128 (issue 1960) + * SSD1316 96x32 (1938) + \ No newline at end of file diff --git a/library.properties b/library.properties index 1accac42..d795935c 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=U8g2 -version=2.34.2 +version=2.34.3 author=oliver maintainer=oliver sentence=Monochrome LCD, OLED and eInk Library. Display controller: SSD1305, SSD1306, SSD1309, SSD1312, SSD1316, SSD1318, 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, ST75160, ST75256, ST75320, NT7534, ST7920, IST3020, IST3088, IST7920, LD7032, KS0108, KS0713, HD44102, T7932, SED1520, SBN1661, IL3820, MAX7219, GP1287, GP1247, GU800. Interfaces: I2C, SPI, Parallel. diff --git a/src/clib/u8x8_d_ssd1306_96x40.c b/src/clib/u8x8_d_ssd1306_96x40.c index 0bb2d6d3..a506fe10 100644 --- a/src/clib/u8x8_d_ssd1306_96x40.c +++ b/src/clib/u8x8_d_ssd1306_96x40.c @@ -252,6 +252,23 @@ static const uint8_t u8x8_d_ssd1306_96x39_init_seq[] = { U8X8_END() /* end of sequence */ }; +static const uint8_t u8x8_d_ssd1306_96x39_flip0_seq[] = { + U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */ + U8X8_C(0x0a1), /* segment remap a0/a1*/ + U8X8_C(0x0c8), /* c0: scan dir normal, c8: reverse */ + U8X8_C(0x041), /* set display start line to 1 */ + U8X8_END_TRANSFER(), /* disable chip */ + U8X8_END() /* end of sequence */ +}; + +static const uint8_t u8x8_d_ssd1306_96x39_flip1_seq[] = { + U8X8_START_TRANSFER(), /* enable chip, delay is part of the transfer start */ + U8X8_C(0x0a0), /* segment remap a0/a1*/ + U8X8_C(0x0c0), /* c0: scan dir normal, c8: reverse */ + U8X8_C(0x040), /* set display start line to 0 */ + U8X8_END_TRANSFER(), /* disable chip */ + U8X8_END() /* end of sequence */ +}; static const u8x8_display_info_t u8x8_ssd1306_96x39_display_info = @@ -291,6 +308,19 @@ uint8_t u8x8_d_ssd1306_96x39(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *a u8x8_cad_SendSequence(u8x8, u8x8_d_ssd1306_96x39_init_seq); return 1; } + else if ( msg == U8X8_MSG_DISPLAY_SET_FLIP_MODE ) + { + if ( arg_int == 0 ) + { + u8x8_cad_SendSequence(u8x8, u8x8_d_ssd1306_96x39_flip0_seq); + u8x8->x_offset = u8x8->display_info->default_x_offset; + } + else + { + u8x8_cad_SendSequence(u8x8, u8x8_d_ssd1306_96x39_flip1_seq); + u8x8->x_offset = u8x8->display_info->flipmode_x_offset; + } + } return u8x8_d_ssd1306_96x40_generic(u8x8, msg, arg_int, arg_ptr); }